More quicktags back-compat, see #16695
git-svn-id: https://develop.svn.wordpress.org/trunk@18628 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8094c89b39
commit
1205b09cf6
@ -55,6 +55,25 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
|
|||||||
return QTags.addButton( id, display, tagStart, tagEnd, open, access, '', -1 );
|
return QTags.addButton( id, display, tagStart, tagEnd, open, access, '', -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Back-compat
|
||||||
|
*
|
||||||
|
* Define all former global functions so plugins that hask quicktags.js directly don't cause fatal errors.
|
||||||
|
*/
|
||||||
|
var edAddTag = function(){},
|
||||||
|
edCheckOpenTags = function(){},
|
||||||
|
edCloseAllTags = function(){},
|
||||||
|
edInsertImage = function(){},
|
||||||
|
edInsertLink = function(){},
|
||||||
|
edInsertTag = function(){},
|
||||||
|
edLink = function(){},
|
||||||
|
edQuickLink = function(){},
|
||||||
|
edRemoveTag = function(){},
|
||||||
|
edShowButton = function(){},
|
||||||
|
edShowLinks = function(){},
|
||||||
|
edSpell = function(){},
|
||||||
|
edToolbar = function(){};
|
||||||
|
|
||||||
(function(){
|
(function(){
|
||||||
// private stuff is prefixed with an underscore
|
// private stuff is prefixed with an underscore
|
||||||
var _domReady = function(func) {
|
var _domReady = function(func) {
|
||||||
@ -269,8 +288,12 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i in theButtons )
|
for ( i in theButtons ) {
|
||||||
|
if ( !theButtons[i] || !theButtons[i].html )
|
||||||
|
continue;
|
||||||
|
|
||||||
html += theButtons[i].html(name + '_');
|
html += theButtons[i].html(name + '_');
|
||||||
|
}
|
||||||
|
|
||||||
instance.toolbar.innerHTML = html;
|
instance.toolbar.innerHTML = html;
|
||||||
instance.theButtons = theButtons;
|
instance.theButtons = theButtons;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -68,7 +68,7 @@ function wp_default_scripts( &$scripts ) {
|
|||||||
|
|
||||||
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 );
|
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1', 1 );
|
||||||
|
|
||||||
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110828', 1 );
|
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20110902', 1 );
|
||||||
$scripts->add_script_data( 'quicktags', 'quicktagsL10n', array(
|
$scripts->add_script_data( 'quicktags', 'quicktagsL10n', array(
|
||||||
'wordLookup' => __('Enter a word to look up:'),
|
'wordLookup' => __('Enter a word to look up:'),
|
||||||
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
|
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
|
||||||
|
Loading…
Reference in New Issue
Block a user