60 posts High Quality Themes
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 more
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?
143 posts Designer & Developer
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has sold $125,000+ on Envato Market
  • Sells items exclusively on Envato Market
+5 more
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.

1298 posts The Last Man Standing
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
+7 more
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

123 posts
  • Has sold $125,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+7 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
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 more
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
  • Has been part of the Envato Community for over 3 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
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
  • Has collected 1+ items on Envato Market
  • Located in Italy
  • Has been part of the Envato Community for over 1 year
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
  • Has been part of the Envato Community for over 3 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
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!

368 posts
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+5 more
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?

531 posts uouapps
  • Has been part of the Envato Community for over 1 year
  • Has referred 10+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+3 more
uouapps says

Could we get a Staff reply… ?

by
by
by
by
by
by