Plugin Author
pepe
(@pputzer)
I assume you are referring to the shortcode example? Please add class="noTypo"
to the <a>
tag printed by the shortcode.
Yes, the shortcode [email] example.
This doesn’t help. I’ve also tried to add the “a” element to the ignore list at the settings of your plugin. This also didn’t help.
-
This reply was modified 4 years, 10 months ago by adamdell.
-
This reply was modified 4 years, 10 months ago by adamdell.
-
This reply was modified 4 years, 10 months ago by adamdell.
Plugin Author
pepe
(@pputzer)
Sorry, I got sidetracked when writing that suggestion. The problem is that all those nicely encoded entities get decoded by wp-Typography’s HTML parser.
The solution would have to be a separate content filter (instead of a shortcode) that run’s after wp-Typography (i.e. with a higher filter priority). Getting that right will be a little tricky, though. Please have a look at dedicated plugins like Email Address Encoder (you need to set a high enough priority though, either through a constant or filter hook).
I see, thank you!
Could it be a solution if I add the code
function wpcodex_hide_email_shortcode( $atts , $content = null ) {
if ( ! is_email( $content ) ) {
return;
}
return '<a href="mailto:' . antispambot( $content ) . '">' . antispambot( $content ) . '</a>';
}
add_shortcode( 'email', 'wpcodex_hide_email_shortcode' );
into a file of your plugin so that it runs after the plugin’s parser?
https://wordpress.org/plugins/email-address-encoder/ also doesn’t help.
-
This reply was modified 4 years, 10 months ago by adamdell.
-
This reply was modified 4 years, 10 months ago by adamdell.
Plugin Author
pepe
(@pputzer)
@adamdell, no, any shortcode will not work. Email Address Encoder does work, but as I wrote, you have to set its filter priority to > 9999 or lower wp-Typography’s filter priority with the typo_filter_priority
hook.
Thank you! Now it works with Email Address Encoder and priority set to 10000. Before I only tried 8000 that was too low.
Plugin Author
pepe
(@pputzer)
I’m glad the issue could be resolved. If you can find the time to leave a review, that would be great 🙂