Submission Tip: Don’t Strip Native Functionality (TF)

 5   Tweet

Note: This post hasn't been updated in over 2 years.

Howdy talented authors! In this ongoing quest for more transparency, here I am, again, with more juicy tidbits about the reviewing process. More specifically, I’d like to address some issues that seem to be tripping up a lot of authors. In the interest of brevity, I won’t go too much into the issues themselves since they’re a single search away.

This time we look at stripping native functionality.

Some enterprising authors, recently, have started stripping out some native functionality from WordPress’ core. One fine example would be removing the wpautop filter to deal with formatting issues. While this may simplify the workflow for your template, newbie users can get confused with the change in the native UX.

With that in mind, we actively discourage users from making changes to core functionality like this. You’re still free to go mad with modifying the editor—just don’t modify core functions.

Chime in at the comments if you have any questions and thanks for reading!

  • uDesignStudios


    this is a very complex problem. wpautop is a very very bad thing. If you have any shortcodes that use divs for markup, it *WILL* break your validation, because it just sticks P tags and their endings anywhere. So you have the choice between turning it off and having your theme rejected for that, or you can have you theme rejected for being invalid HTML. We for one are solving this with a complicated system that tries to remove these stray tags, but in reality this problem needs to be tackled at the WP core level, where its stemming from.


  • ParkerAndKent

    I don’t remove any WP core functionality. The problem with shortcodes isn’t a real problem if we run our shortcodes in different moments.

    Using the right filters and priorities the problematic shortcodes can be run before the WP wpautop filter avoiding the validation problems and the need of disabling the wpautop filter.

    In our framework we split the shortcodes in 2 categories: the ones that can run with the wpautop filter and the ones that can’t… these 2 categories of shortcodes are executed in 2 different moments with success and without any validation problem.

    The soppression of the wpautop filter is just the easy way to go.


    • Guest

      Come on! Your themes have the wpauto shortcode problem also. All the great themes on TF has the same issue, you though that your themes are better than others so much???

  • Harold

    I solve that using this snippet:

    add_filter('the_content', 'shortcode_empty_paragraph_fix');
    function shortcode_empty_paragraph_fix($content)
    $array = array (
    '[' => '[',
    ']' => ']',
    ']' => ']'

    $content = strtr($content, $array);
    return $content;

    Is that allright?


    • webmandesign

      Hi there,

      I doubt your code will help you to be approved. My theme doesn’t contain ANY “remove_filter” (so I’m not modifying or stripping out any wpautop or wptexturize) but it contains similar function like yours (I presume there should be some HTML tags in there too, but they got stripped down in the comment I guess :)). And I’m now battling with soft rejection of my theme…

      So we are not even allowed to use apply_filter( ‘the_content’, function ) in our themes?