Skip to content

Commit b66192a

Browse files
committed
Inline documentation for hooks in wp-includes/class.wp-scripts.php.
Props kpdesign for a wording switcheroo. Fixes #27518. git-svn-id: https://develop.svn.wordpress.org/trunk@27731 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e111f0a commit b66192a

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

src/wp-includes/class.wp-scripts.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ function __construct() {
3636
}
3737

3838
function init() {
39+
/**
40+
* Fires when the WP_Scripts instance is initialized.
41+
*
42+
* @since 2.6.0
43+
*
44+
* @param WP_Scripts &$this WP_Scripts instance, passed by reference.
45+
*/
3946
do_action_ref_array( 'wp_default_scripts', array(&$this) );
4047
}
4148

@@ -97,6 +104,14 @@ function do_item( $handle, $group = false ) {
97104
$src = $this->registered[$handle]->src;
98105

99106
if ( $this->do_concat ) {
107+
/**
108+
* Filter the script loader source.
109+
*
110+
* @since 2.2.0
111+
*
112+
* @param string $src Script loader source path.
113+
* @param string $handle Script handle.
114+
*/
100115
$srce = apply_filters( 'script_loader_src', $src, $handle );
101116
if ( $this->in_default_dir($srce) ) {
102117
$this->print_code .= $this->print_extra_script( $handle, false );
@@ -117,6 +132,7 @@ function do_item( $handle, $group = false ) {
117132
if ( !empty($ver) )
118133
$src = add_query_arg('ver', $ver, $src);
119134

135+
/** This filter is documented in wp-includes/class.wp-scripts.php */
120136
$src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );
121137

122138
if ( ! $src )
@@ -179,8 +195,16 @@ function set_group( $handle, $recursion, $group = false ) {
179195

180196
function all_deps( $handles, $recursion = false, $group = false ) {
181197
$r = parent::all_deps( $handles, $recursion );
182-
if ( !$recursion )
198+
if ( ! $recursion ) {
199+
/**
200+
* Filter the list of script dependencies left to print.
201+
*
202+
* @since 2.3.0
203+
*
204+
* @param array $to_do An array of script dependencies.
205+
*/
183206
$this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
207+
}
184208
return $r;
185209
}
186210

0 commit comments

Comments
 (0)