Plugin Directory

Changeset 1444837


Ignore:
Timestamp:
06/28/2016 09:36:50 AM (10 years ago)
Author:
clarionwpdeveloper
Message:

change the variable names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • email-domain-verification-in-cf7/trunk/contact-form-7-email-validation-check.php

    r1365472 r1444837  
    2121
    2222    function wpcf7_email_validation_has_parent_plugin() {
    23         if (is_admin() && current_user_can('activate_plugins') && !is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
     23        if (is_admin() && current_user_can("activate_plugins") && !is_plugin_active("contact-form-7/wp-contact-form-7.php")) {
    2424            add_action('admin_notices', 'wpcf7_email_validation_nocf7_notice');
    2525
     
    5151    }
    5252
    53     function wpcf7_validate_email_check($email) {
     53    function wpcf7_validate_email_check($emailAddress) {
    5454       
    55         $exp = "^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$";
     55        $expression = "^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$";
    5656
    57        if (eregi($exp, $email)) {
    58             if (checkdnsrr(array_pop(explode("@", $email)), "MX")) {
     57       if (eregi($expression, $emailAddress)) {
     58            if (checkdnsrr(array_pop(explode("@", $emailAddress)), "MX")) {
    5959                return true;
    6060            } else {
     
    6666    }
    6767
    68     function wpcf7_custom_email_validation_filter($result, $tag) {
     68    function wpcf7_custom_email_validation_filter($result, $tags) {
    6969               
    70         $tag = new WPCF7_Shortcode( $tag );
     70        $tags = new WPCF7_Shortcode( $tags );
    7171+
    72         $type = $tag->type;
    73         $name = $tag->name;
     72        $type = $tags->type;
     73        $name = $tags->name;
    7474
    7575        if ('email' == $type || 'email*' == $type) { // Only apply to fields with the form field name of "company-email"
     
    7878
    7979            if(!wpcf7_validate_email_check($email_value)){
    80                  $result->invalidate( $tag, "Email address entered is invalid, DNS resolution failed.");
     80                 $result->invalidate( $tags, "Email address entered is not valid, DNS resolution failed.");
    8181            }
    8282        }
Note: See TracChangeset for help on using the changeset viewer.