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?
158 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.

1843 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

225 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
+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 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
+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!

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?

653 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
+2 more
uouapps
says

Could we get a Staff reply… ?

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by