WordPress.org

Ready to get started?Download WordPress

Forums

CryptX
Using CryptX in Template (5 posts)

  1. visualcraftsman
    Member
    Posted 2 years 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/

  2. visualcraftsman
    Member
    Posted 2 years 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?

  3. visualcraftsman
    Member
    Posted 2 years 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.

  4. Ralf Weber
    Member
    Plugin Author

    Posted 2 years 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

  5. visualcraftsman
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags