=' ) ){
add_action('admin_notices', 'addonskit_admin_notice_required_elementor_version');
return;
}
AddonsKitElementor\Classes\Addons_Kit::instance();
}
add_action('plugins_loaded', 'addonskit_start');
/**
* Admin notice for required php version
*
* @return void
*/
function addonskit_admin_notice_required_php_version() {
$notice = sprintf(
/* translators: 1: Plugin name, 2: PHP, 3: Required PHP version */
esc_html__('"%1$s" requires "%2$s" version %3$s or greater.', 'addonskit-elementor'),
'' . esc_html__('AddonsKit Elementor', 'addonskit-elementor') . '',
'' . esc_html__('PHP', 'addonskit-elementor') . '',
ADDONSKIT_MINIMUM_PHP_VERSION
);
printf( '
', wp_kses_post( $notice ) );
}
/**
* Admin notice for elementor if missing
*
* @return void
*/
function addonskit_admin_notice_elementor_missing() {
if( file_exists( WP_PLUGIN_DIR . '/elementor/elementor.php') ) {
$notice_title = __('Activate Elementor', 'addonskit-elementor');
$notice_url = wp_nonce_url('plugins.php?action=activate&plugin=elementor/elementor.php&plugin_status=all&paged=1', 'activate-plugin_elementor/elementor.php');
} else {
$notice_title = __('Install Elementor', 'addonskit-elementor');
$notice_url = wp_nonce_url( self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor' );
}
$notice = sprintf(
/* translators: 1: Plugin name, 2: Elementor, 3: Elementor installation link */
esc_html__('%1$s requires %2$s to be installed and activated to function properly. %3$s', 'addonskit-elementor'),
'' . esc_html__('AddonsKit Elementor', 'addonskit-elementor') . '',
'' . esc_html__('Elementor', 'addonskit-elementor') . '',
'' . $notice_title . ''
);
printf('', wp_kses_post( $notice ) );
}
/**
* Admin notice for required elementor version
*
* @return void
*/
function addonskit_admin_notice_required_elementor_version() {
$notice_title = __('Update Elementor', 'addonskit-elementor');
$notice_url = wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=elementor/elementor.php'), 'upgrade-plugin_elementor/elementor.php');
$notice = sprintf(
/* translators: 1: Plugin name, 2: Elementor, 3: Required Elementor version */
esc_html__('"%1$s" requires "%2$s" version %4$s or greater. %3$s', 'addonskit-elementor'),
'' . esc_html__('AddonsKit Elementor', 'addonskit-elementor') . '',
'' . esc_html__('Elementor', 'addonskit-elementor') . '',
'' . $notice_title . '',
ADDONSKIT_MINIMUM_ELEMENTOR_VERSION
);
printf('', esc_html( $notice ) );
}