Plugin Directory

Changeset 1827713


Ignore:
Timestamp:
02/23/2018 12:49:54 PM (7 years ago)
Author:
Kuuak
Message:

Add correct version

Location:
scramble-email/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • scramble-email/trunk/README.txt

    r1827657 r1827713  
    33Tags: email, anti-spam, shortcode
    44Requires at least: 4.4
    5 Tested up to: 4.7.2
    6 Stable tag: 1.0.1
     5Tested up to: 4.9.2
     6Stable tag: 1.1.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3030== Changelog ==
    3131
     32= 1.1.0 - 29/01/2018 =
     33* Add: Possibility to use as a function in addition to a shortcode.
     34
    3235= 1.0.1 - 08/02/2017 =
    3336* Fix: Undefined `currentScript` variable when document loaded via ajax
  • scramble-email/trunk/admin/class-scramble-email-admin.php

    r1827657 r1827713  
    33 * The admin-specific functionality of the plugin.
    44 *
    5  * @link       http://opusmagnum.ch
     5 * @link       https://github.com/Kuuak/scramble-email
    66 * @since      1.0.0
    77 *
     
    1818 * @package    Scramble_Email
    1919 * @subpackage Scramble_Email/admin
    20  * @author     Felipe Paul Martins <[email protected]>
     20 * @author     Felipe Paul Martins
    2121 */
    2222if ( !class_exists( 'Scramble_Email_Admin' ) ) {
  • scramble-email/trunk/scramble-email.php

    r1827657 r1827713  
    33 * Plugin Name:     Scramble Email
    44 * Description:     Protect your email addresses from being harvested by automatic bots. Simply replace the emails in your post or page content by an unique shortcode.
    5  * Author:              Felipe Paul Martins - Opus Magnum
     5 * Author:              Felipe Paul Martins
    66 * Version:             1.0.1
    7  * Author URI:      https://opusmagnum.ch
     7 * Author URI:      https://github.com/Kuuak
    88 * License:             GPL-2.0+
    99 * License URI:     http://www.gnu.org/licenses/gpl-2.0.txt
     
    1717 *
    1818 * @package     Scramble_Email
    19  * @author      Felipe Paul Martins <[email protected]>
     19 * @author      Felipe Paul Martins
    2020 * @license     GPL-2.0+
    21  * @link            https://opusmagnum.ch
     21 * @link            https://github.com/Kuuak/scramble-email
    2222 */
    2323
     
    169169            $title = base64_encode($title);
    170170
    171             return "<script>scem_unscramble( '$email' , '$title'". ( (!empty($classes) || !empty($subject)) ? ', '. (!empty($subject) ? "'$classes'" : "'null'") . (!empty($subject) ? ", '$subject'" : '') : '' ) .');</script>';
     171            return "<script>scem_unscramble( '$email' , '$title'". ( (!empty($classes) || !empty($subject)) ? ', '. (!empty($classes) ? "'$classes'" : "'null'") . (!empty($subject) ? ", '$subject'" : '') : '' ) .');</script>';
    172172        }
    173173
     
    205205}
    206206
    207 new Scramble_Email();
     207$scrambleEmail = new Scramble_Email();
     208
     209/**
     210 * Scramble the given email and allows the email
     211 * to be rendered in JS on the Frontend
     212 *
     213 * @since       1.1.0
     214 *
     215 * @param       string  $email      The email to scramble.
     216 * @param       string  $title      The label of the link.
     217 * @param       string  $subject    Optional. The subject to be inserted in the email when mailto is clicked.
     218 * @param       array       $classes    Optional. HTML classes for the <a> element.
     219 * @return  string                      The HTML string to echo
     220 */
     221function scramble_email( $email, $title, $subject, $classes = array() ) {
     222    global $scrambleEmail;
     223
     224    return $scrambleEmail->render_shortcode( array(
     225        'email' => $email,
     226        'title' => $title,
     227        'subject'   => $subject,
     228        'classes'   => $classes,
     229    ));
     230}
Note: See TracChangeset for help on using the changeset viewer.