'Ari_Adminer', 'version' => ARIADMINER_VERSION, 'path' => ARIADMINER_PATH, 'url' => ARIADMINER_URL, 'assets_url' => ARIADMINER_ASSETS_URL, 'view_path' => ARIADMINER_PATH . 'includes/views/', 'main_file' => __FILE__, ) ); $plugin->init(); } } if ( ! function_exists( 'ari_adminer_activation_check' ) ) { function ari_adminer_activation_check() { $min_php_version = '5.4.0'; $min_wp_version = '3.4'; $current_wp_version = get_bloginfo( 'version' ); $current_php_version = PHP_VERSION; $is_supported_php_version = version_compare( $current_php_version, $min_php_version, '>=' ); $is_spl_installed = function_exists( 'spl_autoload_register' ); $is_supported_wp_version = version_compare( $current_wp_version, $min_wp_version, '>=' ); if ( ! $is_supported_php_version || ! $is_spl_installed || ! $is_supported_wp_version ) { deactivate_plugins( basename( ARIADMINER_EXEC_FILE ) ); $recommendations = array(); if ( ! $is_supported_php_version ) $recommendations[] = sprintf( __( 'update PHP version on your server from v. %s to at least v. %s', 'ari-adminer' ), $current_php_version, $min_php_version ); if ( ! $is_spl_installed ) $recommendations[] = __( 'install PHP SPL extension', 'ari-adminer' ); if ( ! $is_supported_wp_version ) $recommendations[] = sprintf( __( 'update WordPress v. %s to at least v. %s', 'ari-adminer' ), $current_wp_version, $min_wp_version ); wp_die( sprintf( __( '"ARI Adminer" can not be activated. It requires PHP version 5.4.0+ with SPL extension and WordPress 4.0+.

Recommendations: %s.

Back', 'ari-adminer' ), join( ', ', $recommendations ), get_dashboard_url( get_current_user_id() ) ) ); } else { ari_adminer_init(); } } } add_action( 'plugins_loaded', 'ari_adminer_init' ); register_activation_hook( ARIADMINER_EXEC_FILE, 'ari_adminer_activation_check' );