Support » Plugin: Front End PM » Apply filters for editor settings

  • Hello. First of all, thank your for the plugin. It runs smoothly and I’m happy with the results.

    This topic is to request the possibility to apply_filters to the settings of the_editor, on full and on teeny. I was wondering around class-fep-form.php and found out that this would be a neat addition to the plugin, since the static call of the function the_editor doesn’t add the editor-style.css by default.

    So, adding the apply_filters to the settings of the_editor will give flexibility to, for example, remove quick tags, or point the editor-style.css to something else, giving users more customization.

    It’s just 2 lines of code.

    Here I give you the hint:

    wp_editor( wp_kses_post( $field['posted-value' ] ), $field['id'], apply_filters( 'fep_the_editor_settings', array( 'textarea_name' => $field['name'], 'editor_class' => $field['class'], 'media_buttons' => false ) ) );

    wp_editor( wp_kses_post( $field['posted-value' ] ), $field['id'], apply_filters( 'fep_teeny_editor_settings', array( 'textarea_name' => $field['name'], 'editor_class' => $field['class'], 'teeny' => true, 'media_buttons' => false ) ) );

    So, for example, I could do this in functions.php on my theme:

    function quicktags_removal( $settings )
    {
    	$settings['quicktags'] = false;
    	return $settings;
    }
    
    add_filter( 'fep_teeny_editor_settings', 'quicktags_removal' );

    Thanks in advance for taking some time and read my idea.

    Kind regards.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Apply filters for editor settings’ is closed to new replies.