Ticket #23322: 23322.2.patch
File 23322.2.patch, 4.9 KB (added by , 12 years ago) |
---|
-
wp-admin/edit-form-comment.php
63 63 64 64 <div id="postdiv" class="postarea"> 65 65 <?php 66 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code, spell,close' );66 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); 67 67 wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); 68 68 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 69 69 </div> -
wp-admin/includes/media.php
2321 2321 <?php endif; ?> 2322 2322 2323 2323 <?php 2324 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code, spell,close' );2324 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); 2325 2325 $editor_args = array( 2326 2326 'textarea_name' => 'content', 2327 2327 'textarea_rows' => 5, -
wp-admin/includes/template.php
345 345 346 346 <div id="replycontainer"> 347 347 <?php 348 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code, spell,close' );348 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); 349 349 wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); 350 350 ?> 351 351 </div> -
wp-includes/class-wp-editor.php
176 176 $qtInit = array_merge($qtInit, $set['quicktags']); 177 177 178 178 if ( empty($qtInit['buttons']) ) 179 $qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more, spell,close';179 $qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close'; 180 180 181 181 if ( $set['dfw'] ) 182 182 $qtInit['buttons'] .= ',fullscreen'; -
wp-includes/js/quicktags.js
8 8 * settings = { 9 9 * id : 'my_id', the HTML ID of the textarea, required 10 10 * buttons: '' Comma separated list of the names of the default buttons to show. Optional. 11 * Current list of default button names: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more, spell,close';11 * Current list of default button names: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close'; 12 12 * } 13 13 * 14 14 * The settings can also be a string quicktags_id. … … 229 229 230 230 qt._buttonsInit = function() { 231 231 var t = this, canvas, name, settings, theButtons, html, inst, ed, id, i, use, 232 defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more, spell,close,';232 defaults = ',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,'; 233 233 234 234 for ( inst in t.instances ) { 235 235 if ( inst == 0 ) … … 499 499 } 500 500 }; 501 501 502 // the spell button503 qt.SpellButton = function() {504 qt.Button.call(this, 'spell', quicktagsL10n.lookup, '', quicktagsL10n.dictionaryLookup);505 };506 qt.SpellButton.prototype = new qt.Button();507 qt.SpellButton.prototype.callback = function(element, canvas, ed) {508 var word = '', sel, startPos, endPos;509 510 if ( document.selection ) {511 canvas.focus();512 sel = document.selection.createRange();513 if ( sel.text.length > 0 ) {514 word = sel.text;515 }516 } else if ( canvas.selectionStart || canvas.selectionStart == '0' ) {517 startPos = canvas.selectionStart;518 endPos = canvas.selectionEnd;519 if ( startPos != endPos ) {520 word = canvas.value.substring(startPos, endPos);521 }522 }523 524 if ( word === '' ) {525 word = prompt(quicktagsL10n.wordLookup, '');526 }527 528 if ( word !== null && /^\w[\w ]*$/.test(word)) {529 window.open('http://www.answers.com/' + encodeURIComponent(word));530 }531 };532 533 502 // the close tags button 534 503 qt.CloseButton = function() { 535 504 qt.Button.call(this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags); … … 643 612 edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n','l'), 644 613 edButtons[110] = new qt.TagButton('code','code','<code>','</code>','c'), 645 614 edButtons[120] = new qt.TagButton('more','more','<!--more-->','','t'), 646 edButtons[130] = new qt.SpellButton(),647 615 edButtons[140] = new qt.CloseButton() 648 616 649 617 })();