Plugin Directory

Changeset 2896346


Ignore:
Timestamp:
04/10/2023 01:21:29 AM (3 years ago)
Author:
tompec
Message:

update WP compatibility

Location:
validator-pizza/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • validator-pizza/trunk/readme.txt

    r2640457 r2896346  
    11=== MailCheck.ai ===
    22Contributors: tompec
    3 Tags: block,disposable,throwaway,email,validation
     3Tags: block,disposable,throwaway,email,validation,check
    44Requires at least: 3.0
    5 Tested up to: 5.8.2
    6 Stable tag: 1.2.2
     5Tested up to: 6.2
     6Stable tag: 1.2.3
    77
    8 Block disposable email addresses from registering or commenting on your site.
     8Prevent disposable email addresses from registering or commenting on your site with MailCheck.ai.
    99
    1010== Description ==
    11 MailCheck.ai prevents disposable emails from being used when someone registers or comments on your site.
     11MailCheck.ai is a powerful WordPress plugin that prevents disposable or throwaway email addresses from registering or commenting on your site. This helps to protect your site from spam and maintain the quality of your user base.
    1212
    13 It uses the API of the website https://www.mailcheck.ai, which is always up to date and contains the latest domains.
     13The plugin uses the API provided by https://www.mailcheck.ai, which is constantly updated to include the latest disposable email domains. This ensures your site stays protected against new disposable email providers.
    1414
    15 The plugin is free and works immediately after installation.
     15MailCheck.ai is free to use and starts working immediately after installation. No registration or configuration is required.
    1616
    1717== Installation ==
    18 Upload the plugin to your blog, activate it and you are done! Your site is now protected.
     18- Download the plugin and extract the contents of the zip file.
     19- Upload the extracted 'mailcheck-ai' folder to the '/wp-content/plugins/' directory of your WordPress installation.
     20- Activate the plugin through the 'Plugins' menu in your WordPress admin dashboard.
     21- That's it! Your site is now protected against disposable email addresses.
     22
     23== Frequently Asked Questions ==
     24= Does MailCheck.ai require an API key? =
     25No, MailCheck.ai does not require an API key. It works out of the box after installation without any additional configuration.
     26
     27= Is MailCheck.ai compatible with other email validation plugins? =
     28Yes, MailCheck.ai is designed to work seamlessly with other email validation plugins. However, please note that using multiple email validation plugins might cause conflicts or unexpected behavior.
     29
     30= Can I customize the error message displayed to users with disposable email addresses? =
     31Currently, MailCheck.ai does not provide an option to customize the error message. The default WordPress error message for invalid email addresses will be displayed.
    1932
    2033== Changelog ==
     34= 1.2.3 =
     35* Improved URL encoding when constructing the request URL.
     36* Added a condition to check the API response code.
     37* Added an expiration time to the API response cache.
    2138= 1.2.0 =
    2239* Update WordPress compatibility and rebrand from Validator.pizza to MailCheck.ai
  • validator-pizza/trunk/validator-pizza.php

    r2640457 r2896346  
    66 * Plugin Name: MailCheck.ai
    77 * Description: This plugin prevents throwaway emails from signing up or commenting on your website. It is ready to use out of the box and requires no registration. It uses the MailCheck.ai API, which is always up to date and includes the latest domains.
    8  * Version:     1.2.2
     8 * Version:     1.2.3
    99 * Author:      MailCheck.ai
    1010 * Author URI:  https://www.mailcheck.ai
     
    2424        list($local, $domain) = explode('@', $email, 2);
    2525
    26         // Prepare tu request URL to send the domain only
    27         $request_url = "https://api.mailcheck.ai/domain/" . $domain;
     26        // Prepare the request URL to send the domain only
     27        $request_url = "https://api.mailcheck.ai/domain/" . urlencode($domain);
    2828
    2929        // Check if the domain is cached
     
    3232            $response = wp_remote_get($request_url, ['timeout' => 5]);
    3333
    34             // If request fails, return true to not block the email validation
    35             if (! is_array($response)) {
     34            // If request fails or the response code is not 200, return true to not block the email validation
     35            if (!is_array($response) || $response['response']['code'] != 200) {
    3636                return true;
    3737            }
     
    4040            $json = json_decode($response['body']);
    4141
    42             // Store the result
    43             set_transient('vp_' . $domain, $json);
     42            // Store the result with a cache expiration time of 1 day
     43            set_transient('vp_' . $domain, $json, DAY_IN_SECONDS);
    4444        }
    4545
Note: See TracChangeset for help on using the changeset viewer.