1142 posts It's in the pipeline!
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • Author Level 11
+9 more
purethemes
says

My item also was soft rejected for the same reason, try this:
function shortcode_empty_paragraph_fix($content){   
    $array = array (
        '<p>[' => '[', 
        ']</p>' => ']', 
        ']<br />' => ']'
    );

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

add_filter('the_content', 'shortcode_empty_paragraph_fix');

Don’t use it. This was exactly why my theme was soft rejected:

Please remove this function shortcode_empty_paragraph_fix() you cannot modify the_content, leave this to the plugins. This is a poor practice and it may break plugins.
709 posts
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
  • Collector Level 2
+2 more
ChillThemes
says

The functions I posted don’t modify the_content, and shortcode_unautop is a standard WordPress function. The only thing is shortcode_unautop doesn’t remove line breaks, and the first function I posted takes care of that.

20 posts
  • 3 Years of Membership
  • Affiliate Level 2
  • Author Level 6
  • Collector Level 1
+2 more
themebakers
says

Has this change in policy been announced somewhere?

43 posts
  • Author Level 4
  • Collector Level 2
  • Exclusive Author
  • 3 Years of Membership
Rachata
says

What should I do now , My theme was be rejected and they told me

“please make sure that you’re not stripping out any native functionality.”

I cannot use remove_filter? add_filter ?

43 posts
  • Author Level 4
  • Collector Level 2
  • Exclusive Author
  • 3 Years of Membership
Rachata
says

Find a solution now use

function prefix_remove_wpautop( $content ) {
    $content = do_shortcode( shortcode_unautop( $content ) );
    $content = preg_replace( '#^<\/p>|^<br />|<p>$#', '', $content );
    return $content;
}</p>

thx to itsmattadams

356 posts
  • Affiliate Level 2
  • Author Level 5
  • Beta Tester
  • Collector Level 3
+4 more
cosmincotor
says

Some shortcodes still require those stray paragraph tags to be removed, so, has anyone found a solution that will be accepted ? :)

751 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Collector Level 2
  • Exclusive Author
+1 more
CyberShot
says

I used CSS empty to set the paragraph tag to display none. Wouldn’t that work?

32 posts
  • Collector Level 1
  • United States
  • Exclusive Author
  • 4 Years of Membership
dyspersion
says

How is there such a disparity? I’m just struggling to get my head around the double standards on here. Very frustrating. Is it just luck of the draw with reviewers?

Well, you can’t go back and re-review themes already in the marketplace. They just don’t have the manpower to do that. But, I would hope that those themes would be subjected to the same judgement if they submit updates. ;)

118 posts
  • Trendsetter
  • Weekly Top Seller
  • Elite Author
  • Author Level 9
+6 more
StevenGliebe
says

It’s really good that ThemeForest is checking for this now.

Now to get the bad tutorials updated or removed…

36 posts
  • 5 Years of Membership
  • Affiliate Level 3
  • Author Level 8
  • Collector Level 2
+3 more
HotelWP
says

Hey guys,

I’m a bit confused regarding this wpautop.

I thought that it was ok to do this?
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99);
Second question: how do you actually use this function:
function prefix_remove_wpautop( $content ) {
    $content = do_shortcode( shortcode_unautop( $content ) );
    $content = preg_replace( '#^<\/p>|^<br />|<p>$#', '', $content );
    return $content;
}
</p>
Thanks.
by
by
by
by
by
by