Changeset 43914
- Timestamp:
- 11/21/2018 12:17:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/script-loader.php
r43905 r43914 487 487 * Adds inline scripts required for the TinyMCE in the block editor. 488 488 * 489 * These TinyMCE init settings are used to extend and override the default settings 490 * from `_WP_Editors::default_settings()` for the Classic block. 491 * 489 492 * @since 5.0.0 490 493 * … … 493 496 function wp_tinymce_inline_scripts() { 494 497 global $wp_scripts; 498 499 /** This filter is documented in wp-includes/class-wp-editor.php */ 500 $editor_settings = apply_filters( 'wp_editor_settings', array( 'tinymce' => true ), 'classic-block' ); 495 501 496 502 $tinymce_plugins = array( … … 519 525 $tinymce_plugins = array_unique( $tinymce_plugins ); 520 526 527 $disable_captions = false; 528 // Runs after `tiny_mce_plugins` but before `mce_buttons`. 529 /** This filter is documented in wp-admin/includes/media.php */ 530 if ( apply_filters( 'disable_captions', '' ) ) { 531 $disable_captions = true; 532 } 533 521 534 $toolbar1 = array( 522 535 'formatselect', … … 572 585 'classic_block_editor' => true, 573 586 ); 587 588 if ( $disable_captions ) { 589 $tinymce_settings['wpeditimage_disable_captions'] = true; 590 } 591 592 if ( ! empty( $editor_settings['tinymce'] ) && is_array( $editor_settings['tinymce'] ) ) { 593 array_merge( $tinymce_settings, $editor_settings['tinymce'] ); 594 } 574 595 575 596 /* This filter is documented in wp-includes/class-wp-editor.php */
Note: See TracChangeset
for help on using the changeset viewer.