Docs: Standardize DocBlocks for two new WP_Scripts
methods, add_inline_script()
and print_inline_script()
, introduced in [36633].
See #14853. See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@36706 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f90a37805d
commit
816a3e058c
@ -239,15 +239,15 @@ class WP_Scripts extends WP_Dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add extra code to a registered script.
|
* Adds extra code to a registered script.
|
||||||
*
|
*
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
|
* @access public
|
||||||
*
|
*
|
||||||
* @param string $handle Name of the script to add the inline script to. Must be lowercase.
|
* @param string $handle Name of the script to add the inline script to. Must be lowercase.
|
||||||
* @param string $data String containing the javascript to be added.
|
* @param string $data String containing the javascript to be added.
|
||||||
* @param string $position Optional. Whether to add the inline script before the handle
|
* @param string $position Optional. Whether to add the inline script before the handle
|
||||||
* or after. Default 'after'.
|
* or after. Default 'after'.
|
||||||
*
|
|
||||||
* @return bool True on success, false on failure.
|
* @return bool True on success, false on failure.
|
||||||
*/
|
*/
|
||||||
public function add_inline_script( $handle, $data, $position = 'after' ) {
|
public function add_inline_script( $handle, $data, $position = 'after' ) {
|
||||||
@ -266,9 +266,10 @@ class WP_Scripts extends WP_Dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print inline scripts registered for a specific handle.
|
* Prints inline scripts registered for a specific handle.
|
||||||
*
|
*
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
|
* @access public
|
||||||
*
|
*
|
||||||
* @param string $handle Name of the script to add the inline script to. Must be lowercase.
|
* @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
|
* @param string $position Optional. Whether to add the inline script before the handle
|
||||||
|
Loading…
Reference in New Issue
Block a user