Last active
February 16, 2018 09:48
-
-
Save ramiy/304682bbab676801ed76a4a7618f860e to your computer and use it in GitHub Desktop.
Check for required Elementor version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.', 'text-domain' ), | |
'<strong>' . esc_html__( 'Plugin Name', 'text-domain' ) . '</strong>', | |
'<strong>' . esc_html__( 'Elementor', 'text-domain' ) . '</strong>', | |
'2.0.0' | |
); | |
printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message ); | |
} | |
if ( ! version_compare( ELEMENTOR_VERSION, '2.0.0', '>=' ) ) { | |
add_action( 'admin_notices', 'admin_notice_missing_main_plugin' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment