WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/08/2011 08:46:58 PM (8 years ago)
Author:
nacin
Message:

Remove wp_add_script_before() from 3.3. Continue to use wp_localize_script() for your data-passing needs. fixes #11520.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class.wp-scripts.php

    r19217 r19573  
    146146            $script .= "\n$after";
    147147
    148         return $this->add_script_data( $handle, $script );
    149     }
    150 
    151     /**
    152      * Add extra Javascript
    153      *
    154      * Only if script has already been added.
    155      *
    156      * @param string $handle Script name
    157      * @param string $script Extra JS to add before the script
    158      * @return bool Successful or not
    159      */
    160     function add_script_data( $handle, $script ) {
    161         if ( !is_string( $script ) )
    162             return false;
    163 
    164148        $data = $this->get_data( $handle, 'data' );
    165149
Note: See TracChangeset for help on using the changeset viewer.