More quicktags back-compat, see #16695
git-svn-id: http://svn.automattic.com/wordpress/trunk@18628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
31a016614d
commit
41e5e2d81e
|
@ -55,6 +55,25 @@ function edButton(id, display, tagStart, tagEnd, access, open) {
|
|||
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(){
|
||||
// private stuff is prefixed with an underscore
|
||||
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 + '_');
|
||||
}
|
||||
|
||||
instance.toolbar.innerHTML = html;
|
||||
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( '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(
|
||||
'wordLookup' => __('Enter a word to look up:'),
|
||||
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
|
||||
|
|
Loading…
Reference in New Issue