Changeset 55648
- Timestamp:
- 04/12/2023 09:41:21 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-editor.php
r55646 r55648 330 330 if ( self::$this_quicktags ) { 331 331 332 $qt Init = array(332 $qt_init = array( 333 333 'id' => $editor_id, 334 334 'buttons' => '', … … 336 336 337 337 if ( is_array( $set['quicktags'] ) ) { 338 $qt Init = array_merge( $qtInit, $set['quicktags'] );339 } 340 341 if ( empty( $qt Init['buttons'] ) ) {342 $qt Init['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close';338 $qt_init = array_merge( $qt_init, $set['quicktags'] ); 339 } 340 341 if ( empty( $qt_init['buttons'] ) ) { 342 $qt_init['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close'; 343 343 } 344 344 345 345 if ( $set['_content_editor_dfw'] ) { 346 $qt Init['buttons'] .= ',dfw';346 $qt_init['buttons'] .= ',dfw'; 347 347 } 348 348 … … 352 352 * @since 3.3.0 353 353 * 354 * @param array $qt InitQuicktags settings.354 * @param array $qt_init Quicktags settings. 355 355 * @param string $editor_id Unique editor identifier, e.g. 'content'. 356 356 */ 357 $qt Init = apply_filters( 'quicktags_settings', $qtInit, $editor_id );358 359 self::$qt_settings[ $editor_id ] = $qt Init;360 361 self::$qt_buttons = array_merge( self::$qt_buttons, explode( ',', $qt Init['buttons'] ) );357 $qt_init = apply_filters( 'quicktags_settings', $qt_init, $editor_id ); 358 359 self::$qt_settings[ $editor_id ] = $qt_init; 360 361 self::$qt_buttons = array_merge( self::$qt_buttons, explode( ',', $qt_init['buttons'] ) ); 362 362 } 363 363 … … 754 754 } 755 755 756 $mce Init = array(756 $mce_init = array( 757 757 'selector' => "#$editor_id", 758 758 'wpautop' => (bool) $set['wpautop'], … … 767 767 768 768 // Merge with the first part of the init array. 769 $mce Init = array_merge( self::$first_init, $mceInit );769 $mce_init = array_merge( self::$first_init, $mce_init ); 770 770 771 771 if ( is_array( $set['tinymce'] ) ) { 772 $mce Init = array_merge( $mceInit, $set['tinymce'] );772 $mce_init = array_merge( $mce_init, $set['tinymce'] ); 773 773 } 774 774 … … 789 789 * @since 3.3.0 The `$editor_id` parameter was added. 790 790 * 791 * @param array $mce InitAn array with teenyMCE config.791 * @param array $mce_init An array with teenyMCE config. 792 792 * @param string $editor_id Unique editor identifier, e.g. 'content'. 793 793 */ 794 $mce Init = apply_filters( 'teeny_mce_before_init', $mceInit, $editor_id );794 $mce_init = apply_filters( 'teeny_mce_before_init', $mce_init, $editor_id ); 795 795 } else { 796 796 … … 801 801 * @since 3.3.0 The `$editor_id` parameter was added. 802 802 * 803 * @param array $mce InitAn array with TinyMCE config.803 * @param array $mce_init An array with TinyMCE config. 804 804 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' 805 805 * when called from block editor's Classic block. 806 806 */ 807 $mce Init = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id );808 } 809 810 if ( empty( $mce Init['toolbar3'] ) && ! empty( $mceInit['toolbar4'] ) ) {811 $mce Init['toolbar3'] = $mceInit['toolbar4'];812 $mce Init['toolbar4'] = '';813 } 814 815 self::$mce_settings[ $editor_id ] = $mce Init;807 $mce_init = apply_filters( 'tiny_mce_before_init', $mce_init, $editor_id ); 808 } 809 810 if ( empty( $mce_init['toolbar3'] ) && ! empty( $mce_init['toolbar4'] ) ) { 811 $mce_init['toolbar3'] = $mce_init['toolbar4']; 812 $mce_init['toolbar4'] = ''; 813 } 814 815 self::$mce_settings[ $editor_id ] = $mce_init; 816 816 } // End if self::$this_tinymce. 817 817 } … … 1568 1568 global $tinymce_version; 1569 1569 1570 $tmce_on = ! empty( self::$mce_settings );1571 $mce Init = '';1572 $qt Init = '';1570 $tmce_on = ! empty( self::$mce_settings ); 1571 $mce_init = ''; 1572 $qt_init = ''; 1573 1573 1574 1574 if ( $tmce_on ) { 1575 1575 foreach ( self::$mce_settings as $editor_id => $init ) { 1576 $options = self::_parse_init( $init );1577 $mce Init .= "'$editor_id':{$options},";1578 } 1579 $mce Init = '{' . trim( $mceInit, ',' ) . '}';1576 $options = self::_parse_init( $init ); 1577 $mce_init .= "'$editor_id':{$options},"; 1578 } 1579 $mce_init = '{' . trim( $mce_init, ',' ) . '}'; 1580 1580 } else { 1581 $mce Init = '{}';1581 $mce_init = '{}'; 1582 1582 } 1583 1583 1584 1584 if ( ! empty( self::$qt_settings ) ) { 1585 1585 foreach ( self::$qt_settings as $editor_id => $init ) { 1586 $options = self::_parse_init( $init );1587 $qt Init .= "'$editor_id':{$options},";1588 } 1589 $qt Init = '{' . trim( $qtInit, ',' ) . '}';1586 $options = self::_parse_init( $init ); 1587 $qt_init .= "'$editor_id':{$options},"; 1588 } 1589 $qt_init = '{' . trim( $qt_init, ',' ) . '}'; 1590 1590 } else { 1591 $qt Init = '{}';1591 $qt_init = '{}'; 1592 1592 } 1593 1593 … … 1623 1623 1624 1624 ?> 1625 mceInit: <?php echo $mce Init; ?>,1626 qtInit: <?php echo $qt Init; ?>,1625 mceInit: <?php echo $mce_init; ?>, 1626 qtInit: <?php echo $qt_init; ?>, 1627 1627 ref: <?php echo self::_parse_init( $ref ); ?>, 1628 1628 load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
Note: See TracChangeset
for help on using the changeset viewer.