mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Remove wp_add_script_before() from 3.3. Continue to use wp_localize_script() for your data-passing needs. fixes #11520.
git-svn-id: https://develop.svn.wordpress.org/trunk@19573 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -145,22 +145,6 @@ class WP_Scripts extends WP_Dependencies {
|
||||
if ( !empty($after) )
|
||||
$script .= "\n$after";
|
||||
|
||||
return $this->add_script_data( $handle, $script );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add extra Javascript
|
||||
*
|
||||
* Only if script has already been added.
|
||||
*
|
||||
* @param string $handle Script name
|
||||
* @param string $script Extra JS to add before the script
|
||||
* @return bool Successful or not
|
||||
*/
|
||||
function add_script_data( $handle, $script ) {
|
||||
if ( !is_string( $script ) )
|
||||
return false;
|
||||
|
||||
$data = $this->get_data( $handle, 'data' );
|
||||
|
||||
if ( !empty( $data ) )
|
||||
|
||||
Reference in New Issue
Block a user