@cosmincotor there really isn’t a great code snippet out there. I would personally recommend not trying to use any code snippet as every single one of them goes against what should be happening.
I also wouldn’t be including short codes (except very specialized ones in your themes). For example, if you want to add columns, suggest your users install this plugin: https://github.com/justintadlock/grid-columns
The problem is actually an issue with WordPress, not themes (except themes that try to fix it). The best thing to do is work on fixing the issue in core and submit a patch.
Would be nice to provide the fix since you started the thread and others may be intersted :d
I have used this plugin, those of the users who will have a problem with the paragraph tags and breaks added to the shortcodes will use it and the others wont. Maybe it’s not the best… next time I will try the solution from this topic
@cosmincotor there really isn’t a great code snippet out there. I would personally recommend not trying to use any code snippet as every single one of them goes against what should be happening.
I also wouldn’t be including short codes (except very specialized ones in your themes). For example, if you want to add columns, suggest your users install this plugin: https://github.com/justintadlock/grid-columns
The problem is actually an issue with WordPress, not themes (except themes that try to fix it). The best thing to do is work on fixing the issue in core and submit a patch.
Well, I guess I’ll have to re-think the shortcodes (which ones are absolutely necessary), and hopefully WP will receive an update that deals with this issue.
@cosmincotor there really isn’t a great code snippet out there. I would personally recommend not trying to use any code snippet as every single one of them goes against what should be happening.
I also wouldn’t be including short codes (except very specialized ones in your themes). For example, if you want to add columns, suggest your users install this plugin: https://github.com/justintadlock/grid-columns
The problem is actually an issue with WordPress, not themes (except themes that try to fix it). The best thing to do is work on fixing the issue in core and submit a patch.
Well, I guess I’ll have to re-think the shortcodes (which ones are absolutely necessary), and hopefully WP will receive an update that deals with this issue.
There are many best-selling TF themes which still use for instance: $new_content .= wptexturize(wpautop($piece));
This forces wpautop and messes up the content generated by the new plugin I am working at.
It adds to my generated content and I haven’t found any good solution yet to get rid of the added
I thought theme authors are not allowed to force wpautop?? Or are they?
So what’s the verdict, I’m writing a theme, and definitely need to use the shortcode empty paragraph fix posted…will theme get rejected because of this?
Otherwise the wpautop wreaks havoc with my shortcodes
That is basically doing the same thing, so why would that pass and the one I am doing not?
There is one big difference, your code affects all shortcodes, but with the code I linked you have the control over what shortcodes get "cleaned"
The soft rejection was not about how many times it was used on shortcodes, it was for:
encouraging authors to use another methods rather than stripping out or modifying the_content() output as this may cause problems with third party plugins.
Which basically means the version you gave will not pass either.
I can understand that, by adding curtain shortcodes may help the 3rd party plugins work better but its still filtering the_content();