WordPress.org

Support

Support » Plugins and Hacks » CryptX » Using CryptX in Template

Using CryptX in Template

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Okay, found the issue. But, can I switch the css class to an id by just changing “class” to “id” in the code above?

    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.

    Plugin Author Ralf Weber

    @d3395

    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

    That would be great Ralf! Thank you for considering it and for making a really cool plugin.
    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using CryptX in Template’ is closed to new replies.
Skip to toolbar