Plugin Directory

Changeset 2230759


Ignore:
Timestamp:
01/21/2020 08:09:00 AM (6 years ago)
Author:
Daschmi
Message:

1.2

  • Use of one filter for the whole content (included footer/header)
  • use onclick attribute instead of javascript: in href
Location:
emailscrambler
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • emailscrambler/trunk/classes/action.class.php

    r1924669 r2230759  
    1111    abstract class Action {
    1212
    13         public static function wp_enqueue_scripts() {
     13        public static function wp_enqueue_scripts() : void {
    1414
    1515            wp_enqueue_script('wpes_js', plugins_url('emailscrambler/js/emailprotection.js'));
    1616
    1717        } // public static function wp_enqueue_scripts()
    18 
     18   
     19        public static function wp_head() : void {
     20       
     21            ob_start(['\wpes\wpes', 'filter']);
     22       
     23        } // public static function wp_head() : void
     24   
     25        public static function wp_foot() : void {
     26       
     27            ob_end_flush();
     28       
     29        } // public static function wp_foot() : void
     30       
    1931    } // abstract class action
  • emailscrambler/trunk/classes/wpes.class.php

    r1924669 r2230759  
    4242
    4343        public static function match($match) {
    44 
    45             if (preg_match('/^mailto:/i', $match[0])) {
    46 
    47                 return 'javascript:wpes_linkTo_UnCryptMailto(\''.self::MailEncrypt(preg_replace('/^mailto:/i', '', $match[0])).'\');';
    48 
    49             } else if (!preg_match('/^value/i', $match[0])) {
    50 
    51                 return preg_replace('/@/', '(at)', $match[0]);
    52 
    53             } else return $match[0];
     44   
     45            if (preg_match('/^mailto:/i', $match[0])) {
     46       
     47                return '" onclick="wpes_linkTo_UnCryptMailto(\''.self::MailEncrypt(preg_replace('/^mailto:/i', '', $match[0])).'\');';
     48       
     49            } else if (!preg_match('/^value/i', $match[0])) {
     50       
     51                return preg_replace('/@/', '(at)', $match[0]);
     52       
     53            } else return $match[0];
    5454
    5555        } // function match($match)
  • emailscrambler/trunk/readme.txt

    r1924669 r2230759  
    22Contributors: Daschmi
    33Donate link: http://daschmi.de/
    4 Tags: antispam,spam,email,protection,encrypt
     4Tags: antispam,spam,email,protection,encrypt,daschmi,mailprotection,filter,mail
    55Requires at least: 3.0.1
    6 Tested up to: 5.0
    7 Stable tag: 1.1
     6Tested up to: 5.3.2
     7Stable tag: 1.2
     8Requires PHP: 7.0
    89License: GPLv2 or later
    910License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2829* Compatible with Gutenberg
    2930* No replacement of input value fields
     31
     32= 1.2 =
     33* Use of one filter for the whole content (included footer/header)
     34* use onclick attribute instead of javascript: in href
Note: See TracChangeset for help on using the changeset viewer.