commenting out Shortcodes and whatever
-
Do you know when you are experimenting with many different plugins, and disabling one of them leaves you with a
[shortcode …]
in the middle of a page?
I didn’t want to delete it and lose the crafted arguments.
I wanted to hide it, but felt uneasy with common html comments because I think they are not meant to hide disabled code and give away information that shouldn’t.I then wrote an itsy bitsy tiny little almost inaudible shortcode:
function wpcomments_shortcode($atts, $content) { return '';} add_shortcode('comment','wpcomments_shortcode');and it works!
I can add[comment]
whatever rubbish I wanna keep for myself
[/comment]and nothing is rendered.
My questions are just:
am I the first to feel the need? to make this?
is there already another technique?
why not to make it core? (and add a button in TinyMCE) it’s just 4 lines of code!Thank you for your attention
The topic ‘commenting out Shortcodes and whatever’ is closed to new replies.