Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: tiny_mce_before_init

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
512      if ( $disable_captions ) {
513           $tinymce_settings['wpeditimage_disable_captions'] = true;
514      }
515
516      if ( ! empty( $editor_settings['tinymce'] ) && is_array( $editor_settings['tinymce'] ) ) {
517           array_merge( $tinymce_settings, $editor_settings['tinymce'] );
518      }
519
520      /** This filter is documented in wp-includes/class-wp-editor.php */
521      $tinymce_settings = apply_filters( 'tiny_mce_before_init', $tinymce_settings, 'classic-block' );
522
523      // Do "by hand" translation from PHP array to js object.
524      // Prevents breakage in some custom settings.
525      $init_obj = '';
526      foreach ( $tinymce_settings as $key => $value ) {
527           if ( is_bool( $value ) ) {
528                $val       = $value ? 'true' : 'false';
529                $init_obj .= $key . ':' . $val . ',';
530                continue;