60 posts High Quality Themes
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • Referred between 50 and 99 users
  • Bought between 10 and 49 items
  • Exclusive Author
HighThemes says


A mate of mine just had his theme rejected for using this code. Should I get him to re-submit it and explain that it only affects his shortcodes (as mentioned above)?

Or is there a better solution out now?

Cheerio,
Dave
No, i had to remove entirely bitfade solution. Explaining that it affect only my shortcodes didn’t help.
So what’s the solution?
141 posts Designer & Developer
  • Elite Author
  • Has been a member for 5-6 years
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Referred between 50 and 99 users
  • Bought between 100 and 499 items
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
Webbu says

If you put this in to the theme. You will rejected. I recommend put all shortcodes in to a plugin and put this function on it. Then everything will be ok. TGM plugin activator will help to activate it on installation. My shortcode plugin using a function like this and only replace my shortcodes without touch default Wordpress content.

1090 posts The Last Man Standing
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Exclusive Author
  • Bought between 10 and 49 items
  • Sold between 50 000 and 100 000 dollars
  • Beta Tester
ImanGM says

If you put this in to the theme. You will rejected. I recommend put all shortcodes in to a plugin and put this function on it. Then everything will be ok. TGM plugin activator will help to activate it on installation. My shortcode plugin using a function like this and only replace my shortcodes without touch default Wordpress content.

+1

86 posts
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Most Wanted Bounty Winner
  • Author had a File in a Mini Bundle
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
+1 more
tansh says

If you put this in to the theme. You will rejected. I recommend put all shortcodes in to a plugin and put this function on it. Then everything will be ok. TGM plugin activator will help to activate it on installation. My shortcode plugin using a function like this and only replace my shortcodes without touch default Wordpress content.
+1
60 posts High Quality Themes
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • Referred between 50 and 99 users
  • Bought between 10 and 49 items
  • Exclusive Author
HighThemes says

If you put this in to the theme. You will rejected. I recommend put all shortcodes in to a plugin and put this function on it. Then everything will be ok. TGM plugin activator will help to activate it on installation. My shortcode plugin using a function like this and only replace my shortcodes without touch default Wordpress content.
+1
84 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
Coffee-Themes says

If you put this in to the theme. You will rejected. I recommend put all shortcodes in to a plugin and put this function on it. Then everything will be ok. TGM plugin activator will help to activate it on installation. My shortcode plugin using a function like this and only replace my shortcodes without touch default Wordpress content.

No it will not be the case. I have shortcodes in plugin and this function was inside plugin.

63 posts
  • Bought between 1 and 9 items
  • Italy
  • Has been a member for 1-2 years
Kronris says
A simple way to remove the autop could be something like this:

function kr_clean_format( $content ) {
    $atts = array (
        '<p>[' => '[',
        ']</p>' => ']',
        ']<br />' => ']'
    );
    $content = strtr( $content, $atts );
    return $content;
}
add_filter( 'the_content', 'kr_clean_format' );
Is it allowed?
84 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
Coffee-Themes says

A simple way to remove the autop could be something like this:

function kr_clean_format( $content ) {
    $atts = array (
        '<p>[' => '[',
        ']</p>' => ']',
        ']<br />' => ']'
    );
    $content = strtr( $content, $atts );
    return $content;
}
add_filter( 'the_content', 'kr_clean_format' );
Is it allowed?

No this is old solution that was forbidden for a good reason. I’m asking myself what is wrong with bitfade’s, any answer from staff would be great!

322 posts
  • Envato Studio (Microlancer) Beta Tester
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
  • Romania
QBKL says

So, anyone found a workaround solution? We’re not allowed to manipulate the autop/unautop, although an industry standard plugin here does it… so what’s the solution.

Even if we only target our own shortcodes we can’t use this. I am personally left with the jQuery solution of removing ‘p:empty’. But no matter how many combos I’ve tried, can’t get rid of the blasted BR’s.

And it doesn’t make sense to force a customer to write everything inline so that the BR doesn’t pop up. Nor to make them leave 2 lines between shortcodes as it generates invalid code output with unopened P-ending tags.

Targeting those BR like: $( 'div.my-class + br' ).remove(); doesn’t work. Even if they are adjacent in the source code, somehow it doesn’t target them.

Using div > br or div > br:first-child, again, not a reliable solution since users might actually write the entry so that the first br is somewhere lower in the code…

And overall, the whole idea to do this through jQuery kinda sucks big time, it’s such an unnecessary stretch.

So, what are we left with?

487 posts uouapps
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 1-2 years
  • Jordan
  • Referred between 10 and 49 users
  • Sold between 100 000 and 250 000 dollars
uouapps says

Could we get a Staff reply… ?

by
by
by
by
by
by