tiny_mce_before_init

tiny_mce_before_init

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('tiny_mce_before_init') is found 2 times:

  • /wp-includes/class-wp-editor.php line 817
    				 * @param array  $mce_init  An array with TinyMCE config.
    				 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
    				 *                          when called from block editor's Classic block.
    				 */
    				$mce_init = apply_filters( 'tiny_mce_before_init', $mce_init, $editor_id );
    			}
    
    			if ( empty( $mce_init['toolbar3'] ) && ! empty( $mce_init['toolbar4'] ) ) {
    				$mce_init['toolbar3'] = $mce_init['toolbar4'];
    				$mce_init['toolbar4'] = '';
    			}
    
  • /wp-includes/script-loader.php line 617
    		$tinymce_settings = array_merge( $tinymce_settings, $editor_settings['tinymce'] );
    	}
    
    	/** This filter is documented in wp-includes/class-wp-editor.php */
    	$tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' );
    
    	/*
    	 * Do "by hand" translation from PHP array to js object.
    	 * Prevents breakage in some custom settings.
    	 */
    	$init_obj = '';
    

See this hook used in plugins:

Examples using tiny_mce_before_init