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

Props kpdesign for a wording switcheroo.
Fixes #27518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-03-26 05:48:14 +00:00
parent c2ebd66843
commit e58c1d08e7

View File

@ -36,6 +36,13 @@ class WP_Scripts extends WP_Dependencies {
}
function init() {
/**
* Fires when the WP_Scripts instance is initialized.
*
* @since 2.6.0
*
* @param WP_Scripts &$this WP_Scripts instance, passed by reference.
*/
do_action_ref_array( 'wp_default_scripts', array(&$this) );
}
@ -97,6 +104,14 @@ class WP_Scripts extends WP_Dependencies {
$src = $this->registered[$handle]->src;
if ( $this->do_concat ) {
/**
* Filter the script loader source.
*
* @since 2.2.0
*
* @param string $src Script loader source path.
* @param string $handle Script handle.
*/
$srce = apply_filters( 'script_loader_src', $src, $handle );
if ( $this->in_default_dir($srce) ) {
$this->print_code .= $this->print_extra_script( $handle, false );
@ -117,6 +132,7 @@ class WP_Scripts extends WP_Dependencies {
if ( !empty($ver) )
$src = add_query_arg('ver', $ver, $src);
/** This filter is documented in wp-includes/class.wp-scripts.php */
$src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );
if ( ! $src )
@ -179,8 +195,16 @@ class WP_Scripts extends WP_Dependencies {
function all_deps( $handles, $recursion = false, $group = false ) {
$r = parent::all_deps( $handles, $recursion );
if ( !$recursion )
if ( ! $recursion ) {
/**
* Filter the list of script dependencies left to print.
*
* @since 2.3.0
*
* @param array $to_do An array of script dependencies.
*/
$this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
}
return $r;
}