Support

Account

Home Forums ACF PRO Remove buttons from Editor's Text mode Reply To: Remove buttons from Editor's Text mode

  • The quicktags_settings filter accepts 2 params, and that second one is $editor_id. Default value for native WP editor is content. ACF editor field, unsurprisingly, has the value of acf_content.

    
    function filter_editor_quicktags( $qtInit, $editor_id )
    {
    	if ( $editor_id === 'acf_content' ) {
    		$qtInit['buttons'] = 'strong,em,block';
    	}
    
    	return $qtInit;
    }
    add_filter( 'quicktags_settings', 'filter_editor_quicktags', 10, 2 );