967 posts It's in the pipeline!
  • Elite Author
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Exclusive Author
  • Microlancer Beta Tester
  • Author had a Free File of the Month
+2 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.
707 posts
  • Sold between 10 000 and 50 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • Exclusive Author
  • Microlancer Beta Tester
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.

15 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
  • Referred between 10 and 49 users
  • Sold between 10 000 and 50 000 dollars
themebakers says

Has this change in policy been announced somewhere?

43 posts
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
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
  • Exclusive Author
  • Sold between 5 000 and 10 000 dollars
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
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

280 posts
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Europe
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
  • Microlancer Beta Tester
  • Has been a member for 3-4 years
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

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

32 posts
  • United States
  • Exclusive Author
  • Has been a member for 2-3 years
  • Bought between 1 and 9 items
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. ;)

100 posts
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 500 and 999 users
  • Sold between 250 000 and 1 000 000 dollars
  • United States
StevenGliebe says

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

Now to get the bad tutorials updated or removed…

26 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 4-5 years
  • Ireland
  • Referred between 50 and 99 users
  • Sold between 50 000 and 100 000 dollars
AurelienD 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