60 posts High Quality Themes
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively 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?
164 posts Designer & Developer
  • Had an item that was trending
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
  • Has sold $125,000+ on Envato Market
+6 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.

1867 posts The Last Man Standing
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Helped several times protecting Envato Market against copyright violations
+9 more
ImanGM
Moderator
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

242 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
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively 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 4 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+2 more
7CS
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 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
  • Has been part of the Envato Community for over 4 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+2 more
7CS
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!

554 posts
  • Had an item featured in an Envato Bundle
  • Won a Most Wanted contest
  • Has sold $10,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+4 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?

671 posts uouapps
  • Has been part of the Envato Community for over 2 years
  • Has referred 10+ members
  • Has sold $250,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