visualcraftsman
Member
Posted 1 year ago #
I just installed CryptX 3.1.2 and pasted the php code into my footer.php template file to replace a mailto anchor. I changed the variable names where applicable and updated my css file for the class name, but after I tested the php file the anchor for the mailto link doesn't show up at all. Here's the php code I used replacing the old mailto link...
<?php
$mail="info@visualcraftsman.com";
$text="Email Us";
$css ="footEmail";
if (function_exists('cryptx')) {
cryptx($mail, $text, $css, 1);
} else {
echo sprintf('<a href="mailto:%s" class="%s">%s</a>', $mail, $css, ($text != "" ? $text : $mail));
}
?>
http://wordpress.org/extend/plugins/cryptx/
visualcraftsman
Member
Posted 1 year ago #
Okay, found the issue. But, can I switch the css class to an id by just changing "class" to "id" in the code above?
visualcraftsman
Member
Posted 1 year ago #
Well, I edited cryptx.php and changed "class" to "id" in the function for the template stuff. Seems to work great now. Only thing is, whenever the plugin gets updated it'll probably wipe out my changes.
So would be grrreat if both class and id was supported in the anchor :-) cough, cough.
Ralf Weber
Member
Plugin Author
Posted 1 year ago #
Hi visualcraftsman,
thank you for your hints and improvements.
I will add this to the next version of CryptX, so i will support both id and class configurable in the backend and at the template function.
Will this be ok for you?
Kind regards
Ralf
visualcraftsman
Member
Posted 1 year ago #
That would be great Ralf! Thank you for considering it and for making a really cool plugin.
Cheers!