• Hey, I used to use the functions file to customize the buttons I wanted in the WYSIWIG and had been using ‘code’ in the button array but it no longer works after the 4.6 update. Has the name code changed to something else?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wyclef

    (@wyclef)

    This is the code in my functions file that is having problems in 4.6.

    // TinyMCE: First line toolbar customizations
    if( !function_exists('base_extended_editor_mce_buttons') ){
    	function base_extended_editor_mce_buttons($buttons) {
    		return array(
    			'undo', 'redo', 'bullist', 'numlist', 'bold', 'italic', 'sub', 'sup', 'pastetext', 'link', 'unlink', 'wp_adv'
    		);
    	}
    	add_filter("mce_buttons", "base_extended_editor_mce_buttons", 0);
    }
    
    // TinyMCE: Second line toolbar customizations
    if( !function_exists('base_extended_editor_mce_buttons_2') ){
    	function base_extended_editor_mce_buttons_2($buttons) {
    		return array( 'formatselect', 'charmap', 'spellchecker', 'code');
    	}
    	add_filter("mce_buttons_2", "base_extended_editor_mce_buttons_2", 0);
    }
    
    // Add Buttons
    add_filter( 'tiny_mce_before_init', 'my_custom_tinymce' );
    
    function my_custom_tinymce( $init ) {
    	$init['apply_source_formatting']=true;
    	return $init;
    }
    Thread Starter wyclef

    (@wyclef)

    By ‘code’ I mean the source code button, not the code formatting button.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WYSIWIG Code Button Missing after update’ is closed to new replies.