Changeset 42343 for trunk/src/wp-includes/class-wp-editor.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-editor.php (modified) (47 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-editor.php
r41917 r42343 13 13 14 14 private static $mce_settings = array(); 15 private static $qt_settings = array();16 private static $plugins = array();17 private static $qt_buttons = array();15 private static $qt_settings = array(); 16 private static $plugins = array(); 17 private static $qt_buttons = array(); 18 18 private static $ext_plugins; 19 19 private static $baseurl; 20 20 private static $first_init; 21 private static $this_tinymce = false;22 private static $this_quicktags = false;23 private static $has_tinymce = false;24 private static $has_quicktags = false;25 private static $has_medialib = false;21 private static $this_tinymce = false; 22 private static $this_quicktags = false; 23 private static $has_tinymce = false; 24 private static $has_quicktags = false; 25 private static $has_medialib = false; 26 26 private static $editor_buttons_css = true; 27 private static $drag_drop_upload = false;28 private static $old_dfw_compat = false;27 private static $drag_drop_upload = false; 28 private static $old_dfw_compat = false; 29 29 private static $translation; 30 30 private static $tinymce_scripts_printed = false; 31 private static $link_dialog_printed = false;31 private static $link_dialog_printed = false; 32 32 33 33 private function __construct() {} … … 81 81 $settings = apply_filters( 'wp_editor_settings', $settings, $editor_id ); 82 82 83 $set = wp_parse_args( $settings, array( 84 'wpautop' => true, 85 'media_buttons' => true, 86 'default_editor' => '', 87 'drag_drop_upload' => false, 88 'textarea_name' => $editor_id, 89 'textarea_rows' => 20, 90 'tabindex' => '', 91 'tabfocus_elements' => ':prev,:next', 92 'editor_css' => '', 93 'editor_class' => '', 94 'teeny' => false, 95 'dfw' => false, 96 '_content_editor_dfw' => false, 97 'tinymce' => true, 98 'quicktags' => true 99 ) ); 83 $set = wp_parse_args( 84 $settings, array( 85 'wpautop' => true, 86 'media_buttons' => true, 87 'default_editor' => '', 88 'drag_drop_upload' => false, 89 'textarea_name' => $editor_id, 90 'textarea_rows' => 20, 91 'tabindex' => '', 92 'tabfocus_elements' => ':prev,:next', 93 'editor_css' => '', 94 'editor_class' => '', 95 'teeny' => false, 96 'dfw' => false, 97 '_content_editor_dfw' => false, 98 'tinymce' => true, 99 'quicktags' => true, 100 ) 101 ); 100 102 101 103 self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() ); … … 110 112 self::$this_quicktags = (bool) $set['quicktags']; 111 113 112 if ( self::$this_tinymce ) 114 if ( self::$this_tinymce ) { 113 115 self::$has_tinymce = true; 114 115 if ( self::$this_quicktags ) 116 } 117 118 if ( self::$this_quicktags ) { 116 119 self::$has_quicktags = true; 120 } 117 121 118 122 if ( $set['dfw'] ) { … … 120 124 } 121 125 122 if ( empty( $set['editor_height'] ) ) 126 if ( empty( $set['editor_height'] ) ) { 123 127 return $set; 128 } 124 129 125 130 if ( 'content' === $editor_id && empty( $set['tinymce']['wp_autoresize_on'] ) ) { … … 127 132 $cookie = (int) get_user_setting( 'ed_size' ); 128 133 129 if ( $cookie ) 134 if ( $cookie ) { 130 135 $set['editor_height'] = $cookie; 131 } 132 133 if ( $set['editor_height'] < 50 ) 136 } 137 } 138 139 if ( $set['editor_height'] < 50 ) { 134 140 $set['editor_height'] = 50; 135 elseif ( $set['editor_height'] > 5000 )141 } elseif ( $set['editor_height'] > 5000 ) { 136 142 $set['editor_height'] = 5000; 143 } 137 144 138 145 return $set; … … 148 155 */ 149 156 public static function editor( $content, $editor_id, $settings = array() ) { 150 $set = self::parse_settings( $editor_id, $settings );151 $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"';152 $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';157 $set = self::parse_settings( $editor_id, $settings ); 158 $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"'; 159 $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : ''; 153 160 $default_editor = 'html'; 154 $buttons = $autocomplete = '';161 $buttons = $autocomplete = ''; 155 162 $editor_id_attr = esc_attr( $editor_id ); 156 163 … … 189 196 190 197 $switch_class = 'html' === $default_editor ? 'html-active' : 'tmce-active'; 191 $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class;198 $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class; 192 199 193 200 if ( $set['_content_editor_dfw'] ) { … … 212 219 self::$has_medialib = true; 213 220 214 if ( ! function_exists( 'media_buttons' ) ) 221 if ( ! function_exists( 'media_buttons' ) ) { 215 222 include( ABSPATH . 'wp-admin/includes/media.php' ); 223 } 216 224 217 225 echo '<div id="wp-' . $editor_id_attr . '-media-buttons" class="wp-media-buttons">'; … … 251 259 * @param string $output Editor's HTML markup. 252 260 */ 253 $the_editor = apply_filters( 'the_editor', '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' . 261 $the_editor = apply_filters( 262 'the_editor', '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' . 254 263 $quicktags_toolbar . 255 264 '<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' . 256 'id="' . $editor_id_attr . '">%s</textarea></div>' ); 265 'id="' . $editor_id_attr . '">%s</textarea></div>' 266 ); 257 267 258 268 // Prepare the content for the Visual or Text editor, only when TinyMCE is used (back-compat). … … 305 315 * @param array $set 306 316 */ 307 public static function editor_settings( $editor_id, $set) {317 public static function editor_settings( $editor_id, $set ) { 308 318 global $tinymce_version; 309 319 310 if ( empty( self::$first_init) ) {320 if ( empty( self::$first_init ) ) { 311 321 if ( is_admin() ) { 312 322 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 ); … … 321 331 322 332 $qtInit = array( 323 'id' => $editor_id,324 'buttons' => '' 333 'id' => $editor_id, 334 'buttons' => '', 325 335 ); 326 336 327 if ( is_array($set['quicktags']) ) 328 $qtInit = array_merge($qtInit, $set['quicktags']); 329 330 if ( empty($qtInit['buttons']) ) 337 if ( is_array( $set['quicktags'] ) ) { 338 $qtInit = array_merge( $qtInit, $set['quicktags'] ); 339 } 340 341 if ( empty( $qtInit['buttons'] ) ) { 331 342 $qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close'; 343 } 332 344 333 345 if ( $set['_content_editor_dfw'] ) { … … 345 357 $qtInit = apply_filters( 'quicktags_settings', $qtInit, $editor_id ); 346 358 347 self::$qt_settings[ $editor_id] = $qtInit;348 349 self::$qt_buttons = array_merge( self::$qt_buttons, explode( ',', $qtInit['buttons']) );359 self::$qt_settings[ $editor_id ] = $qtInit; 360 361 self::$qt_buttons = array_merge( self::$qt_buttons, explode( ',', $qtInit['buttons'] ) ); 350 362 } 351 363 … … 353 365 354 366 if ( empty( self::$first_init ) ) { 355 $baseurl = self::get_baseurl();356 $mce_locale = self::get_mce_locale();367 $baseurl = self::get_baseurl(); 368 $mce_locale = self::get_mce_locale(); 357 369 $ext_plugins = ''; 358 370 … … 429 441 // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. 430 442 // It can be added with 'mce_external_plugins'. 431 unset( $plugins[ $key] );443 unset( $plugins[ $key ] ); 432 444 } 433 445 … … 450 462 451 463 $loaded_langs = array(); 452 $strings = '';464 $strings = ''; 453 465 454 466 if ( ! empty( $mce_external_languages ) ) { … … 456 468 if ( @is_file( $path ) && @is_readable( $path ) ) { 457 469 include_once( $path ); 458 $ext_plugins .= $strings . "\n";470 $ext_plugins .= $strings . "\n"; 459 471 $loaded_langs[] = $name; 460 472 } … … 468 480 } 469 481 470 $url = set_url_scheme( $url );482 $url = set_url_scheme( $url ); 471 483 $mce_external_plugins[ $name ] = $url; 472 $plugurl = dirname( $url );473 $strings = '';484 $plugurl = dirname( $url ); 485 $strings = ''; 474 486 475 487 // Try to load langs/[locale].js and langs/[locale]_dlg.js … … 478 490 $path = WP_CONTENT_DIR . $path . '/langs/'; 479 491 480 if ( function_exists('realpath') ) 481 $path = trailingslashit( realpath($path) ); 482 483 if ( @is_file( $path . $mce_locale . '.js' ) ) 492 if ( function_exists( 'realpath' ) ) { 493 $path = trailingslashit( realpath( $path ) ); 494 } 495 496 if ( @is_file( $path . $mce_locale . '.js' ) ) { 484 497 $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n"; 485 486 if ( @is_file( $path . $mce_locale . '_dlg.js' ) ) 498 } 499 500 if ( @is_file( $path . $mce_locale . '_dlg.js' ) ) { 487 501 $strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n"; 502 } 488 503 489 504 if ( 'en' != $mce_locale && empty( $strings ) ) { 490 505 if ( @is_file( $path . 'en.js' ) ) { 491 $str1 = @file_get_contents( $path . 'en.js' );506 $str1 = @file_get_contents( $path . 'en.js' ); 492 507 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; 493 508 } 494 509 495 510 if ( @is_file( $path . 'en_dlg.js' ) ) { 496 $str2 = @file_get_contents( $path . 'en_dlg.js' );511 $str2 = @file_get_contents( $path . 'en_dlg.js' ); 497 512 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n"; 498 513 } 499 514 } 500 515 501 if ( ! empty( $strings ) ) 516 if ( ! empty( $strings ) ) { 502 517 $ext_plugins .= "\n" . $strings . "\n"; 518 } 503 519 } 504 520 … … 509 525 } 510 526 511 self::$plugins = $plugins;527 self::$plugins = $plugins; 512 528 self::$ext_plugins = $ext_plugins; 513 529 514 $settings = self::default_settings();530 $settings = self::default_settings(); 515 531 $settings['plugins'] = implode( ',', $plugins ); 516 532 … … 524 540 } 525 541 526 $mce_css = $settings['content_css'];542 $mce_css = $settings['content_css']; 527 543 $editor_styles = get_editor_stylesheets(); 528 544 … … 566 582 * @param string $editor_id Unique editor identifier, e.g. 'content'. 567 583 */ 568 $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen'), $editor_id );584 $mce_buttons = apply_filters( 'teeny_mce_buttons', array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' ), $editor_id ); 569 585 $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array(); 570 586 } else { … … 635 651 if ( post_type_supports( $post->post_type, 'post-formats' ) ) { 636 652 $post_format = get_post_format( $post ); 637 if ( $post_format && ! is_wp_error( $post_format ) ) 653 if ( $post_format && ! is_wp_error( $post_format ) ) { 638 654 $body_class .= ' post-format-' . sanitize_html_class( $post_format ); 639 else655 } else { 640 656 $body_class .= ' post-format-standard'; 657 } 641 658 } 642 659 … … 645 662 if ( $page_template !== false ) { 646 663 $page_template = empty( $page_template ) ? 'default' : str_replace( '.', '-', basename( $page_template, '.php' ) ); 647 $body_class .= ' page-template-' . sanitize_html_class( $page_template );664 $body_class .= ' page-template-' . sanitize_html_class( $page_template ); 648 665 } 649 666 } … … 656 673 } 657 674 658 $mceInit = array (659 'selector' => "#$editor_id",660 'wpautop' => (bool) $set['wpautop'],661 'indent' => ! $set['wpautop'],662 'toolbar1' => implode( ',', $mce_buttons ),663 'toolbar2' => implode( ',', $mce_buttons_2 ),664 'toolbar3' => implode( ',', $mce_buttons_3 ),665 'toolbar4' => implode( ',', $mce_buttons_4 ),675 $mceInit = array( 676 'selector' => "#$editor_id", 677 'wpautop' => (bool) $set['wpautop'], 678 'indent' => ! $set['wpautop'], 679 'toolbar1' => implode( ',', $mce_buttons ), 680 'toolbar2' => implode( ',', $mce_buttons_2 ), 681 'toolbar3' => implode( ',', $mce_buttons_3 ), 682 'toolbar4' => implode( ',', $mce_buttons_4 ), 666 683 'tabfocus_elements' => $set['tabfocus_elements'], 667 'body_class' => $body_class684 'body_class' => $body_class, 668 685 ); 669 686 … … 671 688 $mceInit = array_merge( self::$first_init, $mceInit ); 672 689 673 if ( is_array( $set['tinymce'] ) ) 690 if ( is_array( $set['tinymce'] ) ) { 674 691 $mceInit = array_merge( $mceInit, $set['tinymce'] ); 692 } 675 693 676 694 /* … … 711 729 } 712 730 713 self::$mce_settings[ $editor_id] = $mceInit;731 self::$mce_settings[ $editor_id ] = $mceInit; 714 732 } // end if self::$this_tinymce 715 733 } 716 734 717 735 /** 718 *719 736 * @static 720 737 * @param array $init … … 726 743 foreach ( $init as $key => $value ) { 727 744 if ( is_bool( $value ) ) { 728 $val = $value ? 'true' : 'false';745 $val = $value ? 'true' : 'false'; 729 746 $options .= $key . ':' . $val . ','; 730 747 continue; … … 744 761 745 762 /** 746 *747 763 * @static 748 * 764 * 749 765 * @param bool $default_scripts Optional. Whether default scripts should be enqueued. Default false. 750 766 */ … … 784 800 * and Quicktags are being loaded. 785 801 */ 786 do_action( 'wp_enqueue_editor', array( 787 'tinymce' => ( $default_scripts || self::$has_tinymce ), 788 'quicktags' => ( $default_scripts || self::$has_quicktags ), 789 ) ); 802 do_action( 803 'wp_enqueue_editor', array( 804 'tinymce' => ( $default_scripts || self::$has_tinymce ), 805 'quicktags' => ( $default_scripts || self::$has_quicktags ), 806 ) 807 ); 790 808 } 791 809 … … 819 837 * 820 838 * @since 4.8.0 821 *822 839 */ 823 840 public static function print_default_editor_scripts() { … … 827 844 $settings = self::default_settings(); 828 845 829 $settings['toolbar1'] = 'bold,italic,bullist,numlist,link';830 $settings['wpautop'] = false;831 $settings['indent'] = true;846 $settings['toolbar1'] = 'bold,italic,bullist,numlist,link'; 847 $settings['wpautop'] = false; 848 $settings['indent'] = true; 832 849 $settings['elementpath'] = false; 833 850 … … 839 856 // The 'wpview', 'wpdialogs', and 'media' TinyMCE plugins are not initialized by default. 840 857 // Can be added from js by using the 'wp-before-tinymce-init' event. 841 $settings['plugins'] = implode( ',', array( 842 'charmap', 843 'colorpicker', 844 'hr', 845 'lists', 846 'paste', 847 'tabfocus', 848 'textcolor', 849 'fullscreen', 850 'wordpress', 851 'wpautoresize', 852 'wpeditimage', 853 'wpemoji', 854 'wpgallery', 855 'wplink', 856 'wptextpattern', 857 ) ); 858 $settings['plugins'] = implode( 859 ',', array( 860 'charmap', 861 'colorpicker', 862 'hr', 863 'lists', 864 'paste', 865 'tabfocus', 866 'textcolor', 867 'fullscreen', 868 'wordpress', 869 'wpautoresize', 870 'wpeditimage', 871 'wpemoji', 872 'wpgallery', 873 'wplink', 874 'wptextpattern', 875 ) 876 ); 858 877 859 878 $settings = self::_parse_init( $settings ); … … 878 897 879 898 if ( $user_can_richedit ) { 880 $suffix = SCRIPT_DEBUG ? '' : '.min';899 $suffix = SCRIPT_DEBUG ? '' : '.min'; 881 900 $baseurl = self::get_baseurl(); 882 901 … … 912 931 public static function get_mce_locale() { 913 932 if ( empty( self::$mce_locale ) ) { 914 $mce_locale = get_user_locale();933 $mce_locale = get_user_locale(); 915 934 self::$mce_locale = empty( $mce_locale ) ? 'en' : strtolower( substr( $mce_locale, 0, 2 ) ); // ISO 639-1 916 935 } … … 942 961 foreach ( self::get_translation() as $name => $value ) { 943 962 if ( is_array( $value ) ) { 944 $shortcut_labels[ $name] = $value[1];963 $shortcut_labels[ $name ] = $value[1]; 945 964 } 946 965 } 947 966 948 967 $settings = array( 949 'theme' => 'modern',950 'skin' => 'lightgray',951 'language' => self::get_mce_locale(),952 'formats' => '{' .968 'theme' => 'modern', 969 'skin' => 'lightgray', 970 'language' => self::get_mce_locale(), 971 'formats' => '{' . 953 972 'alignleft: [' . 954 973 '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"left"}},' . … … 965 984 'strikethrough: {inline: "del"}' . 966 985 '}', 967 'relative_urls' => false,968 'remove_script_host' => false,969 'convert_urls' => false,970 'browser_spellcheck' => true,971 'fix_list_elements' => true,972 'entities' => '38,amp,60,lt,62,gt',973 'entity_encoding' => 'raw',974 'keep_styles' => false,975 'cache_suffix' => 'wp-mce-' . $tinymce_version,976 'resize' => 'vertical',977 'menubar' => false,978 'branding' => false,986 'relative_urls' => false, 987 'remove_script_host' => false, 988 'convert_urls' => false, 989 'browser_spellcheck' => true, 990 'fix_list_elements' => true, 991 'entities' => '38,amp,60,lt,62,gt', 992 'entity_encoding' => 'raw', 993 'keep_styles' => false, 994 'cache_suffix' => 'wp-mce-' . $tinymce_version, 995 'resize' => 'vertical', 996 'menubar' => false, 997 'branding' => false, 979 998 980 999 // Limit the preview styles in the menu/toolbar 981 'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform',1000 'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform', 982 1001 983 1002 'end_container_on_empty_block' => true, 984 'wpeditimage_html5_captions' => true,985 'wp_lang_attr' => get_bloginfo( 'language' ),986 'wp_keep_scroll_position' => false,987 'wp_shortcut_labels' => wp_json_encode( $shortcut_labels ),1003 'wpeditimage_html5_captions' => true, 1004 'wp_lang_attr' => get_bloginfo( 'language' ), 1005 'wp_keep_scroll_position' => false, 1006 'wp_shortcut_labels' => wp_json_encode( $shortcut_labels ), 988 1007 ); 989 1008 990 $suffix = SCRIPT_DEBUG ? '' : '.min';1009 $suffix = SCRIPT_DEBUG ? '' : '.min'; 991 1010 $version = 'ver=' . get_bloginfo( 'version' ); 992 1011 … … 1001 1020 if ( empty( self::$translation ) ) { 1002 1021 self::$translation = array( 1003 // Default TinyMCE strings1004 'New document'=> __( 'New document' ),1005 'Formats'=> _x( 'Formats', 'TinyMCE' ),1006 1007 'Headings'=> _x( 'Headings', 'TinyMCE' ),1008 'Heading 1'=> array( __( 'Heading 1' ), 'access1' ),1009 'Heading 2'=> array( __( 'Heading 2' ), 'access2' ),1010 'Heading 3'=> array( __( 'Heading 3' ), 'access3' ),1011 'Heading 4'=> array( __( 'Heading 4' ), 'access4' ),1012 'Heading 5'=> array( __( 'Heading 5' ), 'access5' ),1013 'Heading 6'=> array( __( 'Heading 6' ), 'access6' ),1014 1015 /* translators: block tags */1016 'Blocks'=> _x( 'Blocks', 'TinyMCE' ),1017 'Paragraph'=> array( __( 'Paragraph' ), 'access7' ),1018 'Blockquote'=> array( __( 'Blockquote' ), 'accessQ' ),1019 'Div'=> _x( 'Div', 'HTML tag' ),1020 'Pre'=> _x( 'Pre', 'HTML tag' ),1021 'Preformatted'=> _x( 'Preformatted', 'HTML tag' ),1022 'Address'=> _x( 'Address', 'HTML tag' ),1023 1024 'Inline'=> _x( 'Inline', 'HTML elements' ),1025 'Underline'=> array( __( 'Underline' ), 'metaU' ),1026 'Strikethrough'=> array( __( 'Strikethrough' ), 'accessD' ),1027 'Subscript'=> __( 'Subscript' ),1028 'Superscript'=> __( 'Superscript' ),1029 'Clear formatting'=> __( 'Clear formatting' ),1030 'Bold'=> array( __( 'Bold' ), 'metaB' ),1031 'Italic'=> array( __( 'Italic' ), 'metaI' ),1032 'Code'=> array( __( 'Code' ), 'accessX' ),1033 'Source code'=> __( 'Source code' ),1034 'Font Family'=> __( 'Font Family' ),1035 'Font Sizes'=> __( 'Font Sizes' ),1036 1037 'Align center'=> array( __( 'Align center' ), 'accessC' ),1038 'Align right'=> array( __( 'Align right' ), 'accessR' ),1039 'Align left'=> array( __( 'Align left' ), 'accessL' ),1040 'Justify'=> array( __( 'Justify' ), 'accessJ' ),1041 'Increase indent'=> __( 'Increase indent' ),1042 'Decrease indent'=> __( 'Decrease indent' ),1043 1044 'Cut'=> array( __( 'Cut' ), 'metaX' ),1045 'Copy'=> array( __( 'Copy' ), 'metaC' ),1046 'Paste'=> array( __( 'Paste' ), 'metaV' ),1047 'Select all'=> array( __( 'Select all' ), 'metaA' ),1048 'Undo'=> array( __( 'Undo' ), 'metaZ' ),1049 'Redo'=> array( __( 'Redo' ), 'metaY' ),1050 1051 'Ok'=> __( 'OK' ),1052 'Cancel'=> __( 'Cancel' ),1053 'Close'=> __( 'Close' ),1054 'Visual aids'=> __( 'Visual aids' ),1055 1056 'Bullet list'=> array( __( 'Bulleted list' ), 'accessU' ),1057 'Numbered list'=> array( __( 'Numbered list' ), 'accessO' ),1058 'Square'=> _x( 'Square', 'list style' ),1059 'Default'=> _x( 'Default', 'list style' ),1060 'Circle'=> _x( 'Circle', 'list style' ),1061 'Disc' => _x('Disc', 'list style' ),1062 'Lower Greek'=> _x( 'Lower Greek', 'list style' ),1063 'Lower Alpha'=> _x( 'Lower Alpha', 'list style' ),1064 'Upper Alpha'=> _x( 'Upper Alpha', 'list style' ),1065 'Upper Roman'=> _x( 'Upper Roman', 'list style' ),1066 'Lower Roman'=> _x( 'Lower Roman', 'list style' ),1067 1068 // Anchor plugin1069 'Name'=> _x( 'Name', 'Name of link anchor (TinyMCE)' ),1070 'Anchor'=> _x( 'Anchor', 'Link anchor (TinyMCE)' ),1071 'Anchors'=> _x( 'Anchors', 'Link anchors (TinyMCE)' ),1072 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' =>1073 __( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ),1074 'Id'=> _x( 'Id', 'Id for link anchor (TinyMCE)' ),1075 1076 // Fullpage plugin1077 'Document properties'=> __( 'Document properties' ),1078 'Robots'=> __( 'Robots' ),1079 'Title'=> __( 'Title' ),1080 'Keywords'=> __( 'Keywords' ),1081 'Encoding'=> __( 'Encoding' ),1082 'Description'=> __( 'Description' ),1083 'Author'=> __( 'Author' ),1084 1085 // Media, image plugins1086 'Image'=> __( 'Image' ),1087 'Insert/edit image'=> array( __( 'Insert/edit image' ), 'accessM' ),1088 'General'=> __( 'General' ),1089 'Advanced'=> __( 'Advanced' ),1090 'Source'=> __( 'Source' ),1091 'Border'=> __( 'Border' ),1092 'Constrain proportions'=> __( 'Constrain proportions' ),1093 'Vertical space'=> __( 'Vertical space' ),1094 'Image description'=> __( 'Image description' ),1095 'Style'=> __( 'Style' ),1096 'Dimensions'=> __( 'Dimensions' ),1097 'Insert image'=> __( 'Insert image' ),1098 'Date/time'=> __( 'Date/time' ),1099 'Insert date/time'=> __( 'Insert date/time' ),1100 'Table of Contents'=> __( 'Table of Contents' ),1101 'Insert/Edit code sample'=> __( 'Insert/edit code sample' ),1102 'Language'=> __( 'Language' ),1103 'Media'=> __( 'Media' ),1104 'Insert/edit media'=> __( 'Insert/edit media' ),1105 'Poster'=> __( 'Poster' ),1106 'Alternative source'=> __( 'Alternative source' ),1107 'Paste your embed code below:'=> __( 'Paste your embed code below:' ),1108 'Insert video'=> __( 'Insert video' ),1109 'Embed'=> __( 'Embed' ),1110 1111 // Each of these have a corresponding plugin1112 'Special character'=> __( 'Special character' ),1113 'Right to left'=> _x( 'Right to left', 'editor button' ),1114 'Left to right'=> _x( 'Left to right', 'editor button' ),1115 'Emoticons'=> __( 'Emoticons' ),1116 'Nonbreaking space'=> __( 'Nonbreaking space' ),1117 'Page break'=> __( 'Page break' ),1118 'Paste as text'=> __( 'Paste as text' ),1119 'Preview'=> __( 'Preview' ),1120 'Print'=> __( 'Print' ),1121 'Save'=> __( 'Save' ),1122 'Fullscreen'=> __( 'Fullscreen' ),1123 'Horizontal line'=> __( 'Horizontal line' ),1124 'Horizontal space'=> __( 'Horizontal space' ),1125 'Restore last draft'=> __( 'Restore last draft' ),1126 'Insert/edit link'=> array( __( 'Insert/edit link' ), 'metaK' ),1127 'Remove link'=> array( __( 'Remove link' ), 'accessS' ),1128 1129 // Link plugin1130 'Link'=> __( 'Link' ),1131 'Insert link'=> __( 'Insert link' ),1132 'Insert/edit link'=> __( 'Insert/edit link' ),1133 'Target'=> __( 'Target' ),1134 'New window'=> __( 'New window' ),1135 'Text to display'=> __( 'Text to display' ),1136 'Url'=> __( 'URL' ),1137 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' =>1138 __( 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' ),1139 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' =>1140 __( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' ),1141 1142 'Color'=> __( 'Color' ),1143 'Custom color'=> __( 'Custom color' ),1144 'Custom...'=> _x( 'Custom...', 'label for custom color' ), // no ellipsis1145 'No color'=> __( 'No color' ),1146 'R'=> _x( 'R', 'Short for red in RGB' ),1147 'G'=> _x( 'G', 'Short for green in RGB' ),1148 'B'=> _x( 'B', 'Short for blue in RGB' ),1149 1150 // Spelling, search/replace plugins1151 'Could not find the specified string.' => __( 'Could not find the specified string.' ),1152 'Replace'=> _x( 'Replace', 'find/replace' ),1153 'Next'=> _x( 'Next', 'find/replace' ),1154 /* translators: previous */1155 'Prev'=> _x( 'Prev', 'find/replace' ),1156 'Whole words'=> _x( 'Whole words', 'find/replace' ),1157 'Find and replace'=> __( 'Find and replace' ),1158 'Replace with' => _x('Replace with', 'find/replace' ),1159 'Find'=> _x( 'Find', 'find/replace' ),1160 'Replace all'=> _x( 'Replace all', 'find/replace' ),1161 'Match case'=> __( 'Match case' ),1162 'Spellcheck'=> __( 'Check Spelling' ),1163 'Finish'=> _x( 'Finish', 'spellcheck' ),1164 'Ignore all'=> _x( 'Ignore all', 'spellcheck' ),1165 'Ignore'=> _x( 'Ignore', 'spellcheck' ),1166 'Add to Dictionary'=> __( 'Add to Dictionary' ),1167 1168 // TinyMCE tables1169 'Insert table'=> __( 'Insert table' ),1170 'Delete table'=> __( 'Delete table' ),1171 'Table properties'=> __( 'Table properties' ),1172 'Row properties'=> __( 'Table row properties' ),1173 'Cell properties'=> __( 'Table cell properties' ),1174 'Border color'=> __( 'Border color' ),1175 1176 'Row'=> __( 'Row' ),1177 'Rows'=> __( 'Rows' ),1178 'Column'=> _x( 'Column', 'table column' ),1179 'Cols'=> _x( 'Cols', 'table columns' ),1180 'Cell'=> _x( 'Cell', 'table cell' ),1181 'Header cell'=> __( 'Header cell' ),1182 'Header'=> _x( 'Header', 'table header' ),1183 'Body'=> _x( 'Body', 'table body' ),1184 'Footer'=> _x( 'Footer', 'table footer' ),1185 1186 'Insert row before'=> __( 'Insert row before' ),1187 'Insert row after'=> __( 'Insert row after' ),1188 'Insert column before'=> __( 'Insert column before' ),1189 'Insert column after'=> __( 'Insert column after' ),1190 'Paste row before'=> __( 'Paste table row before' ),1191 'Paste row after'=> __( 'Paste table row after' ),1192 'Delete row'=> __( 'Delete row' ),1193 'Delete column'=> __( 'Delete column' ),1194 'Cut row'=> __( 'Cut table row' ),1195 'Copy row'=> __( 'Copy table row' ),1196 'Merge cells'=> __( 'Merge table cells' ),1197 'Split cell'=> __( 'Split table cell' ),1198 1199 'Height'=> __( 'Height' ),1200 'Width'=> __( 'Width' ),1201 'Caption'=> __( 'Caption' ),1202 'Alignment'=> __( 'Alignment' ),1203 'H Align'=> _x( 'H Align', 'horizontal table cell alignment' ),1204 'Left'=> __( 'Left' ),1205 'Center'=> __( 'Center' ),1206 'Right'=> __( 'Right' ),1207 'None'=> _x( 'None', 'table cell alignment attribute' ),1208 'V Align'=> _x( 'V Align', 'vertical table cell alignment' ),1209 'Top'=> __( 'Top' ),1210 'Middle'=> __( 'Middle' ),1211 'Bottom'=> __( 'Bottom' ),1212 1213 'Row group'=> __( 'Row group' ),1214 'Column group'=> __( 'Column group' ),1215 'Row type'=> __( 'Row type' ),1216 'Cell type'=> __( 'Cell type' ),1217 'Cell padding'=> __( 'Cell padding' ),1218 'Cell spacing'=> __( 'Cell spacing' ),1219 'Scope'=> _x( 'Scope', 'table cell scope attribute' ),1220 1221 'Insert template'=> _x( 'Insert template', 'TinyMCE' ),1222 'Templates'=> _x( 'Templates', 'TinyMCE' ),1223 1224 'Background color'=> __( 'Background color' ),1225 'Text color'=> __( 'Text color' ),1226 'Show blocks'=> _x( 'Show blocks', 'editor button' ),1227 'Show invisible characters'=> __( 'Show invisible characters' ),1228 1229 /* translators: word count */1230 'Words: {0}'=> sprintf( __( 'Words: %s' ), '{0}' ),1231 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' =>1232 __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" .1233 __( 'If you’re looking to paste rich content from Microsoft Word, try turning this option off. The editor will clean up text pasted from Word automatically.' ),1234 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' =>1235 __( 'Rich Text Area. Press Alt-Shift-H for help.' ),1236 'Rich Text Area. Press Control-Option-H for help.' => __( 'Rich Text Area. Press Control-Option-H for help.' ),1237 'You have unsaved changes are you sure you want to navigate away?' =>1238 __( 'The changes you made will be lost if you navigate away from this page.' ),1239 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' =>1240 __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser’s edit menu instead.' ),1241 1242 // TinyMCE menus1243 'Insert'=> _x( 'Insert', 'TinyMCE menu' ),1244 'File'=> _x( 'File', 'TinyMCE menu' ),1245 'Edit'=> _x( 'Edit', 'TinyMCE menu' ),1246 'Tools'=> _x( 'Tools', 'TinyMCE menu' ),1247 'View'=> _x( 'View', 'TinyMCE menu' ),1248 'Table'=> _x( 'Table', 'TinyMCE menu' ),1249 'Format'=> _x( 'Format', 'TinyMCE menu' ),1250 1251 // WordPress strings1252 'Toolbar Toggle'=> array( __( 'Toolbar Toggle' ), 'accessZ' ),1253 'Insert Read More tag'=> array( __( 'Insert Read More tag' ), 'accessT' ),1254 'Insert Page Break tag'=> array( __( 'Insert Page Break tag' ), 'accessP' ),1255 'Read more...'=> __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis)1256 'Distraction-free writing mode'=> array( __( 'Distraction-free writing mode' ), 'accessW' ),1257 'No alignment'=> __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar1258 'Remove'=> __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar1259 'Edit '=> __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar1260 'Paste URL or type to search'=> __( 'Paste URL or type to search' ), // Placeholder for the inline link dialog1261 'Apply'=> __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog1262 'Link options'=> __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog1263 'Visual'=> _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label1264 'Text'=> _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), // Editor switch tab label1265 1266 // Shortcuts help modal1267 'Keyboard Shortcuts'=> array( __( 'Keyboard Shortcuts' ), 'accessH' ),1268 'Default shortcuts,'=> __( 'Default shortcuts,' ),1269 'Additional shortcuts,'=> __( 'Additional shortcuts,' ),1270 'Focus shortcuts:'=> __( 'Focus shortcuts:' ),1271 'Inline toolbar (when an image, link or preview is selected)' => __( 'Inline toolbar (when an image, link or preview is selected)' ),1272 'Editor menu (when enabled)'=> __( 'Editor menu (when enabled)' ),1273 'Editor toolbar'=> __( 'Editor toolbar' ),1274 'Elements path'=> __( 'Elements path' ),1275 'Ctrl + Alt + letter:'=> __( 'Ctrl + Alt + letter:' ),1276 'Shift + Alt + letter:'=> __( 'Shift + Alt + letter:' ),1277 'Cmd + letter:'=> __( 'Cmd + letter:' ),1278 'Ctrl + letter:'=> __( 'Ctrl + letter:' ),1279 'Letter'=> __( 'Letter' ),1280 'Action'=> __( 'Action' ),1281 'Warning: the link has been inserted but may have errors. Please test it.' => __( 'Warning: the link has been inserted but may have errors. Please test it.' ),1282 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' =>1283 __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ),1284 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' =>1285 __( 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' ),1286 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' =>1287 __( 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' ),1288 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' =>1289 __( 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' ),1022 // Default TinyMCE strings 1023 'New document' => __( 'New document' ), 1024 'Formats' => _x( 'Formats', 'TinyMCE' ), 1025 1026 'Headings' => _x( 'Headings', 'TinyMCE' ), 1027 'Heading 1' => array( __( 'Heading 1' ), 'access1' ), 1028 'Heading 2' => array( __( 'Heading 2' ), 'access2' ), 1029 'Heading 3' => array( __( 'Heading 3' ), 'access3' ), 1030 'Heading 4' => array( __( 'Heading 4' ), 'access4' ), 1031 'Heading 5' => array( __( 'Heading 5' ), 'access5' ), 1032 'Heading 6' => array( __( 'Heading 6' ), 'access6' ), 1033 1034 /* translators: block tags */ 1035 'Blocks' => _x( 'Blocks', 'TinyMCE' ), 1036 'Paragraph' => array( __( 'Paragraph' ), 'access7' ), 1037 'Blockquote' => array( __( 'Blockquote' ), 'accessQ' ), 1038 'Div' => _x( 'Div', 'HTML tag' ), 1039 'Pre' => _x( 'Pre', 'HTML tag' ), 1040 'Preformatted' => _x( 'Preformatted', 'HTML tag' ), 1041 'Address' => _x( 'Address', 'HTML tag' ), 1042 1043 'Inline' => _x( 'Inline', 'HTML elements' ), 1044 'Underline' => array( __( 'Underline' ), 'metaU' ), 1045 'Strikethrough' => array( __( 'Strikethrough' ), 'accessD' ), 1046 'Subscript' => __( 'Subscript' ), 1047 'Superscript' => __( 'Superscript' ), 1048 'Clear formatting' => __( 'Clear formatting' ), 1049 'Bold' => array( __( 'Bold' ), 'metaB' ), 1050 'Italic' => array( __( 'Italic' ), 'metaI' ), 1051 'Code' => array( __( 'Code' ), 'accessX' ), 1052 'Source code' => __( 'Source code' ), 1053 'Font Family' => __( 'Font Family' ), 1054 'Font Sizes' => __( 'Font Sizes' ), 1055 1056 'Align center' => array( __( 'Align center' ), 'accessC' ), 1057 'Align right' => array( __( 'Align right' ), 'accessR' ), 1058 'Align left' => array( __( 'Align left' ), 'accessL' ), 1059 'Justify' => array( __( 'Justify' ), 'accessJ' ), 1060 'Increase indent' => __( 'Increase indent' ), 1061 'Decrease indent' => __( 'Decrease indent' ), 1062 1063 'Cut' => array( __( 'Cut' ), 'metaX' ), 1064 'Copy' => array( __( 'Copy' ), 'metaC' ), 1065 'Paste' => array( __( 'Paste' ), 'metaV' ), 1066 'Select all' => array( __( 'Select all' ), 'metaA' ), 1067 'Undo' => array( __( 'Undo' ), 'metaZ' ), 1068 'Redo' => array( __( 'Redo' ), 'metaY' ), 1069 1070 'Ok' => __( 'OK' ), 1071 'Cancel' => __( 'Cancel' ), 1072 'Close' => __( 'Close' ), 1073 'Visual aids' => __( 'Visual aids' ), 1074 1075 'Bullet list' => array( __( 'Bulleted list' ), 'accessU' ), 1076 'Numbered list' => array( __( 'Numbered list' ), 'accessO' ), 1077 'Square' => _x( 'Square', 'list style' ), 1078 'Default' => _x( 'Default', 'list style' ), 1079 'Circle' => _x( 'Circle', 'list style' ), 1080 'Disc' => _x( 'Disc', 'list style' ), 1081 'Lower Greek' => _x( 'Lower Greek', 'list style' ), 1082 'Lower Alpha' => _x( 'Lower Alpha', 'list style' ), 1083 'Upper Alpha' => _x( 'Upper Alpha', 'list style' ), 1084 'Upper Roman' => _x( 'Upper Roman', 'list style' ), 1085 'Lower Roman' => _x( 'Lower Roman', 'list style' ), 1086 1087 // Anchor plugin 1088 'Name' => _x( 'Name', 'Name of link anchor (TinyMCE)' ), 1089 'Anchor' => _x( 'Anchor', 'Link anchor (TinyMCE)' ), 1090 'Anchors' => _x( 'Anchors', 'Link anchors (TinyMCE)' ), 1091 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' => 1092 __( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ), 1093 'Id' => _x( 'Id', 'Id for link anchor (TinyMCE)' ), 1094 1095 // Fullpage plugin 1096 'Document properties' => __( 'Document properties' ), 1097 'Robots' => __( 'Robots' ), 1098 'Title' => __( 'Title' ), 1099 'Keywords' => __( 'Keywords' ), 1100 'Encoding' => __( 'Encoding' ), 1101 'Description' => __( 'Description' ), 1102 'Author' => __( 'Author' ), 1103 1104 // Media, image plugins 1105 'Image' => __( 'Image' ), 1106 'Insert/edit image' => array( __( 'Insert/edit image' ), 'accessM' ), 1107 'General' => __( 'General' ), 1108 'Advanced' => __( 'Advanced' ), 1109 'Source' => __( 'Source' ), 1110 'Border' => __( 'Border' ), 1111 'Constrain proportions' => __( 'Constrain proportions' ), 1112 'Vertical space' => __( 'Vertical space' ), 1113 'Image description' => __( 'Image description' ), 1114 'Style' => __( 'Style' ), 1115 'Dimensions' => __( 'Dimensions' ), 1116 'Insert image' => __( 'Insert image' ), 1117 'Date/time' => __( 'Date/time' ), 1118 'Insert date/time' => __( 'Insert date/time' ), 1119 'Table of Contents' => __( 'Table of Contents' ), 1120 'Insert/Edit code sample' => __( 'Insert/edit code sample' ), 1121 'Language' => __( 'Language' ), 1122 'Media' => __( 'Media' ), 1123 'Insert/edit media' => __( 'Insert/edit media' ), 1124 'Poster' => __( 'Poster' ), 1125 'Alternative source' => __( 'Alternative source' ), 1126 'Paste your embed code below:' => __( 'Paste your embed code below:' ), 1127 'Insert video' => __( 'Insert video' ), 1128 'Embed' => __( 'Embed' ), 1129 1130 // Each of these have a corresponding plugin 1131 'Special character' => __( 'Special character' ), 1132 'Right to left' => _x( 'Right to left', 'editor button' ), 1133 'Left to right' => _x( 'Left to right', 'editor button' ), 1134 'Emoticons' => __( 'Emoticons' ), 1135 'Nonbreaking space' => __( 'Nonbreaking space' ), 1136 'Page break' => __( 'Page break' ), 1137 'Paste as text' => __( 'Paste as text' ), 1138 'Preview' => __( 'Preview' ), 1139 'Print' => __( 'Print' ), 1140 'Save' => __( 'Save' ), 1141 'Fullscreen' => __( 'Fullscreen' ), 1142 'Horizontal line' => __( 'Horizontal line' ), 1143 'Horizontal space' => __( 'Horizontal space' ), 1144 'Restore last draft' => __( 'Restore last draft' ), 1145 'Insert/edit link' => array( __( 'Insert/edit link' ), 'metaK' ), 1146 'Remove link' => array( __( 'Remove link' ), 'accessS' ), 1147 1148 // Link plugin 1149 'Link' => __( 'Link' ), 1150 'Insert link' => __( 'Insert link' ), 1151 'Insert/edit link' => __( 'Insert/edit link' ), 1152 'Target' => __( 'Target' ), 1153 'New window' => __( 'New window' ), 1154 'Text to display' => __( 'Text to display' ), 1155 'Url' => __( 'URL' ), 1156 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' => 1157 __( 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' ), 1158 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' => 1159 __( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' ), 1160 1161 'Color' => __( 'Color' ), 1162 'Custom color' => __( 'Custom color' ), 1163 'Custom...' => _x( 'Custom...', 'label for custom color' ), // no ellipsis 1164 'No color' => __( 'No color' ), 1165 'R' => _x( 'R', 'Short for red in RGB' ), 1166 'G' => _x( 'G', 'Short for green in RGB' ), 1167 'B' => _x( 'B', 'Short for blue in RGB' ), 1168 1169 // Spelling, search/replace plugins 1170 'Could not find the specified string.' => __( 'Could not find the specified string.' ), 1171 'Replace' => _x( 'Replace', 'find/replace' ), 1172 'Next' => _x( 'Next', 'find/replace' ), 1173 /* translators: previous */ 1174 'Prev' => _x( 'Prev', 'find/replace' ), 1175 'Whole words' => _x( 'Whole words', 'find/replace' ), 1176 'Find and replace' => __( 'Find and replace' ), 1177 'Replace with' => _x( 'Replace with', 'find/replace' ), 1178 'Find' => _x( 'Find', 'find/replace' ), 1179 'Replace all' => _x( 'Replace all', 'find/replace' ), 1180 'Match case' => __( 'Match case' ), 1181 'Spellcheck' => __( 'Check Spelling' ), 1182 'Finish' => _x( 'Finish', 'spellcheck' ), 1183 'Ignore all' => _x( 'Ignore all', 'spellcheck' ), 1184 'Ignore' => _x( 'Ignore', 'spellcheck' ), 1185 'Add to Dictionary' => __( 'Add to Dictionary' ), 1186 1187 // TinyMCE tables 1188 'Insert table' => __( 'Insert table' ), 1189 'Delete table' => __( 'Delete table' ), 1190 'Table properties' => __( 'Table properties' ), 1191 'Row properties' => __( 'Table row properties' ), 1192 'Cell properties' => __( 'Table cell properties' ), 1193 'Border color' => __( 'Border color' ), 1194 1195 'Row' => __( 'Row' ), 1196 'Rows' => __( 'Rows' ), 1197 'Column' => _x( 'Column', 'table column' ), 1198 'Cols' => _x( 'Cols', 'table columns' ), 1199 'Cell' => _x( 'Cell', 'table cell' ), 1200 'Header cell' => __( 'Header cell' ), 1201 'Header' => _x( 'Header', 'table header' ), 1202 'Body' => _x( 'Body', 'table body' ), 1203 'Footer' => _x( 'Footer', 'table footer' ), 1204 1205 'Insert row before' => __( 'Insert row before' ), 1206 'Insert row after' => __( 'Insert row after' ), 1207 'Insert column before' => __( 'Insert column before' ), 1208 'Insert column after' => __( 'Insert column after' ), 1209 'Paste row before' => __( 'Paste table row before' ), 1210 'Paste row after' => __( 'Paste table row after' ), 1211 'Delete row' => __( 'Delete row' ), 1212 'Delete column' => __( 'Delete column' ), 1213 'Cut row' => __( 'Cut table row' ), 1214 'Copy row' => __( 'Copy table row' ), 1215 'Merge cells' => __( 'Merge table cells' ), 1216 'Split cell' => __( 'Split table cell' ), 1217 1218 'Height' => __( 'Height' ), 1219 'Width' => __( 'Width' ), 1220 'Caption' => __( 'Caption' ), 1221 'Alignment' => __( 'Alignment' ), 1222 'H Align' => _x( 'H Align', 'horizontal table cell alignment' ), 1223 'Left' => __( 'Left' ), 1224 'Center' => __( 'Center' ), 1225 'Right' => __( 'Right' ), 1226 'None' => _x( 'None', 'table cell alignment attribute' ), 1227 'V Align' => _x( 'V Align', 'vertical table cell alignment' ), 1228 'Top' => __( 'Top' ), 1229 'Middle' => __( 'Middle' ), 1230 'Bottom' => __( 'Bottom' ), 1231 1232 'Row group' => __( 'Row group' ), 1233 'Column group' => __( 'Column group' ), 1234 'Row type' => __( 'Row type' ), 1235 'Cell type' => __( 'Cell type' ), 1236 'Cell padding' => __( 'Cell padding' ), 1237 'Cell spacing' => __( 'Cell spacing' ), 1238 'Scope' => _x( 'Scope', 'table cell scope attribute' ), 1239 1240 'Insert template' => _x( 'Insert template', 'TinyMCE' ), 1241 'Templates' => _x( 'Templates', 'TinyMCE' ), 1242 1243 'Background color' => __( 'Background color' ), 1244 'Text color' => __( 'Text color' ), 1245 'Show blocks' => _x( 'Show blocks', 'editor button' ), 1246 'Show invisible characters' => __( 'Show invisible characters' ), 1247 1248 /* translators: word count */ 1249 'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ), 1250 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => 1251 __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" . 1252 __( 'If you’re looking to paste rich content from Microsoft Word, try turning this option off. The editor will clean up text pasted from Word automatically.' ), 1253 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => 1254 __( 'Rich Text Area. Press Alt-Shift-H for help.' ), 1255 'Rich Text Area. Press Control-Option-H for help.' => __( 'Rich Text Area. Press Control-Option-H for help.' ), 1256 'You have unsaved changes are you sure you want to navigate away?' => 1257 __( 'The changes you made will be lost if you navigate away from this page.' ), 1258 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => 1259 __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser’s edit menu instead.' ), 1260 1261 // TinyMCE menus 1262 'Insert' => _x( 'Insert', 'TinyMCE menu' ), 1263 'File' => _x( 'File', 'TinyMCE menu' ), 1264 'Edit' => _x( 'Edit', 'TinyMCE menu' ), 1265 'Tools' => _x( 'Tools', 'TinyMCE menu' ), 1266 'View' => _x( 'View', 'TinyMCE menu' ), 1267 'Table' => _x( 'Table', 'TinyMCE menu' ), 1268 'Format' => _x( 'Format', 'TinyMCE menu' ), 1269 1270 // WordPress strings 1271 'Toolbar Toggle' => array( __( 'Toolbar Toggle' ), 'accessZ' ), 1272 'Insert Read More tag' => array( __( 'Insert Read More tag' ), 'accessT' ), 1273 'Insert Page Break tag' => array( __( 'Insert Page Break tag' ), 'accessP' ), 1274 'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis) 1275 'Distraction-free writing mode' => array( __( 'Distraction-free writing mode' ), 'accessW' ), 1276 'No alignment' => __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar 1277 'Remove' => __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar 1278 'Edit ' => __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar 1279 'Paste URL or type to search' => __( 'Paste URL or type to search' ), // Placeholder for the inline link dialog 1280 'Apply' => __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog 1281 'Link options' => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog 1282 'Visual' => _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label 1283 'Text' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), // Editor switch tab label 1284 1285 // Shortcuts help modal 1286 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ), 1287 'Default shortcuts,' => __( 'Default shortcuts,' ), 1288 'Additional shortcuts,' => __( 'Additional shortcuts,' ), 1289 'Focus shortcuts:' => __( 'Focus shortcuts:' ), 1290 'Inline toolbar (when an image, link or preview is selected)' => __( 'Inline toolbar (when an image, link or preview is selected)' ), 1291 'Editor menu (when enabled)' => __( 'Editor menu (when enabled)' ), 1292 'Editor toolbar' => __( 'Editor toolbar' ), 1293 'Elements path' => __( 'Elements path' ), 1294 'Ctrl + Alt + letter:' => __( 'Ctrl + Alt + letter:' ), 1295 'Shift + Alt + letter:' => __( 'Shift + Alt + letter:' ), 1296 'Cmd + letter:' => __( 'Cmd + letter:' ), 1297 'Ctrl + letter:' => __( 'Ctrl + letter:' ), 1298 'Letter' => __( 'Letter' ), 1299 'Action' => __( 'Action' ), 1300 'Warning: the link has been inserted but may have errors. Please test it.' => __( 'Warning: the link has been inserted but may have errors. Please test it.' ), 1301 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' => 1302 __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ), 1303 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' => 1304 __( 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' ), 1305 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' => 1306 __( 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' ), 1307 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' => 1308 __( 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' ), 1290 1309 ); 1291 1310 } … … 1334 1353 foreach ( $mce_translation as $name => $value ) { 1335 1354 if ( is_array( $value ) ) { 1336 $mce_translation[ $name] = $value[0];1355 $mce_translation[ $name ] = $value[0]; 1337 1356 } 1338 1357 } … … 1351 1370 // Remove strings that are not translated. 1352 1371 if ( $key === $value ) { 1353 unset( $mce_translation[ $key] );1372 unset( $mce_translation[ $key ] ); 1354 1373 continue; 1355 1374 } 1356 1375 1357 1376 if ( false !== strpos( $value, '&' ) ) { 1358 $mce_translation[ $key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );1377 $mce_translation[ $key ] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' ); 1359 1378 } 1360 1379 } … … 1398 1417 } 1399 1418 1400 $suffix = SCRIPT_DEBUG ? '' : '.min';1419 $suffix = SCRIPT_DEBUG ? '' : '.min'; 1401 1420 $version = 'ver=' . $tinymce_version; 1402 1421 $baseurl = self::get_baseurl(); 1403 1422 1404 $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'])1405 && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');1423 $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) 1424 && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ); 1406 1425 1407 1426 // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG) … … 1432 1451 if ( $tmce_on ) { 1433 1452 foreach ( self::$mce_settings as $editor_id => $init ) { 1434 $options = self::_parse_init( $init );1453 $options = self::_parse_init( $init ); 1435 1454 $mceInit .= "'$editor_id':{$options},"; 1436 1455 } … … 1451 1470 1452 1471 $ref = array( 1453 'plugins' => implode( ',', self::$plugins ),1454 'theme' => 'modern',1455 'language' => self::$mce_locale 1472 'plugins' => implode( ',', self::$plugins ), 1473 'theme' => 'modern', 1474 'language' => self::$mce_locale, 1456 1475 ); 1457 1476 1458 $suffix = SCRIPT_DEBUG ? '' : '.min';1477 $suffix = SCRIPT_DEBUG ? '' : '.min'; 1459 1478 $baseurl = self::get_baseurl(); 1460 1479 $version = 'ver=' . $tinymce_version; … … 1512 1531 <?php 1513 1532 1514 if ( self::$ext_plugins ) 1533 if ( self::$ext_plugins ) { 1515 1534 echo self::$ext_plugins . "\n"; 1516 1517 if ( ! is_admin() ) 1535 } 1536 1537 if ( ! is_admin() ) { 1518 1538 echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";'; 1539 } 1519 1540 1520 1541 ?> … … 1592 1613 */ 1593 1614 public static function wp_link_query( $args = array() ) { 1594 $pts = get_post_types( array( 'public' => true ), 'objects' );1615 $pts = get_post_types( array( 'public' => true ), 'objects' ); 1595 1616 $pt_names = array_keys( $pts ); 1596 1617 1597 1618 $query = array( 1598 'post_type' => $pt_names,1599 'suppress_filters' => true,1619 'post_type' => $pt_names, 1620 'suppress_filters' => true, 1600 1621 'update_post_term_cache' => false, 1601 1622 'update_post_meta_cache' => false, 1602 'post_status' => 'publish',1603 'posts_per_page' => 20,1623 'post_status' => 'publish', 1624 'posts_per_page' => 20, 1604 1625 ); 1605 1626 1606 1627 $args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1; 1607 1628 1608 if ( isset( $args['s'] ) ) 1629 if ( isset( $args['s'] ) ) { 1609 1630 $query['s'] = $args['s']; 1631 } 1610 1632 1611 1633 $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0; … … 1626 1648 // Do main query. 1627 1649 $get_posts = new WP_Query; 1628 $posts = $get_posts->query( $query );1650 $posts = $get_posts->query( $query ); 1629 1651 1630 1652 // Build results. 1631 1653 $results = array(); 1632 1654 foreach ( $posts as $post ) { 1633 if ( 'post' == $post->post_type ) 1655 if ( 'post' == $post->post_type ) { 1634 1656 $info = mysql2date( __( 'Y/m/d' ), $post->post_date ); 1635 else1657 } else { 1636 1658 $info = $pts[ $post->post_type ]->labels->singular_name; 1659 } 1637 1660 1638 1661 $results[] = array( 1639 'ID' => $post->ID,1640 'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ),1662 'ID' => $post->ID, 1663 'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ), 1641 1664 'permalink' => get_permalink( $post->ID ), 1642 'info' => $info,1665 'info' => $info, 1643 1666 ); 1644 1667 } … … 1692 1715 <form id="wp-link" tabindex="-1"> 1693 1716 <?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?> 1694 <h1 id="link-modal-title"><?php _e( 'Insert/edit link' ) ?></h1>1717 <h1 id="link-modal-title"><?php _e( 'Insert/edit link' ); ?></h1> 1695 1718 <button type="button" id="wp-link-close"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button> 1696 1719 <div id="link-selector"> … … 1734 1757 <span class="spinner"></span> 1735 1758 </div> 1736 </div>1737 </div>1759 </div> 1760 </div> 1738 1761 </div> 1739 1762 <div class="submitbox">
Note: See TracChangeset
for help on using the changeset viewer.