Docs: Improve inline documentation for `WP_Scripts`.

Props desrosj

See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@43412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2018-08-27 14:34:24 +00:00
parent 47d32decd6
commit d27579cf15
2 changed files with 9 additions and 9 deletions

View File

@ -204,7 +204,7 @@ class WP_Scripts extends WP_Dependencies {
return $output;
}
echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5
echo "<script type='text/javascript'>\n"; // CDATA and type='text/javascript' is not needed for HTML 5.
echo "/* <![CDATA[ */\n";
echo "$output\n";
echo "/* ]]> */\n";
@ -221,7 +221,7 @@ class WP_Scripts extends WP_Dependencies {
*
* @see WP_Dependencies::do_item()
*
* @param string $handle The script's registered handle.
* @param string $handle The script's registered handle.
* @param int|false $group Optional. Group level: (int) level, (false) no groups. Default false.
* @return bool True on success, false on failure.
*/
@ -401,7 +401,7 @@ class WP_Scripts extends WP_Dependencies {
* @param string $handle Name of the script to add the inline script to. Must be lowercase.
* @param string $position Optional. Whether to add the inline script before the handle
* or after. Default 'after'.
* @param bool $echo Optional. Whether to echo the script instead of just returning it.
* @param bool $echo Optional. Whether to echo the script instead of just returning it.
* Default true.
* @return string|false Script on success, false otherwise.
*/
@ -426,17 +426,17 @@ class WP_Scripts extends WP_Dependencies {
*
* @since 2.1.0
*
* @param string $handle
* @param string $object_name
* @param array $l10n
* @return bool
* @param string $handle Name of the script to attach data to.
* @param string $object_name Name of the variable that will contain the data.
* @param array $l10n Array of data to localize.
* @return bool True on success, false on failure.
*/
public function localize( $handle, $object_name, $l10n ) {
if ( $handle === 'jquery' ) {
$handle = 'jquery-core';
}
if ( is_array( $l10n ) && isset( $l10n['l10n_print_after'] ) ) { // back compat, preserve the code in 'l10n_print_after' if present
if ( is_array( $l10n ) && isset( $l10n['l10n_print_after'] ) ) { // back compat, preserve the code in 'l10n_print_after' if present.
$after = $l10n['l10n_print_after'];
unset( $l10n['l10n_print_after'] );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43582';
$wp_version = '5.0-alpha-43583';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.