WordPress.org

Make WordPress Core

Changeset 24052


Ignore:
Timestamp:
04/22/13 20:17:25 (2 years ago)
Author:
nacin
Message:

Remove ancient 'lookup' quicktag from the text editor. This had called up answers.com.

props mboynes, jonbishop, SergeyBiryukov.
fixes #23322.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-comment.php

    r23955 r24052  
    6464<div id="postdiv" class="postarea"> 
    6565<?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' ); 
    6767    wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); 
    6868    wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 
  • trunk/wp-admin/includes/media.php

    r23979 r24052  
    23962396 
    23972397    <?php 
    2398         $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ); 
     2398        $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); 
    23992399        $editor_args = array( 
    24002400            'textarea_name' => 'content', 
  • trunk/wp-admin/includes/template.php

    r24046 r24052  
    346346    <div id="replycontainer"> 
    347347    <?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' ); 
    349349    wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); 
    350350    ?> 
  • trunk/wp-includes/class-wp-editor.php

    r23730 r24052  
    177177 
    178178            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'; 
    180180 
    181181            if ( $set['dfw'] ) 
  • trunk/wp-includes/js/quicktags.js

    r21592 r24052  
    99 *   id : 'my_id',          the HTML ID of the textarea, required 
    1010 *   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'; 
    1212 * } 
    1313 * 
     
    230230    qt._buttonsInit = function() { 
    231231        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,'; 
    233233 
    234234        for ( inst in t.instances ) { 
     
    500500    }; 
    501501 
    502     // the spell button 
    503     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     }; 
     502    // removed 
     503    qt.SpellButton = function() {}; 
    532504 
    533505    // the close tags button 
     
    644616    edButtons[110] = new qt.TagButton('code','code','<code>','</code>','c'), 
    645617    edButtons[120] = new qt.TagButton('more','more','<!--more-->','','t'), 
    646     edButtons[130] = new qt.SpellButton(), 
    647618    edButtons[140] = new qt.CloseButton() 
    648619 
  • trunk/wp-includes/script-loader.php

    r24046 r24052  
    7676    $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 ); 
    7777    did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array( 
    78         'wordLookup' => __('Enter a word to look up:'), 
    79         'dictionaryLookup' => esc_attr(__('Dictionary lookup')), 
    80         'lookup' => esc_attr(__('lookup')), 
    8178        'closeAllOpenTags' => esc_attr(__('Close all open tags')), 
    8279        'closeTags' => esc_attr(__('close tags')), 
Note: See TracChangeset for help on using the changeset viewer.