Support » Plugin: WP Editor Widget » Improvements

  • Resolved Daniel Iser

    (@danieliser)


    To improve functionality add filters for the content of the widgets. You can choose which you want. The ones below are whats typically applied to the_content();

    On line 140 you have
    echo $content;

    This would be better suited like this.
    echo apply_filters('wp_editor_widget',$content);

    And then at the top with your actions add

    add_filter( 'wp_editor_widget', 'wptexturize' );
    add_filter( 'wp_editor_widget', 'convert_smilies' );
    add_filter( 'wp_editor_widget', 'convert_chars' );
    add_filter( 'wp_editor_widget', 'wpautop' );
    add_filter( 'wp_editor_widget', 'shortcode_unautop' );
    add_filter( 'wp_editor_widget', 'prepend_attachment' );
    add_filter( 'wp_editor_widget', 'do_shortcode', 11 );

    If you use this please credit me.

    http://wordpress.org/plugins/wp-editor-widget/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author feedmeastraycat

    (@feedmeastraycat)

    This is a good idea. Thanks!

    Plugin Author feedmeastraycat

    (@feedmeastraycat)

    I didnt remember my code in my head. I already have a filter on the content:
    $content = apply_filters('wp_editor_widget_content', $instance['content']);

    But it might be a good idea to add the other functions to it. But it might be easier just to add the “the_content” filter instead.

    Daniel Iser

    (@danieliser)

    I tried using the_content filter with my plugin Easy Modal. It’s not what you want.

    If they have any other plugins installed that inject content to the_content it will be added to your output as well, social share buttons etc.

    This is the correct way to do it and also allows more customization for the site owners to hook their own filters.

    Plugin Author feedmeastraycat

    (@feedmeastraycat)

    Finally got the time to do this update now. Thanks for the input!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Improvements’ is closed to new replies.