• 1.
    $emails_allowed_options = get_option( 'emails_allowed_option_name' ); // Array of All Options
  • 2.
    $allowed_email_domains_0 = $emails_allowed_options['allowed_email_domains_0']; // Allowed email domains
  • 3.
    $allowed_email_domains_0 =str_replace(' ', '', $allowed_email_domains_0); // removing blank spaces
  • 4.
    $domList = explode(',', $allowed_email_domains_0 );
  • 5.
    $domList = array_change_key_case($domList, CASE_LOWER);
  • 6.
     
  • 7.
    new GW_Email_Domain_Validator( array(
  • 8.
        'form_id' => 2,
  • 9.
        'field_id' => 2,
  • 10.
        'domains' => $domList,
  • 11.
        'validation_message' => __( '<strong>%s</strong> emails not cleared.' ),
  • 12.
        'mode' => 'limit'
  • 13.
    ) );
$emails_allowed_options = get_option( 'emails_allowed_option_name' ); // Array of All Options $allowed_email_domains_0 = $emails_allowed_options['allowed_email_domains_0']; // Allowed email domains $allowed_email_domains_0 =str_replace(' ', '', $allowed_email_domains_0); // removing blank spaces $domList = explode(',', $allowed_email_domains_0 ); $domList = array_change_key_case($domList, CASE_LOWER); new GW_Email_Domain_Validator( array( 'form_id' => 2, 'field_id' => 2, 'domains' => $domList, 'validation_message' => __( '<strong>%s</strong> emails not cleared.' ), 'mode' => 'limit' ) );

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter