Inline documentation for hooks in wp-includes/functions.wp-scripts.php.

Props ninio for the initial patch.
Fixes #25720.

Built from https://develop.svn.wordpress.org/trunk@25949


git-svn-id: http://core.svn.wordpress.org/trunk@25908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2013-10-27 17:51:09 +00:00
parent 7fa704d972
commit d3fbb93eb1
2 changed files with 14 additions and 4 deletions

View File

@ -25,6 +25,11 @@
* @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
*/
function wp_print_scripts( $handles = false ) {
/**
* Fires before scripts in the $handles queue are printed.
*
* @since 2.1.0
*/
do_action( 'wp_print_scripts' );
if ( '' === $handles ) // for wp_head
$handles = false;

View File

@ -690,13 +690,16 @@ function wp_style_loader_src( $src, $handle ) {
* print_footer_scripts() is called in the footer to print these scripts.
*
* @since 2.8
*
* @see wp_print_scripts()
*/
function print_head_scripts() {
global $wp_scripts, $concatenate_scripts;
if ( ! did_action('wp_print_scripts') )
do_action('wp_print_scripts');
if ( ! did_action('wp_print_scripts') ) {
/** This action is documented in wp-includes/functions.wp-scripts.php */
do_action( 'wp_print_scripts' );
}
if ( !is_a($wp_scripts, 'WP_Scripts') )
$wp_scripts = new WP_Scripts();
@ -774,8 +777,10 @@ function _print_scripts() {
* @since 2.8
*/
function wp_print_head_scripts() {
if ( ! did_action('wp_print_scripts') )
do_action('wp_print_scripts');
if ( ! did_action('wp_print_scripts') ) {
/** This action is documented in wp-includes/functions.wp-scripts.php */
do_action( 'wp_print_scripts' );
}
global $wp_scripts;