I’m quite sure I’ve figured this out. Check this https://gist.github.com/partnuz/9175420 and tell me if there are any errors.
No, it wouldn’t work. It manipulates the content of the shortcode in an undesirable way. First off, you’re replacing each and all P’s and BR’s with nothing… removing them. Maybe your user doesn’t want all BR’s removed? Cause that’s what he’ll get when his content will run through your function.
Consider a column shortcode. You’re basically forcing the user to drop all his paragraphs and line-breaks in that column, and not only from your shortcode, but also from other shortcodes he might use from different plugins.
This thing is annoying mostly when it comes to container-type of shortcodes as it breaks our beautifully measured layouts, paddings, margins… we need a viable solution for this.
Right now I’m considering two options: 1. Pack it with a switch in admin and warn users of the “Dangers” of activating it. 2. Drop the function in the documentation, again with a warning and let the user choose if they want to paste it or not in functions.php.
Maybe combining bitfade gist and using it inside shortcode should be better solution.
I tried bitfade solution but it doesn’t work for me, i think one of the reason why this solution is being rejected is because people let the same function name “the_content_filter”, and all these functions should have a prefix, like “yourtheme_the_content_filter”.
Can you tell me where i can put this code? maybe in functions.php?
Just to let you know, I’m currently discussing this with the review team, and will get back to you. Please be patient though, as it’s an important discussion, and it’s probably going to take longer than 5 minutes (particularly as a number of us are in different timezones).
Thank you Japh! Understandable considering the timezones. We do hope though it won’t take that long as it holds back authors’ projects around here.