Skip to content

Commit

Permalink
Merge pull request #3 from eduardovillao/update-wp-6.5
Browse files Browse the repository at this point in the history
Support to wp 6.5
  • Loading branch information
eduardovillao authored Apr 7, 2024
2 parents c056ca9 + 25f60d1 commit 8286362
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
17 changes: 5 additions & 12 deletions form-masks-for-elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Description: Form Masks for Elementor create a custom control in field advanced tab for your customize your fields with masks. This plugin require the Elementor Pro (Form Widget).
* Author: EduardoVillao.me
* Author URI: https://eduardovillao.me/
* Version: 1.6.3
* Requires at least: 5.4
* Version: 1.6.4
* Requires at least: 5.5
* Requires PHP: 7.0
* Text Domain: form-masks-for-elementor
* License: GPL-2.0+
Expand All @@ -29,30 +29,27 @@
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}

define( 'FME_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'FME_PLUGN_URL', plugin_dir_url( __FILE__ ) );
define( 'FME_VERSION' , '1.6.3' );
define( 'FME_VERSION' , '1.6.4' );
define( 'FME_PHP_MINIMUM_VERSION', '7.0' );
define( 'FME_WP_MINIMUM_VERSION', '5.4' );
define( 'FME_WP_MINIMUM_VERSION', '5.5' );

/**
* Check PHP and WP version before include plugin class
*
* @since 1.6
*/
if( ! version_compare( PHP_VERSION, FME_PHP_MINIMUM_VERSION, '>=' ) ) {

add_action( 'admin_notices', 'fme_admin_notice_php_version_fail' );

} elseif( ! version_compare( get_bloginfo( 'version' ), FME_WP_MINIMUM_VERSION, '>=' ) ) {

add_action( 'admin_notices', 'fme_admin_notice_wp_version_fail' );

} else {

include_once FME_PLUGIN_PATH . 'includes/class-fme-plugin.php';
}

Expand All @@ -63,15 +60,13 @@
* @return void
*/
function fme_admin_notice_php_version_fail() {

$message = sprintf(
esc_html__( '%1$s requires PHP version %2$s or greater.', 'form-masks-for-elementor' ),
'<strong>Form masks for Elementor</strong>',
FME_PHP_MINIMUM_VERSION
);

$html_message = sprintf( '<div class="notice notice-error"><p>%1$s</p></div>', $message );

echo wp_kses_post( $html_message );
}

Expand All @@ -82,14 +77,12 @@ function fme_admin_notice_php_version_fail() {
* @return void
*/
function fme_admin_notice_wp_version_fail() {

$message = sprintf(
esc_html__( '%1$s requires WordPress version %2$s or greater.', 'form-masks-for-elementor' ),
'<strong>Form masks for Elementor</strong>',
FME_WP_MINIMUM_VERSION
);

$html_message = sprintf( '<div class="notice notice-error"><p>%1$s</p></div>', $message );

echo wp_kses_post( $html_message );
}
10 changes: 7 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: evcode
Donate link: https://eduardovillao.me/
Tags: elementor, form, mask, elementor mask, formulario, form mask
Requires at least: 5.4
Tested up to: 6.2
Stable tag: 1.6.3
Requires at least: 5.5
Tested up to: 6.5
Stable tag: 1.6.4
Requires PHP: 7.0
License: GPLv2License
URI:https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -85,6 +85,10 @@ Please, send to me: [plugins@eduardovillao.me](mailto:plugins@eduardovillao.me)

== Changelog ==

= 1.6.5 =
* Changed: compatibility with WordPress 6.5.
* Changed: code improvements.

= 1.6.3 =
* Changed: compatibility with WordPress 6.2.

Expand Down

0 comments on commit 8286362

Please sign in to comment.