mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-10 05:39:05 +01:00
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:
parent
47d32decd6
commit
d27579cf15
wp-includes
@ -204,7 +204,7 @@ class WP_Scripts extends WP_Dependencies {
|
|||||||
return $output;
|
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 "/* <![CDATA[ */\n";
|
||||||
echo "$output\n";
|
echo "$output\n";
|
||||||
echo "/* ]]> */\n";
|
echo "/* ]]> */\n";
|
||||||
@ -426,17 +426,17 @@ class WP_Scripts extends WP_Dependencies {
|
|||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
*
|
*
|
||||||
* @param string $handle
|
* @param string $handle Name of the script to attach data to.
|
||||||
* @param string $object_name
|
* @param string $object_name Name of the variable that will contain the data.
|
||||||
* @param array $l10n
|
* @param array $l10n Array of data to localize.
|
||||||
* @return bool
|
* @return bool True on success, false on failure.
|
||||||
*/
|
*/
|
||||||
public function localize( $handle, $object_name, $l10n ) {
|
public function localize( $handle, $object_name, $l10n ) {
|
||||||
if ( $handle === 'jquery' ) {
|
if ( $handle === 'jquery' ) {
|
||||||
$handle = 'jquery-core';
|
$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'];
|
$after = $l10n['l10n_print_after'];
|
||||||
unset( $l10n['l10n_print_after'] );
|
unset( $l10n['l10n_print_after'] );
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user