Your IP : 216.73.216.95


Current Path : /var/test/www/html/soc2019/wp-content/plugins/mailcontact/
Upload File :
Current File : /var/test/www/html/soc2019/wp-content/plugins/mailcontact/soc2019-custom.php

<?php
/*
Plugin Name: Site plugin for soc2019-custom.com
Description: Enforce email for soc2019.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */

function ee_add_unique_email_validation(){
  wp_add_inline_script( 
    'single_page_checkout',
    'jQuery( document ).ready(function($) {
      $(".ee-reg-qstn-email").addClass("unique");
        $.validator.addMethod("unique", function(value, element) {
        var parentForm = $(element).closest("form");
        var timeRepeated = 0;
        if (value != "") {
          $(parentForm.find(":text")).each(function () {
          if ($(this).val() === value) {
              timeRepeated++;
          }
      });
    }
    return timeRepeated === 1 || timeRepeated === 0;
    }, "* Duplicate! Please use a unique email address");
    } );'
  );
}
add_action( 'wp_enqueue_scripts', 'ee_add_unique_email_validation', 60 );


/* Stop Adding Functions */