function filter_remove_inline_comments($content) {
return preg_replace('/@@.*?@@/', '', $content);
}
add_filter('the_content', 'filter_remove_inline_comments', 5);
(Also on github: https://gist.github.com/918336)
Inline commenting would allow news staff to put stuff into a post (CQ
info, source phone #s, whatever) and have it stripped out when the
content is pulled for web display with a filter. I haven't tested this
much at all, so the normal disclaimers should be appended. Maybe I'm
talking crazy, but the lack of inline commenting has been a sticking
point for the copy editors as we plan our web-based copy flow. But
maybe someone's got a fancy solution that I've missed and my fifteen
minutes trying to figure out that regular expression will be wasted :)
Ivar
Ivar
--
You received this message because you are a part of CoPress
(http://www.copress.org/).
- To post a message to this group, send email to cop...@googlegroups.com
- To unsubscribe from this group, send an email to
copress+u...@googlegroups.com
- For more options, visit this group at
http://groups.google.com/group/copress
- Get connected on Twitter http://www.twitter.com/copress or Facebook
http://www.facebook.com/copress