Make WordPress Core

Changeset 29889


Ignore:
Timestamp:
10/14/2014 01:25:32 AM (7 years ago)
Author:
azaozz
Message:

Quicktags: fix strict check for instance['0'], props afercia, fixes #29767

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/quicktags.js

    r29884 r29889  
    231231        qt.instances[id] = t;
    232232
    233         if ( !qt.instances[0] ) {
    234             qt.instances[0] = qt.instances[id];
     233        if ( ! qt.instances['0'] ) {
     234            qt.instances['0'] = qt.instances[id];
    235235            _domReady( function(){ qt._buttonsInit(); } );
    236236        }
     
    248248
    249249        for ( inst in t.instances ) {
    250             if ( inst === 0 ) {
     250            if ( '0' === inst ) {
    251251                continue;
    252252            }
     
    324324     * @param string title Optional. Button's title="..."
    325325     * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
    326      * @param string instance Optional. Limit the button to a specifric instance of Quicktags, add to all instances if not present.
     326     * @param string instance Optional. Limit the button to a specific instance of Quicktags, add to all instances if not present.
    327327     * @return mixed null or the button object that is needed for back-compat.
    328328     */
Note: See TracChangeset for help on using the changeset viewer.