Quicktags: fix strict check for `instance['0']`, props afercia, fixes #29767
Built from https://develop.svn.wordpress.org/trunk@29889 git-svn-id: http://core.svn.wordpress.org/trunk@29645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
54708e3e6d
commit
3ef60bf29b
|
@ -230,8 +230,8 @@ function edButton(id, display, tagStart, tagEnd, access) {
|
|||
|
||||
qt.instances[id] = t;
|
||||
|
||||
if ( !qt.instances[0] ) {
|
||||
qt.instances[0] = qt.instances[id];
|
||||
if ( ! qt.instances['0'] ) {
|
||||
qt.instances['0'] = qt.instances[id];
|
||||
_domReady( function(){ qt._buttonsInit(); } );
|
||||
}
|
||||
};
|
||||
|
@ -247,7 +247,7 @@ function edButton(id, display, tagStart, tagEnd, access) {
|
|||
defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,';
|
||||
|
||||
for ( inst in t.instances ) {
|
||||
if ( inst === 0 ) {
|
||||
if ( '0' === inst ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ function edButton(id, display, tagStart, tagEnd, access) {
|
|||
* @param string access_key Deprecated Not used
|
||||
* @param string title Optional. Button's title="..."
|
||||
* @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.
|
||||
* @param string instance Optional. Limit the button to a specifric instance of Quicktags, add to all instances if not present.
|
||||
* @param string instance Optional. Limit the button to a specific instance of Quicktags, add to all instances if not present.
|
||||
* @return mixed null or the button object that is needed for back-compat.
|
||||
*/
|
||||
qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue