WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/23/2011 07:06:52 PM (9 years ago)
Author:
nacin
Message:

Move WP_Editor to a _WP_Editors encapsulation.

  • WP_Editor will return in 3.4 as a one true API for editor instances. Stick to wp_editor() for now.
  • TinyMCE can now be forced on with tinymce = true. It defaults to the value for user_can_richedit().
  • Restores wp_default_editor(), wp_link_query(), wp_link_dialog(), wp_fullscreen_html().

fixes #19320.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/langs/wp-langs.php

    r19263 r19420  
    11<?php
    22
    3 // escape text only if it needs translating
    43function mce_escape($text) {
    5     global $wp_editor;
    6 
    7     if ( 'en' == $wp_editor->mce_locale )
    8         return $text;
    9     else
    10         return esc_js($text);
     4    return esc_js($text);
    115}
    126
    13 $lang = 'tinyMCE.addI18n({' . $this->mce_locale . ':{
     7if ( ! class_exists( '_WP_Editors' ) )
     8    require( ABSPATH . WPINC . '/class-wp-editor.php' );
     9
     10$lang = 'tinyMCE.addI18n({' . _WP_Editors::$mce_locale . ':{
    1411common:{
    1512edit_confirm:"' . mce_escape( __('Do you want to use the WYSIWYG mode for this textarea?') ) . '",
     
    233230}});
    234231
    235 tinyMCE.addI18n("' . $this->mce_locale . '.advanced",{
     232tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.advanced",{
    236233style_select:"' . mce_escape( /* translators: TinyMCE font styles */ _x('Styles', 'TinyMCE font styles') ) . '",
    237234font_size:"' . mce_escape( __('Font size') ) . '",
     
    299296});
    300297
    301 tinyMCE.addI18n("' . $this->mce_locale . '.advanced_dlg",{
     298tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.advanced_dlg",{
    302299about_title:"' . mce_escape( __('About TinyMCE') ) . '",
    303300about_general:"' . mce_escape( __('About') ) . '",
     
    353350});
    354351
    355 tinyMCE.addI18n("' . $this->mce_locale . '.media_dlg",{
     352tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.media_dlg",{
    356353title:"' . mce_escape( __('Insert / edit embedded media') ) . '",
    357354general:"' . mce_escape( __('General') ) . '",
     
    463460});
    464461
    465 tinyMCE.addI18n("' . $this->mce_locale . '.wordpress",{
     462tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.wordpress",{
    466463wp_adv_desc:"' . mce_escape( __('Show/Hide Kitchen Sink (Alt + Shift + Z)') )  . '",
    467464wp_more_desc:"' . mce_escape( __('Insert More Tag (Alt + Shift + T)') ) . '",
     
    478475});
    479476
    480 tinyMCE.addI18n("' . $this->mce_locale . '.wpeditimage",{
     477tinyMCE.addI18n("' . _WP_Editors::$mce_locale . '.wpeditimage",{
    481478edit_img:"' . mce_escape( __('Edit Image') )  . '",
    482479del_img:"' . mce_escape( __('Delete Image') )  . '",
Note: See TracChangeset for help on using the changeset viewer.