60 posts High Quality Themes
  • Hungary
  • Elite Author
  • 6 Years of Membership
  • Author Level 9
+5 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
  • Elite Author
  • 7 Years of Membership
  • Author Level 9
  • Exclusive Author
+7 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.

1891 posts The Last Man Standing
  • Weekly Top Seller
  • Author Level 8
  • Beta Tester
  • Elite Author
+9 more
ThemeWisdom
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

274 posts
  • Affiliate Level 1
  • Trendsetter
  • Author Level 8
  • Collector Level 2
+9 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
  • Hungary
  • Elite Author
  • 6 Years of Membership
  • Author Level 9
+5 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
  • Trendsetter
  • Weekly Top Seller
  • 5 Years of Membership
  • Affiliate Level 2
+4 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
  • Collector Level 1
  • Italy
  • 3 Years of Membership
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
  • Trendsetter
  • Weekly Top Seller
  • 5 Years of Membership
  • Affiliate Level 2
+4 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
  • Bundle Boss
  • Most Wanted Winner
  • Author Level 5
  • 7 Years of Membership
+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?

684 posts uouapps
  • Elite Author
  • Author Level 10
  • Collector Level 4
  • Affiliate Level 3
+3 more
uouapps
says

Could we get a Staff reply… ?

by
by
by
by
by
by