current_theme_meta(); $this->init_actions(); } /** * Current theme meta * * @since 1.0 */ public function current_theme_meta() { $current_theme = wp_get_theme(); $this->theme_name = strtolower( preg_replace( '#[^a-zA-Z]#', '', $current_theme->get( 'Name' ) ) ); $this->page_slug = 'alpha-optimize-wizard'; $this->page_url = 'admin.php?page=' . $this->page_slug; } /** * Init actions * * @since 1.0 */ public function init_actions() { add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); } /** * Add optimize wizard menu item to Alpha admin menu. * * @since 1.0 */ public function add_admin_menu() { add_submenu_page( 'alpha', esc_html__( 'Optimize Wizard', 'alpus' ), esc_html__( 'Optimize Wizard', 'alpus' ) . '' . esc_html( 'PRO', 'alpus' ) . '', 'manage_options', $this->page_slug, array( $this, 'view_optimize_wizard' ), 3 ); } /** * Display optimize wizard * * @since 1.0 */ public function view_optimize_wizard() { $admin_config = Alpha_Admin::get_instance()->admin_config; Alpha_Admin_Panel::get_instance()->view_header( 'activation', $admin_config, array() ); include alpha_framework_path( ALPHA_FRAMEWORK_ADMIN . '/panel/views/go_pro.php' ); Alpha_Admin_Panel::get_instance()->view_footer( 'activation', $admin_config ); } } endif; add_action( 'after_setup_theme', 'alpha_theme_optimize_optimize_wizard', 10 ); if ( ! function_exists( 'alpha_theme_optimize_optimize_wizard' ) ) : function alpha_theme_optimize_optimize_wizard() { Alpha_Optimize_Wizard::get_instance(); } endif;