Plugin Author
pepe
(@pputzer)
The content is parsed as HTML5 before the rules for not processing certain elements can be checked. What is your goal here? If you want to show the entities string in the browser, they need to be properly escaped.
Thread Starter
t33b33
(@t33b33)
I would like to obfuscate email addresses using antispambot(), although it is questionable whether this technique is even useful nowadays.
My best solution so far is to use an additional the_content shortcode filter after the wp-Typography filter, which might work like this:
add_filter( ‘the_content’, function( $content ) {
add_shortcode( ‘some_tag’, ‘some_callback’ );
$content = do_shortcode( $content );
remove_shortcode( ‘some_tag’ );
return $content;
}, 10000 );
Admittedly, that’s not really nice. Do you have any better ideas?
Plugin Author
pepe
(@pputzer)
Yes, postponing the shortcode processing until after wp-Typography is done is probably the only way to do this. (I think that’s a perfectly fine use of filter priorities, BTW). Just note that the priority might be PHP_INT_MAX if you have NextGen Gallery installed. In that case, adding the filter would have to rely on order of execution, so you would need to delay the add_filter call until after the init action.
Thread Starter
t33b33
(@t33b33)
Essentially, this is how I will do it then. Thank you for your quick reply and especially for your great plugin.
Plugin Author
pepe
(@pputzer)
Thank you. Feel free to reopen if you any further questions on this topic.