Docs: Document properties of WP_Scripts and add missing @since tags.

See #35964.
Built from https://develop.svn.wordpress.org/trunk@36730


git-svn-id: http://core.svn.wordpress.org/trunk@36697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-02-26 13:05:26 +00:00
parent 23ffb773aa
commit 167aae554f
2 changed files with 139 additions and 3 deletions

View File

@ -17,18 +17,111 @@
* @since r16 * @since r16
*/ */
class WP_Scripts extends WP_Dependencies { class WP_Scripts extends WP_Dependencies {
public $base_url; // Full URL with trailing slash /**
* Base URL for scripts.
*
* Full URL with trailing slash.
*
* @since 2.6.0
* @access public
* @var string
*/
public $base_url;
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $content_url; public $content_url;
/**
*
* @since 2.6.0
* @access public
* @var string
*/
public $default_version; public $default_version;
/**
*
* @since 2.8.0
* @access public
* @var array
*/
public $in_footer = array(); public $in_footer = array();
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $concat = ''; public $concat = '';
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $concat_version = ''; public $concat_version = '';
/**
*
* @since 2.8.0
* @access public
* @var bool
*/
public $do_concat = false; public $do_concat = false;
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $print_html = ''; public $print_html = '';
/**
*
* @since 4.5.0
* @access public
* @var string
*/
public $print_html_before = ''; public $print_html_before = '';
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $print_code = ''; public $print_code = '';
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $ext_handles = ''; public $ext_handles = '';
/**
*
* @since 2.8.0
* @access public
* @var string
*/
public $ext_version = ''; public $ext_version = '';
/**
*
* @since 2.8.0
* @access public
* @var array
*/
public $default_dirs; public $default_dirs;
/** /**
@ -64,6 +157,10 @@ class WP_Scripts extends WP_Dependencies {
* *
* Prints the scripts passed to it or the print queue. Also prints all necessary dependencies. * Prints the scripts passed to it or the print queue. Also prints all necessary dependencies.
* *
* @since 2.1.0
* @since 2.8.0 Added the `$group` parameter.
* @access public
*
* @param mixed $handles Optional. Scripts to be printed. (void) prints queue, (string) prints * @param mixed $handles Optional. Scripts to be printed. (void) prints queue, (string) prints
* that script, (array of strings) prints those scripts. Default false. * that script, (array of strings) prints those scripts. Default false.
* @param int $group Optional. If scripts were queued in groups prints this group number. * @param int $group Optional. If scripts were queued in groups prints this group number.
@ -75,7 +172,12 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
* @deprecated 3.3 *
* @since 2.1.0
* @since 2.8.0 Added the `$echo` parameter.
* @deprecated 3.3.0
* @access public
*
* @see print_extra_script() * @see print_extra_script()
* *
* @param string $handle * @param string $handle
@ -88,6 +190,10 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 3.3.0
* @access public
*
* @param string $handle * @param string $handle
* @param bool $echo * @param bool $echo
* @return bool|string|void * @return bool|string|void
@ -109,6 +215,11 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.6.0
* @since 2.8.0 Added the `$group` parameter.
* @access public
*
* @param string $handle Name of the item. Should be unique. * @param string $handle Name of the item. Should be unique.
* @param int|bool $group * @param int|bool $group
* @return bool True on success, false if not set. * @return bool True on success, false if not set.
@ -297,6 +408,9 @@ class WP_Scripts extends WP_Dependencies {
/** /**
* Localizes a script, only if the script has already been added * Localizes a script, only if the script has already been added
* *
* @since 2.1.0
* @access public
*
* @param string $handle * @param string $handle
* @param string $object_name * @param string $object_name
* @param array $l10n * @param array $l10n
@ -332,6 +446,10 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.8.0
* @access public
*
* @param string $handle Name of the item. Should be unique. * @param string $handle Name of the item. Should be unique.
* @param bool $recursion Internal flag that calling function was called recursively. * @param bool $recursion Internal flag that calling function was called recursively.
* @param mixed $group Group level. * @param mixed $group Group level.
@ -350,6 +468,10 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.1.0
* @access public
*
* @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings). * @param mixed $handles Item handle and argument (string) or item handles and arguments (array of strings).
* @param bool $recursion Internal flag that function is calling itself. * @param bool $recursion Internal flag that function is calling itself.
* @param mixed $group Group level: (int) level, (false) no groups. * @param mixed $group Group level: (int) level, (false) no groups.
@ -371,6 +493,10 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.8.0
* @access public
*
* @return array * @return array
*/ */
public function do_head_items() { public function do_head_items() {
@ -379,6 +505,10 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.8.0
* @access public
*
* @return array * @return array
*/ */
public function do_footer_items() { public function do_footer_items() {
@ -387,6 +517,10 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.8.0
* @access public
*
* @param string $src * @param string $src
* @return bool * @return bool
*/ */
@ -408,6 +542,8 @@ class WP_Scripts extends WP_Dependencies {
} }
/** /**
*
* @since 2.8.0
* @access public * @access public
*/ */
public function reset() { public function reset() {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.5-beta1-36729'; $wp_version = '4.5-beta1-36730';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.