23 private static $has_tinymce = false; |
23 private static $has_tinymce = false; |
24 private static $has_quicktags = false; |
24 private static $has_quicktags = false; |
25 private static $has_medialib = false; |
25 private static $has_medialib = false; |
26 private static $editor_buttons_css = true; |
26 private static $editor_buttons_css = true; |
27 private static $drag_drop_upload = false; |
27 private static $drag_drop_upload = false; |
28 private static $old_dfw_compat = false; |
|
29 private static $translation; |
28 private static $translation; |
30 private static $tinymce_scripts_printed = false; |
29 private static $tinymce_scripts_printed = false; |
31 private static $link_dialog_printed = false; |
30 private static $link_dialog_printed = false; |
32 |
31 |
33 private function __construct() {} |
32 private function __construct() {} |
34 |
33 |
35 /** |
34 /** |
36 * Parse default arguments for the editor instance. |
35 * Parse default arguments for the editor instance. |
37 * |
36 * |
38 * @param string $editor_id ID for the current editor instance. |
37 * @since 3.3.0 |
|
38 * |
|
39 * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances. |
|
40 * Should not contain square brackets. |
39 * @param array $settings { |
41 * @param array $settings { |
40 * Array of editor arguments. |
42 * Array of editor arguments. |
41 * |
43 * |
42 * @type bool $wpautop Whether to use wpautop(). Default true. |
44 * @type bool $wpautop Whether to use wpautop(). Default true. |
43 * @type bool $media_buttons Whether to show the Add Media/other media buttons. |
45 * @type bool $media_buttons Whether to show the Add Media/other media buttons. |
54 * @type string $editor_css Intended for extra styles for both Visual and Text editors. |
56 * @type string $editor_css Intended for extra styles for both Visual and Text editors. |
55 * Should include `<style>` tags, and can use "scoped". Default empty. |
57 * Should include `<style>` tags, and can use "scoped". Default empty. |
56 * @type string $editor_class Extra classes to add to the editor textarea element. Default empty. |
58 * @type string $editor_class Extra classes to add to the editor textarea element. Default empty. |
57 * @type bool $teeny Whether to output the minimal editor config. Examples include |
59 * @type bool $teeny Whether to output the minimal editor config. Examples include |
58 * Press This and the Comment editor. Default false. |
60 * Press This and the Comment editor. Default false. |
59 * @type bool $dfw Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js |
61 * @type bool $dfw Deprecated in 4.1. Unused. |
60 * for backward compatibility. |
|
61 * @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to |
62 * @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to |
62 * TinyMCE using an array. Default true. |
63 * TinyMCE using an array. Default true. |
63 * @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to |
64 * @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to |
64 * Quicktags using an array. Default true. |
65 * Quicktags using an array. Default true. |
65 * } |
66 * } |
147 } |
144 } |
148 |
145 |
149 /** |
146 /** |
150 * Outputs the HTML for a single instance of the editor. |
147 * Outputs the HTML for a single instance of the editor. |
151 * |
148 * |
152 * @param string $content The initial content of the editor. |
149 * @since 3.3.0 |
153 * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers). |
150 * |
154 * @param array $settings See _WP_Editors::parse_settings() for description. |
151 * @param string $content Initial content for the editor. |
|
152 * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances. |
|
153 * Should not contain square brackets. |
|
154 * @param array $settings See _WP_Editors::parse_settings() for description. |
155 */ |
155 */ |
156 public static function editor( $content, $editor_id, $settings = array() ) { |
156 public static function editor( $content, $editor_id, $settings = array() ) { |
157 $set = self::parse_settings( $editor_id, $settings ); |
157 $set = self::parse_settings( $editor_id, $settings ); |
158 $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"'; |
158 $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"'; |
159 $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : ''; |
159 $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : ''; |
160 $default_editor = 'html'; |
160 $default_editor = 'html'; |
161 $buttons = $autocomplete = ''; |
161 $buttons = ''; |
|
162 $autocomplete = ''; |
162 $editor_id_attr = esc_attr( $editor_id ); |
163 $editor_id_attr = esc_attr( $editor_id ); |
163 |
164 |
164 if ( $set['drag_drop_upload'] ) { |
165 if ( $set['drag_drop_upload'] ) { |
165 self::$drag_drop_upload = true; |
166 self::$drag_drop_upload = true; |
166 } |
167 } |
285 // Remove the filter as the next editor on the same page may not need it. |
286 // Remove the filter as the next editor on the same page may not need it. |
286 if ( self::$this_tinymce ) { |
287 if ( self::$this_tinymce ) { |
287 remove_filter( 'the_editor_content', 'format_for_editor' ); |
288 remove_filter( 'the_editor_content', 'format_for_editor' ); |
288 } |
289 } |
289 |
290 |
290 // Back-compat for the `htmledit_pre` and `richedit_pre` filters |
291 // Back-compat for the `htmledit_pre` and `richedit_pre` filters. |
291 if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) { |
292 if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) { |
292 /** This filter is documented in wp-includes/deprecated.php */ |
293 /** This filter is documented in wp-includes/deprecated.php */ |
293 $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' ); |
294 $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' ); |
294 } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) { |
295 } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) { |
295 /** This filter is documented in wp-includes/deprecated.php */ |
296 /** This filter is documented in wp-includes/deprecated.php */ |
305 |
306 |
306 self::editor_settings( $editor_id, $set ); |
307 self::editor_settings( $editor_id, $set ); |
307 } |
308 } |
308 |
309 |
309 /** |
310 /** |
310 * @global string $tinymce_version |
311 * @since 3.3.0 |
311 * |
312 * |
312 * @param string $editor_id |
313 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
313 * @param array $set |
314 * @param array $set Array of editor arguments. |
314 */ |
315 */ |
315 public static function editor_settings( $editor_id, $set ) { |
316 public static function editor_settings( $editor_id, $set ) { |
316 global $tinymce_version; |
|
317 |
|
318 if ( empty( self::$first_init ) ) { |
317 if ( empty( self::$first_init ) ) { |
319 if ( is_admin() ) { |
318 if ( is_admin() ) { |
320 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 ); |
319 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 ); |
321 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 ); |
320 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 ); |
322 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'enqueue_scripts' ), 1 ); |
321 add_action( 'admin_print_footer_scripts', array( __CLASS__, 'enqueue_scripts' ), 1 ); |
430 * |
445 * |
431 * The filter specifies which of the default plugins included |
446 * The filter specifies which of the default plugins included |
432 * in WordPress should be added to the TinyMCE instance. |
447 * in WordPress should be added to the TinyMCE instance. |
433 * |
448 * |
434 * @since 3.3.0 |
449 * @since 3.3.0 |
|
450 * @since 5.3.0 The `$editor_id` parameter was added. |
435 * |
451 * |
436 * @param array $plugins An array of default TinyMCE plugins. |
452 * @param array $plugins An array of default TinyMCE plugins. |
|
453 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' |
|
454 * when called from block editor's Classic block. |
437 */ |
455 */ |
438 $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) ); |
456 $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins, $editor_id ) ); |
439 |
457 |
440 if ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) { |
458 $key = array_search( 'spellchecker', $plugins, true ); |
|
459 if ( false !== $key ) { |
441 // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. |
460 // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. |
442 // It can be added with 'mce_external_plugins'. |
461 // It can be added with 'mce_external_plugins'. |
443 unset( $plugins[ $key ] ); |
462 unset( $plugins[ $key ] ); |
444 } |
463 } |
445 |
464 |
453 * |
472 * |
454 * The language file should follow the same format as wp_mce_translation(), |
473 * The language file should follow the same format as wp_mce_translation(), |
455 * and should define a variable ($strings) that holds all translated strings. |
474 * and should define a variable ($strings) that holds all translated strings. |
456 * |
475 * |
457 * @since 2.5.0 |
476 * @since 2.5.0 |
|
477 * @since 5.3.0 The `$editor_id` parameter was added. |
458 * |
478 * |
459 * @param array $translations Translations for external TinyMCE plugins. |
479 * @param array $translations Translations for external TinyMCE plugins. |
|
480 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
460 */ |
481 */ |
461 $mce_external_languages = apply_filters( 'mce_external_languages', array() ); |
482 $mce_external_languages = apply_filters( 'mce_external_languages', array(), $editor_id ); |
462 |
483 |
463 $loaded_langs = array(); |
484 $loaded_langs = array(); |
464 $strings = ''; |
485 $strings = ''; |
465 |
486 |
466 if ( ! empty( $mce_external_languages ) ) { |
487 if ( ! empty( $mce_external_languages ) ) { |
467 foreach ( $mce_external_languages as $name => $path ) { |
488 foreach ( $mce_external_languages as $name => $path ) { |
468 if ( @is_file( $path ) && @is_readable( $path ) ) { |
489 if ( @is_file( $path ) && @is_readable( $path ) ) { |
469 include_once( $path ); |
490 include_once $path; |
470 $ext_plugins .= $strings . "\n"; |
491 $ext_plugins .= $strings . "\n"; |
471 $loaded_langs[] = $name; |
492 $loaded_langs[] = $name; |
472 } |
493 } |
473 } |
494 } |
474 } |
495 } |
482 $url = set_url_scheme( $url ); |
503 $url = set_url_scheme( $url ); |
483 $mce_external_plugins[ $name ] = $url; |
504 $mce_external_plugins[ $name ] = $url; |
484 $plugurl = dirname( $url ); |
505 $plugurl = dirname( $url ); |
485 $strings = ''; |
506 $strings = ''; |
486 |
507 |
487 // Try to load langs/[locale].js and langs/[locale]_dlg.js |
508 // Try to load langs/[locale].js and langs/[locale]_dlg.js. |
488 if ( ! in_array( $name, $loaded_langs, true ) ) { |
509 if ( ! in_array( $name, $loaded_langs, true ) ) { |
489 $path = str_replace( content_url(), '', $plugurl ); |
510 $path = str_replace( content_url(), '', $plugurl ); |
490 $path = WP_CONTENT_DIR . $path . '/langs/'; |
511 $path = WP_CONTENT_DIR . $path . '/langs/'; |
491 |
512 |
492 if ( function_exists( 'realpath' ) ) { |
513 $path = trailingslashit( realpath( $path ) ); |
493 $path = trailingslashit( realpath( $path ) ); |
|
494 } |
|
495 |
514 |
496 if ( @is_file( $path . $mce_locale . '.js' ) ) { |
515 if ( @is_file( $path . $mce_locale . '.js' ) ) { |
497 $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n"; |
516 $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n"; |
498 } |
517 } |
499 |
518 |
500 if ( @is_file( $path . $mce_locale . '_dlg.js' ) ) { |
519 if ( @is_file( $path . $mce_locale . '_dlg.js' ) ) { |
501 $strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n"; |
520 $strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n"; |
502 } |
521 } |
503 |
522 |
504 if ( 'en' != $mce_locale && empty( $strings ) ) { |
523 if ( 'en' !== $mce_locale && empty( $strings ) ) { |
505 if ( @is_file( $path . 'en.js' ) ) { |
524 if ( @is_file( $path . 'en.js' ) ) { |
506 $str1 = @file_get_contents( $path . 'en.js' ); |
525 $str1 = @file_get_contents( $path . 'en.js' ); |
507 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; |
526 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; |
508 } |
527 } |
509 |
528 |
536 /** This filter is documented in wp-admin/includes/media.php */ |
555 /** This filter is documented in wp-admin/includes/media.php */ |
537 if ( apply_filters( 'disable_captions', '' ) ) { |
556 if ( apply_filters( 'disable_captions', '' ) ) { |
538 $settings['wpeditimage_disable_captions'] = true; |
557 $settings['wpeditimage_disable_captions'] = true; |
539 } |
558 } |
540 |
559 |
541 $mce_css = $settings['content_css']; |
560 $mce_css = $settings['content_css']; |
542 $editor_styles = get_editor_stylesheets(); |
561 |
543 |
562 /* |
544 if ( ! empty( $editor_styles ) ) { |
563 * The `editor-style.css` added by the theme is generally intended for the editor instance on the Edit Post screen. |
545 // Force urlencoding of commas. |
564 * Plugins that use wp_editor() on the front-end can decide whether to add the theme stylesheet |
546 foreach ( $editor_styles as $key => $url ) { |
565 * by using `get_editor_stylesheets()` and the `mce_css` or `tiny_mce_before_init` filters, see below. |
547 if ( strpos( $url, ',' ) !== false ) { |
566 */ |
548 $editor_styles[ $key ] = str_replace( ',', '%2C', $url ); |
567 if ( is_admin() ) { |
|
568 $editor_styles = get_editor_stylesheets(); |
|
569 |
|
570 if ( ! empty( $editor_styles ) ) { |
|
571 // Force urlencoding of commas. |
|
572 foreach ( $editor_styles as $key => $url ) { |
|
573 if ( strpos( $url, ',' ) !== false ) { |
|
574 $editor_styles[ $key ] = str_replace( ',', '%2C', $url ); |
|
575 } |
549 } |
576 } |
|
577 |
|
578 $mce_css .= ',' . implode( ',', $editor_styles ); |
550 } |
579 } |
551 |
|
552 $mce_css .= ',' . implode( ',', $editor_styles ); |
|
553 } |
580 } |
554 |
581 |
555 /** |
582 /** |
556 * Filters the comma-delimited list of stylesheets to load in TinyMCE. |
583 * Filters the comma-delimited list of stylesheets to load in TinyMCE. |
557 * |
584 * |
569 |
596 |
570 self::$first_init = $settings; |
597 self::$first_init = $settings; |
571 } |
598 } |
572 |
599 |
573 if ( $set['teeny'] ) { |
600 if ( $set['teeny'] ) { |
|
601 $mce_buttons = array( |
|
602 'bold', |
|
603 'italic', |
|
604 'underline', |
|
605 'blockquote', |
|
606 'strikethrough', |
|
607 'bullist', |
|
608 'numlist', |
|
609 'alignleft', |
|
610 'aligncenter', |
|
611 'alignright', |
|
612 'undo', |
|
613 'redo', |
|
614 'link', |
|
615 'fullscreen', |
|
616 ); |
574 |
617 |
575 /** |
618 /** |
576 * Filters the list of teenyMCE buttons (Text tab). |
619 * Filters the list of teenyMCE buttons (Text tab). |
577 * |
620 * |
578 * @since 2.7.0 |
621 * @since 2.7.0 |
|
622 * @since 3.3.0 The `$editor_id` parameter was added. |
579 * |
623 * |
580 * @param array $buttons An array of teenyMCE buttons. |
624 * @param array $mce_buttons An array of teenyMCE buttons. |
581 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
625 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
582 */ |
626 */ |
583 $mce_buttons = apply_filters( 'teeny_mce_buttons', array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' ), $editor_id ); |
627 $mce_buttons = apply_filters( 'teeny_mce_buttons', $mce_buttons, $editor_id ); |
584 $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array(); |
628 $mce_buttons_2 = array(); |
|
629 $mce_buttons_3 = array(); |
|
630 $mce_buttons_4 = array(); |
585 } else { |
631 } else { |
586 $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'wp_more', 'spellchecker' ); |
632 $mce_buttons = array( |
|
633 'formatselect', |
|
634 'bold', |
|
635 'italic', |
|
636 'bullist', |
|
637 'numlist', |
|
638 'blockquote', |
|
639 'alignleft', |
|
640 'aligncenter', |
|
641 'alignright', |
|
642 'link', |
|
643 'wp_more', |
|
644 'spellchecker', |
|
645 ); |
587 |
646 |
588 if ( ! wp_is_mobile() ) { |
647 if ( ! wp_is_mobile() ) { |
589 if ( $set['_content_editor_dfw'] ) { |
648 if ( $set['_content_editor_dfw'] ) { |
590 $mce_buttons[] = 'wp_adv'; |
649 $mce_buttons[] = 'wp_adv'; |
591 $mce_buttons[] = 'dfw'; |
650 $mce_buttons[] = 'dfw'; |
599 |
658 |
600 /** |
659 /** |
601 * Filters the first-row list of TinyMCE buttons (Visual tab). |
660 * Filters the first-row list of TinyMCE buttons (Visual tab). |
602 * |
661 * |
603 * @since 2.0.0 |
662 * @since 2.0.0 |
|
663 * @since 3.3.0 The `$editor_id` parameter was added. |
604 * |
664 * |
605 * @param array $buttons First-row list of buttons. |
665 * @param array $mce_buttons First-row list of buttons. |
606 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
666 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' |
|
667 * when called from block editor's Classic block. |
607 */ |
668 */ |
608 $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id ); |
669 $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id ); |
609 |
670 |
610 $mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' ); |
671 $mce_buttons_2 = array( |
|
672 'strikethrough', |
|
673 'hr', |
|
674 'forecolor', |
|
675 'pastetext', |
|
676 'removeformat', |
|
677 'charmap', |
|
678 'outdent', |
|
679 'indent', |
|
680 'undo', |
|
681 'redo', |
|
682 ); |
611 |
683 |
612 if ( ! wp_is_mobile() ) { |
684 if ( ! wp_is_mobile() ) { |
613 $mce_buttons_2[] = 'wp_help'; |
685 $mce_buttons_2[] = 'wp_help'; |
614 } |
686 } |
615 |
687 |
616 /** |
688 /** |
617 * Filters the second-row list of TinyMCE buttons (Visual tab). |
689 * Filters the second-row list of TinyMCE buttons (Visual tab). |
618 * |
690 * |
619 * @since 2.0.0 |
691 * @since 2.0.0 |
|
692 * @since 3.3.0 The `$editor_id` parameter was added. |
620 * |
693 * |
621 * @param array $buttons Second-row list of buttons. |
694 * @param array $mce_buttons_2 Second-row list of buttons. |
622 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
695 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' |
|
696 * when called from block editor's Classic block. |
623 */ |
697 */ |
624 $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); |
698 $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); |
625 |
699 |
626 /** |
700 /** |
627 * Filters the third-row list of TinyMCE buttons (Visual tab). |
701 * Filters the third-row list of TinyMCE buttons (Visual tab). |
628 * |
702 * |
629 * @since 2.0.0 |
703 * @since 2.0.0 |
|
704 * @since 3.3.0 The `$editor_id` parameter was added. |
630 * |
705 * |
631 * @param array $buttons Third-row list of buttons. |
706 * @param array $mce_buttons_3 Third-row list of buttons. |
632 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
707 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' |
|
708 * when called from block editor's Classic block. |
633 */ |
709 */ |
634 $mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id ); |
710 $mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id ); |
635 |
711 |
636 /** |
712 /** |
637 * Filters the fourth-row list of TinyMCE buttons (Visual tab). |
713 * Filters the fourth-row list of TinyMCE buttons (Visual tab). |
638 * |
714 * |
639 * @since 2.5.0 |
715 * @since 2.5.0 |
|
716 * @since 3.3.0 The `$editor_id` parameter was added. |
640 * |
717 * |
641 * @param array $buttons Fourth-row list of buttons. |
718 * @param array $mce_buttons_4 Fourth-row list of buttons. |
642 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
719 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' |
|
720 * when called from block editor's Classic block. |
643 */ |
721 */ |
644 $mce_buttons_4 = apply_filters( 'mce_buttons_4', array(), $editor_id ); |
722 $mce_buttons_4 = apply_filters( 'mce_buttons_4', array(), $editor_id ); |
645 } |
723 } |
646 |
724 |
647 $body_class = $editor_id; |
725 $body_class = $editor_id; |
648 |
726 |
649 if ( $post = get_post() ) { |
727 $post = get_post(); |
|
728 if ( $post ) { |
650 $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status ); |
729 $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status ); |
651 |
730 |
652 if ( post_type_supports( $post->post_type, 'post-formats' ) ) { |
731 if ( post_type_supports( $post->post_type, 'post-formats' ) ) { |
653 $post_format = get_post_format( $post ); |
732 $post_format = get_post_format( $post ); |
654 if ( $post_format && ! is_wp_error( $post_format ) ) { |
733 if ( $post_format && ! is_wp_error( $post_format ) ) { |
715 |
795 |
716 /** |
796 /** |
717 * Filters the TinyMCE config before init. |
797 * Filters the TinyMCE config before init. |
718 * |
798 * |
719 * @since 2.5.0 |
799 * @since 2.5.0 |
|
800 * @since 3.3.0 The `$editor_id` parameter was added. |
720 * |
801 * |
721 * @param array $mceInit An array with TinyMCE config. |
802 * @param array $mceInit An array with TinyMCE config. |
722 * @param string $editor_id Unique editor identifier, e.g. 'content'. |
803 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' |
|
804 * when called from block editor's Classic block. |
723 */ |
805 */ |
724 $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id ); |
806 $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id ); |
725 } |
807 } |
726 |
808 |
727 if ( empty( $mceInit['toolbar3'] ) && ! empty( $mceInit['toolbar4'] ) ) { |
809 if ( empty( $mceInit['toolbar3'] ) && ! empty( $mceInit['toolbar4'] ) ) { |
728 $mceInit['toolbar3'] = $mceInit['toolbar4']; |
810 $mceInit['toolbar3'] = $mceInit['toolbar4']; |
729 $mceInit['toolbar4'] = ''; |
811 $mceInit['toolbar4'] = ''; |
730 } |
812 } |
731 |
813 |
732 self::$mce_settings[ $editor_id ] = $mceInit; |
814 self::$mce_settings[ $editor_id ] = $mceInit; |
733 } // end if self::$this_tinymce |
815 } // End if self::$this_tinymce. |
734 } |
816 } |
735 |
817 |
736 /** |
818 /** |
|
819 * @since 3.3.0 |
|
820 * |
737 * @param array $init |
821 * @param array $init |
738 * @return string |
822 * @return string |
739 */ |
823 */ |
740 private static function _parse_init( $init ) { |
824 private static function _parse_init( $init ) { |
741 $options = ''; |
825 $options = ''; |
1012 ); |
1109 ); |
1013 |
1110 |
1014 $suffix = SCRIPT_DEBUG ? '' : '.min'; |
1111 $suffix = SCRIPT_DEBUG ? '' : '.min'; |
1015 $version = 'ver=' . get_bloginfo( 'version' ); |
1112 $version = 'ver=' . get_bloginfo( 'version' ); |
1016 |
1113 |
1017 // Default stylesheets |
1114 // Default stylesheets. |
1018 $settings['content_css'] = includes_url( "css/dashicons$suffix.css?$version" ) . ',' . |
1115 $settings['content_css'] = includes_url( "css/dashicons$suffix.css?$version" ) . ',' . |
1019 includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" ); |
1116 includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" ); |
1020 |
1117 |
1021 return $settings; |
1118 return $settings; |
1022 } |
1119 } |
1023 |
1120 |
|
1121 /** |
|
1122 * @since 4.7.0 |
|
1123 * |
|
1124 * @return array |
|
1125 */ |
1024 private static function get_translation() { |
1126 private static function get_translation() { |
1025 if ( empty( self::$translation ) ) { |
1127 if ( empty( self::$translation ) ) { |
1026 self::$translation = array( |
1128 self::$translation = array( |
1027 // Default TinyMCE strings |
1129 // Default TinyMCE strings. |
1028 'New document' => __( 'New document' ), |
1130 'New document' => __( 'New document' ), |
1029 'Formats' => _x( 'Formats', 'TinyMCE' ), |
1131 'Formats' => _x( 'Formats', 'TinyMCE' ), |
1030 |
1132 |
1031 'Headings' => _x( 'Headings', 'TinyMCE' ), |
1133 'Headings' => _x( 'Headings', 'TinyMCE' ), |
1032 'Heading 1' => array( __( 'Heading 1' ), 'access1' ), |
1134 'Heading 1' => array( __( 'Heading 1' ), 'access1' ), |
1034 'Heading 3' => array( __( 'Heading 3' ), 'access3' ), |
1136 'Heading 3' => array( __( 'Heading 3' ), 'access3' ), |
1035 'Heading 4' => array( __( 'Heading 4' ), 'access4' ), |
1137 'Heading 4' => array( __( 'Heading 4' ), 'access4' ), |
1036 'Heading 5' => array( __( 'Heading 5' ), 'access5' ), |
1138 'Heading 5' => array( __( 'Heading 5' ), 'access5' ), |
1037 'Heading 6' => array( __( 'Heading 6' ), 'access6' ), |
1139 'Heading 6' => array( __( 'Heading 6' ), 'access6' ), |
1038 |
1140 |
1039 /* translators: block tags */ |
1141 /* translators: Block tags. */ |
1040 'Blocks' => _x( 'Blocks', 'TinyMCE' ), |
1142 'Blocks' => _x( 'Blocks', 'TinyMCE' ), |
1041 'Paragraph' => array( __( 'Paragraph' ), 'access7' ), |
1143 'Paragraph' => array( __( 'Paragraph' ), 'access7' ), |
1042 'Blockquote' => array( __( 'Blockquote' ), 'accessQ' ), |
1144 'Blockquote' => array( __( 'Blockquote' ), 'accessQ' ), |
1043 'Div' => _x( 'Div', 'HTML tag' ), |
1145 'Div' => _x( 'Div', 'HTML tag' ), |
1044 'Pre' => _x( 'Pre', 'HTML tag' ), |
1146 'Pre' => _x( 'Pre', 'HTML tag' ), |
1087 'Lower Alpha' => _x( 'Lower Alpha', 'list style' ), |
1189 'Lower Alpha' => _x( 'Lower Alpha', 'list style' ), |
1088 'Upper Alpha' => _x( 'Upper Alpha', 'list style' ), |
1190 'Upper Alpha' => _x( 'Upper Alpha', 'list style' ), |
1089 'Upper Roman' => _x( 'Upper Roman', 'list style' ), |
1191 'Upper Roman' => _x( 'Upper Roman', 'list style' ), |
1090 'Lower Roman' => _x( 'Lower Roman', 'list style' ), |
1192 'Lower Roman' => _x( 'Lower Roman', 'list style' ), |
1091 |
1193 |
1092 // Anchor plugin |
1194 // Anchor plugin. |
1093 'Name' => _x( 'Name', 'Name of link anchor (TinyMCE)' ), |
1195 'Name' => _x( 'Name', 'Name of link anchor (TinyMCE)' ), |
1094 'Anchor' => _x( 'Anchor', 'Link anchor (TinyMCE)' ), |
1196 'Anchor' => _x( 'Anchor', 'Link anchor (TinyMCE)' ), |
1095 'Anchors' => _x( 'Anchors', 'Link anchors (TinyMCE)' ), |
1197 'Anchors' => _x( 'Anchors', 'Link anchors (TinyMCE)' ), |
1096 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' => |
1198 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' => |
1097 __( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ), |
1199 __( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ), |
1098 'Id' => _x( 'Id', 'Id for link anchor (TinyMCE)' ), |
1200 'Id' => _x( 'Id', 'Id for link anchor (TinyMCE)' ), |
1099 |
1201 |
1100 // Fullpage plugin |
1202 // Fullpage plugin. |
1101 'Document properties' => __( 'Document properties' ), |
1203 'Document properties' => __( 'Document properties' ), |
1102 'Robots' => __( 'Robots' ), |
1204 'Robots' => __( 'Robots' ), |
1103 'Title' => __( 'Title' ), |
1205 'Title' => __( 'Title' ), |
1104 'Keywords' => __( 'Keywords' ), |
1206 'Keywords' => __( 'Keywords' ), |
1105 'Encoding' => __( 'Encoding' ), |
1207 'Encoding' => __( 'Encoding' ), |
1106 'Description' => __( 'Description' ), |
1208 'Description' => __( 'Description' ), |
1107 'Author' => __( 'Author' ), |
1209 'Author' => __( 'Author' ), |
1108 |
1210 |
1109 // Media, image plugins |
1211 // Media, image plugins. |
1110 'Image' => __( 'Image' ), |
1212 'Image' => __( 'Image' ), |
1111 'Insert/edit image' => array( __( 'Insert/edit image' ), 'accessM' ), |
1213 'Insert/edit image' => array( __( 'Insert/edit image' ), 'accessM' ), |
1112 'General' => __( 'General' ), |
1214 'General' => __( 'General' ), |
1113 'Advanced' => __( 'Advanced' ), |
1215 'Advanced' => __( 'Advanced' ), |
1114 'Source' => __( 'Source' ), |
1216 'Source' => __( 'Source' ), |
1130 'Alternative source' => __( 'Alternative source' ), |
1232 'Alternative source' => __( 'Alternative source' ), |
1131 'Paste your embed code below:' => __( 'Paste your embed code below:' ), |
1233 'Paste your embed code below:' => __( 'Paste your embed code below:' ), |
1132 'Insert video' => __( 'Insert video' ), |
1234 'Insert video' => __( 'Insert video' ), |
1133 'Embed' => __( 'Embed' ), |
1235 'Embed' => __( 'Embed' ), |
1134 |
1236 |
1135 // Each of these have a corresponding plugin |
1237 // Each of these have a corresponding plugin. |
1136 'Special character' => __( 'Special character' ), |
1238 'Special character' => __( 'Special character' ), |
1137 'Right to left' => _x( 'Right to left', 'editor button' ), |
1239 'Right to left' => _x( 'Right to left', 'editor button' ), |
1138 'Left to right' => _x( 'Left to right', 'editor button' ), |
1240 'Left to right' => _x( 'Left to right', 'editor button' ), |
1139 'Emoticons' => __( 'Emoticons' ), |
1241 'Emoticons' => __( 'Emoticons' ), |
1140 'Nonbreaking space' => __( 'Nonbreaking space' ), |
1242 'Nonbreaking space' => __( 'Nonbreaking space' ), |
1148 'Horizontal space' => __( 'Horizontal space' ), |
1250 'Horizontal space' => __( 'Horizontal space' ), |
1149 'Restore last draft' => __( 'Restore last draft' ), |
1251 'Restore last draft' => __( 'Restore last draft' ), |
1150 'Insert/edit link' => array( __( 'Insert/edit link' ), 'metaK' ), |
1252 'Insert/edit link' => array( __( 'Insert/edit link' ), 'metaK' ), |
1151 'Remove link' => array( __( 'Remove link' ), 'accessS' ), |
1253 'Remove link' => array( __( 'Remove link' ), 'accessS' ), |
1152 |
1254 |
1153 // Link plugin |
1255 // Link plugin. |
1154 'Link' => __( 'Link' ), |
1256 'Link' => __( 'Link' ), |
1155 'Insert link' => __( 'Insert link' ), |
1257 'Insert link' => __( 'Insert link' ), |
1156 'Target' => __( 'Target' ), |
1258 'Target' => __( 'Target' ), |
1157 'New window' => __( 'New window' ), |
1259 'New window' => __( 'New window' ), |
1158 'Text to display' => __( 'Text to display' ), |
1260 'Text to display' => __( 'Text to display' ), |
1162 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' => |
1264 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' => |
1163 __( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' ), |
1265 __( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' ), |
1164 |
1266 |
1165 'Color' => __( 'Color' ), |
1267 'Color' => __( 'Color' ), |
1166 'Custom color' => __( 'Custom color' ), |
1268 'Custom color' => __( 'Custom color' ), |
1167 'Custom...' => _x( 'Custom...', 'label for custom color' ), // no ellipsis |
1269 'Custom...' => _x( 'Custom...', 'label for custom color' ), // No ellipsis. |
1168 'No color' => __( 'No color' ), |
1270 'No color' => __( 'No color' ), |
1169 'R' => _x( 'R', 'Short for red in RGB' ), |
1271 'R' => _x( 'R', 'Short for red in RGB' ), |
1170 'G' => _x( 'G', 'Short for green in RGB' ), |
1272 'G' => _x( 'G', 'Short for green in RGB' ), |
1171 'B' => _x( 'B', 'Short for blue in RGB' ), |
1273 'B' => _x( 'B', 'Short for blue in RGB' ), |
1172 |
1274 |
1173 // Spelling, search/replace plugins |
1275 // Spelling, search/replace plugins. |
1174 'Could not find the specified string.' => __( 'Could not find the specified string.' ), |
1276 'Could not find the specified string.' => __( 'Could not find the specified string.' ), |
1175 'Replace' => _x( 'Replace', 'find/replace' ), |
1277 'Replace' => _x( 'Replace', 'find/replace' ), |
1176 'Next' => _x( 'Next', 'find/replace' ), |
1278 'Next' => _x( 'Next', 'find/replace' ), |
1177 /* translators: previous */ |
1279 /* translators: Previous. */ |
1178 'Prev' => _x( 'Prev', 'find/replace' ), |
1280 'Prev' => _x( 'Prev', 'find/replace' ), |
1179 'Whole words' => _x( 'Whole words', 'find/replace' ), |
1281 'Whole words' => _x( 'Whole words', 'find/replace' ), |
1180 'Find and replace' => __( 'Find and replace' ), |
1282 'Find and replace' => __( 'Find and replace' ), |
1181 'Replace with' => _x( 'Replace with', 'find/replace' ), |
1283 'Replace with' => _x( 'Replace with', 'find/replace' ), |
1182 'Find' => _x( 'Find', 'find/replace' ), |
1284 'Find' => _x( 'Find', 'find/replace' ), |
1186 'Finish' => _x( 'Finish', 'spellcheck' ), |
1288 'Finish' => _x( 'Finish', 'spellcheck' ), |
1187 'Ignore all' => _x( 'Ignore all', 'spellcheck' ), |
1289 'Ignore all' => _x( 'Ignore all', 'spellcheck' ), |
1188 'Ignore' => _x( 'Ignore', 'spellcheck' ), |
1290 'Ignore' => _x( 'Ignore', 'spellcheck' ), |
1189 'Add to Dictionary' => __( 'Add to Dictionary' ), |
1291 'Add to Dictionary' => __( 'Add to Dictionary' ), |
1190 |
1292 |
1191 // TinyMCE tables |
1293 // TinyMCE tables. |
1192 'Insert table' => __( 'Insert table' ), |
1294 'Insert table' => __( 'Insert table' ), |
1193 'Delete table' => __( 'Delete table' ), |
1295 'Delete table' => __( 'Delete table' ), |
1194 'Table properties' => __( 'Table properties' ), |
1296 'Table properties' => __( 'Table properties' ), |
1195 'Row properties' => __( 'Table row properties' ), |
1297 'Row properties' => __( 'Table row properties' ), |
1196 'Cell properties' => __( 'Table cell properties' ), |
1298 'Cell properties' => __( 'Table cell properties' ), |
1247 'Background color' => __( 'Background color' ), |
1349 'Background color' => __( 'Background color' ), |
1248 'Text color' => __( 'Text color' ), |
1350 'Text color' => __( 'Text color' ), |
1249 'Show blocks' => _x( 'Show blocks', 'editor button' ), |
1351 'Show blocks' => _x( 'Show blocks', 'editor button' ), |
1250 'Show invisible characters' => __( 'Show invisible characters' ), |
1352 'Show invisible characters' => __( 'Show invisible characters' ), |
1251 |
1353 |
1252 /* translators: word count */ |
1354 /* translators: Word count. */ |
1253 'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ), |
1355 'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ), |
1254 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => |
1356 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => |
1255 __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" . |
1357 __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" . |
1256 __( '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.' ), |
1358 __( '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.' ), |
1257 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => |
1359 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => |
1260 'You have unsaved changes are you sure you want to navigate away?' => |
1362 'You have unsaved changes are you sure you want to navigate away?' => |
1261 __( 'The changes you made will be lost if you navigate away from this page.' ), |
1363 __( 'The changes you made will be lost if you navigate away from this page.' ), |
1262 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => |
1364 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => |
1263 __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser’s edit menu instead.' ), |
1365 __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser’s edit menu instead.' ), |
1264 |
1366 |
1265 // TinyMCE menus |
1367 // TinyMCE menus. |
1266 'Insert' => _x( 'Insert', 'TinyMCE menu' ), |
1368 'Insert' => _x( 'Insert', 'TinyMCE menu' ), |
1267 'File' => _x( 'File', 'TinyMCE menu' ), |
1369 'File' => _x( 'File', 'TinyMCE menu' ), |
1268 'Edit' => _x( 'Edit', 'TinyMCE menu' ), |
1370 'Edit' => _x( 'Edit', 'TinyMCE menu' ), |
1269 'Tools' => _x( 'Tools', 'TinyMCE menu' ), |
1371 'Tools' => _x( 'Tools', 'TinyMCE menu' ), |
1270 'View' => _x( 'View', 'TinyMCE menu' ), |
1372 'View' => _x( 'View', 'TinyMCE menu' ), |
1271 'Table' => _x( 'Table', 'TinyMCE menu' ), |
1373 'Table' => _x( 'Table', 'TinyMCE menu' ), |
1272 'Format' => _x( 'Format', 'TinyMCE menu' ), |
1374 'Format' => _x( 'Format', 'TinyMCE menu' ), |
1273 |
1375 |
1274 // WordPress strings |
1376 // WordPress strings. |
1275 'Toolbar Toggle' => array( __( 'Toolbar Toggle' ), 'accessZ' ), |
1377 'Toolbar Toggle' => array( __( 'Toolbar Toggle' ), 'accessZ' ), |
1276 'Insert Read More tag' => array( __( 'Insert Read More tag' ), 'accessT' ), |
1378 'Insert Read More tag' => array( __( 'Insert Read More tag' ), 'accessT' ), |
1277 'Insert Page Break tag' => array( __( 'Insert Page Break tag' ), 'accessP' ), |
1379 'Insert Page Break tag' => array( __( 'Insert Page Break tag' ), 'accessP' ), |
1278 'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis) |
1380 'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis). |
1279 'Distraction-free writing mode' => array( __( 'Distraction-free writing mode' ), 'accessW' ), |
1381 'Distraction-free writing mode' => array( __( 'Distraction-free writing mode' ), 'accessW' ), |
1280 'No alignment' => __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar |
1382 'No alignment' => __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar. |
1281 'Remove' => __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar |
1383 'Remove' => __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar. |
1282 'Edit|button' => __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar |
1384 'Edit|button' => __( 'Edit' ), // Tooltip for the 'edit' button in the image toolbar. |
1283 'Paste URL or type to search' => __( 'Paste URL or type to search' ), // Placeholder for the inline link dialog |
1385 'Paste URL or type to search' => __( 'Paste URL or type to search' ), // Placeholder for the inline link dialog. |
1284 'Apply' => __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog |
1386 'Apply' => __( 'Apply' ), // Tooltip for the 'apply' button in the inline link dialog. |
1285 'Link options' => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog |
1387 'Link options' => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog. |
1286 'Visual' => _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label |
1388 'Visual' => _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label. |
1287 'Text' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), // Editor switch tab label |
1389 'Text' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), // Editor switch tab label. |
1288 'Add Media' => array( __( 'Add Media' ), 'accessM' ), // Tooltip for the 'Add Media' button in the Block Editor Classic block |
1390 'Add Media' => array( __( 'Add Media' ), 'accessM' ), // Tooltip for the 'Add Media' button in the block editor Classic block. |
1289 |
1391 |
1290 // Shortcuts help modal |
1392 // Shortcuts help modal. |
1291 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ), |
1393 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ), |
1292 'Classic Block Keyboard Shortcuts' => __( 'Classic Block Keyboard Shortcuts' ), |
1394 'Classic Block Keyboard Shortcuts' => __( 'Classic Block Keyboard Shortcuts' ), |
1293 'Default shortcuts,' => __( 'Default shortcuts,' ), |
1395 'Default shortcuts,' => __( 'Default shortcuts,' ), |
1294 'Additional shortcuts,' => __( 'Additional shortcuts,' ), |
1396 'Additional shortcuts,' => __( 'Additional shortcuts,' ), |
1295 'Focus shortcuts:' => __( 'Focus shortcuts:' ), |
1397 'Focus shortcuts:' => __( 'Focus shortcuts:' ), |
1319 Imagetools plugin (not included): |
1421 Imagetools plugin (not included): |
1320 'Edit image' => __( 'Edit image' ), |
1422 'Edit image' => __( 'Edit image' ), |
1321 'Image options' => __( 'Image options' ), |
1423 'Image options' => __( 'Image options' ), |
1322 'Back' => __( 'Back' ), |
1424 'Back' => __( 'Back' ), |
1323 'Invert' => __( 'Invert' ), |
1425 'Invert' => __( 'Invert' ), |
1324 'Flip horizontally' => __( 'Flip horizontally' ), |
1426 'Flip horizontally' => __( 'Flip horizontal' ), |
1325 'Flip vertically' => __( 'Flip vertically' ), |
1427 'Flip vertically' => __( 'Flip vertical' ), |
1326 'Crop' => __( 'Crop' ), |
1428 'Crop' => __( 'Crop' ), |
1327 'Orientation' => __( 'Orientation' ), |
1429 'Orientation' => __( 'Orientation' ), |
1328 'Resize' => __( 'Resize' ), |
1430 'Resize' => __( 'Resize' ), |
1329 'Rotate clockwise' => __( 'Rotate clockwise' ), |
1431 'Rotate clockwise' => __( 'Rotate right' ), |
1330 'Rotate counterclockwise' => __( 'Rotate counterclockwise' ), |
1432 'Rotate counterclockwise' => __( 'Rotate left' ), |
1331 'Sharpen' => __( 'Sharpen' ), |
1433 'Sharpen' => __( 'Sharpen' ), |
1332 'Brightness' => __( 'Brightness' ), |
1434 'Brightness' => __( 'Brightness' ), |
1333 'Color levels' => __( 'Color levels' ), |
1435 'Color levels' => __( 'Color levels' ), |
1334 'Contrast' => __( 'Contrast' ), |
1436 'Contrast' => __( 'Contrast' ), |
1335 'Gamma' => __( 'Gamma' ), |
1437 'Gamma' => __( 'Gamma' ), |