=' ) ) {
add_action( 'admin_notices', [ $this, 'admin_notice_minimum_elementor_version' ] );
return;
}
// Check for required PHP version
if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) {
add_action( 'admin_notices', [ $this, 'admin_notice_minimum_php_version' ] );
return;
}
// Once we get here, We have passed all validation checks so we can safely include our plugin
require_once( 'plugin.php' );
}
/**
* Admin notice
*
* Warning when the site doesn't have Elementor installed or activated.
*
* @since 1.0.0
*
* @access public
*/
public function admin_notice_missing_main_plugin() {
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );
$message = sprintf(
/* translators: 1: Plugin name 2: Elementor */
esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'elementor-button-fixed' ),
'' . esc_html__( 'Elementor Test Extension', 'elementor-button-fixed' ) . '',
'' . esc_html__( 'Elementor', 'elementor-button-fixed' ) . ''
);
printf( '
', $message );
}
/**
* Admin notice
*
* Warning when the site doesn't have a minimum required Elementor version.
*
* @since 1.0.0
*
* @access public
*/
public function admin_notice_minimum_elementor_version() {
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );
$message = sprintf(
/* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */
esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'elementor-button-fixed' ),
'' . esc_html__( 'Elementor Test Extension', 'elementor-button-fixed' ) . '',
'' . esc_html__( 'Elementor', 'elementor-button-fixed' ) . '',
self::MINIMUM_ELEMENTOR_VERSION
);
printf( '', $message );
}
/**
* Admin notice
*
* Warning when the site doesn't have a minimum required PHP version.
*
* @since 1.0.0
*
* @access public
*/
public function admin_notice_minimum_php_version() {
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );
$message = sprintf(
/* translators: 1: Plugin name 2: PHP 3: Required PHP version */
esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'elementor-button-fixed' ),
'' . esc_html__( 'Elementor Test Extension', 'elementor-button-fixed' ) . '',
'' . esc_html__( 'PHP', 'elementor-button-fixed' ) . '',
self::MINIMUM_PHP_VERSION
);
printf( '', $message );
}
}
MC_Elementor_Custom_Widget::instance();