Changeset 46737
- Timestamp:
- 11/16/2019 04:34:18 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-editor.php
r46675 r46737 76 76 * 77 77 * @param array $settings Array of editor arguments. 78 * @param string $editor_id ID for the current editor instance. 78 * @param string $editor_id ID for the current editor instance. Accepts 'classic-block' 79 * when called from block editor's Classic block. 79 80 */ 80 81 $settings = apply_filters( 'wp_editor_settings', $settings, $editor_id ); … … 376 377 * 377 378 * @since 2.7.0 379 * @since 3.3.0 The `$editor_id` parameter was added. 378 380 * 379 381 * @param array $plugins An array of teenyMCE plugins. 380 382 * @param string $editor_id Unique editor identifier, e.g. 'content'. 381 383 */ 382 $plugins = apply_filters( 'teeny_mce_plugins', array( 'colorpicker', 'lists', 'fullscreen', 'image', 'wordpress', 'wpeditimage', 'wplink' ), $editor_id ); 384 $plugins = apply_filters( 385 'teeny_mce_plugins', 386 array( 387 'colorpicker', 388 'lists', 389 'fullscreen', 390 'image', 391 'wordpress', 392 'wpeditimage', 393 'wplink', 394 ), 395 $editor_id 396 ); 383 397 } else { 384 398 … … 397 411 * 398 412 * @since 2.5.0 413 * @since 5.3.0 The `$editor_id` parameter was added. 399 414 * 400 * @param array $external_plugins An array of external TinyMCE plugins. 415 * @param array $external_plugins An array of external TinyMCE plugins. 416 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 417 * when called from block editor's Classic block. 401 418 */ 402 $mce_external_plugins = apply_filters( 'mce_external_plugins', array() );419 $mce_external_plugins = apply_filters( 'mce_external_plugins', array(), $editor_id ); 403 420 404 421 $plugins = array( … … 434 451 * 435 452 * @since 3.3.0 453 * @since 5.3.0 The `$editor_id` parameter was added. 436 454 * 437 * @param array $plugins An array of default TinyMCE plugins. 455 * @param array $plugins An array of default TinyMCE plugins. 456 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 457 * when called from block editor's Classic block. 438 458 */ 439 $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );459 $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins, $editor_id ) ); 440 460 441 461 $key = array_search( 'spellchecker', $plugins ); … … 458 478 * 459 479 * @since 2.5.0 480 * @since 5.3.0 The `$editor_id` parameter was added. 460 481 * 461 * @param array $translations Translations for external TinyMCE plugins. 482 * @param array $translations Translations for external TinyMCE plugins. 483 * @param string $editor_id Unique editor identifier, e.g. 'content'. 462 484 */ 463 $mce_external_languages = apply_filters( 'mce_external_languages', array() );485 $mce_external_languages = apply_filters( 'mce_external_languages', array(), $editor_id ); 464 486 465 487 $loaded_langs = array(); … … 578 600 579 601 if ( $set['teeny'] ) { 580 $mce_buttons = array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' ); 602 $mce_buttons = array( 603 'bold', 604 'italic', 605 'underline', 606 'blockquote', 607 'strikethrough', 608 'bullist', 609 'numlist', 610 'alignleft', 611 'aligncenter', 612 'alignright', 613 'undo', 614 'redo', 615 'link', 616 'fullscreen', 617 ); 581 618 582 619 /** … … 584 621 * 585 622 * @since 2.7.0 623 * @since 3.3.0 The `$editor_id` parameter was added. 586 624 * 587 625 * @param array $mce_buttons An array of teenyMCE buttons. … … 593 631 $mce_buttons_4 = array(); 594 632 } else { 595 $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'wp_more', 'spellchecker' ); 633 $mce_buttons = array( 634 'formatselect', 635 'bold', 636 'italic', 637 'bullist', 638 'numlist', 639 'blockquote', 640 'alignleft', 641 'aligncenter', 642 'alignright', 643 'link', 644 'wp_more', 645 'spellchecker', 646 ); 596 647 597 648 if ( ! wp_is_mobile() ) { … … 611 662 * 612 663 * @since 2.0.0 664 * @since 3.3.0 The `$editor_id` parameter was added. 613 665 * 614 666 * @param array $mce_buttons First-row list of buttons. 615 * @param string $editor_id Unique editor identifier, e.g. 'content'. 667 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 668 * when called from block editor's Classic block. 616 669 */ 617 670 $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id ); 618 671 619 $mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' ); 672 $mce_buttons_2 = array( 673 'strikethrough', 674 'hr', 675 'forecolor', 676 'pastetext', 677 'removeformat', 678 'charmap', 679 'outdent', 680 'indent', 681 'undo', 682 'redo', 683 ); 620 684 621 685 if ( ! wp_is_mobile() ) { … … 627 691 * 628 692 * @since 2.0.0 693 * @since 3.3.0 The `$editor_id` parameter was added. 629 694 * 630 695 * @param array $mce_buttons_2 Second-row list of buttons. 631 * @param string $editor_id Unique editor identifier, e.g. 'content'. 696 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 697 * when called from block editor's Classic block. 632 698 */ 633 699 $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); … … 637 703 * 638 704 * @since 2.0.0 705 * @since 3.3.0 The `$editor_id` parameter was added. 639 706 * 640 707 * @param array $mce_buttons_3 Third-row list of buttons. 641 * @param string $editor_id Unique editor identifier, e.g. 'content'. 708 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 709 * when called from block editor's Classic block. 642 710 */ 643 711 $mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id ); … … 647 715 * 648 716 * @since 2.5.0 717 * @since 3.3.0 The `$editor_id` parameter was added. 649 718 * 650 719 * @param array $mce_buttons_4 Fourth-row list of buttons. 651 * @param string $editor_id Unique editor identifier, e.g. 'content'. 720 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 721 * when called from block editor's Classic block. 652 722 */ 653 723 $mce_buttons_4 = apply_filters( 'mce_buttons_4', array(), $editor_id ); … … 717 787 * 718 788 * @since 2.7.0 789 * @since 3.3.0 The `$editor_id` parameter was added. 719 790 * 720 791 * @param array $mceInit An array with teenyMCE config. … … 728 799 * 729 800 * @since 2.5.0 801 * @since 3.3.0 The `$editor_id` parameter was added. 730 802 * 731 803 * @param array $mceInit An array with TinyMCE config. 732 * @param string $editor_id Unique editor identifier, e.g. 'content'. 804 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 805 * when called from block editor's Classic block. 733 806 */ 734 807 $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id );
Note: See TracChangeset
for help on using the changeset viewer.