*/ class Setup extends Base { public function __construct( $plugin ) { $this->plugin = $plugin; $this->server = $this->plugin['server']; $this->slug = $this->plugin['TextDomain']; $this->name = $this->plugin['Name']; $this->steps = $this->plugin['steps']; $this->admin_url = admin_url( 'admin.php' ); $this->action( 'admin_menu', 'add_pseudo_menu' ); $this->action( 'admin_init', 'render_content' ); $this->action( 'admin_head', 'save_setup' ); $this->action( 'admin_print_styles', 'enqueue_scripts' ); } public function enqueue_scripts() { if ( !isset( $_GET['page'] ) || "{$this->slug}_setup" !== $_GET['page'] ) { return; } wp_enqueue_style( 'googleapis', 'https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400&display=swap' ); wp_enqueue_style( 'codexpert-product-wizard', plugins_url( 'assets/css/wizard.css', __FILE__ ), [], '' ); } /** * Add admin menus/screens. */ public function add_pseudo_menu() { add_dashboard_page( '', '', 'manage_options', "{$this->slug}_setup", '' ); } public function render_content() { if ( !isset( $_GET['page'] ) || "{$this->slug}_setup" !== $_GET['page'] ) { return; } $this->header(); $this->pagination(); $this->body(); $this->footer(); exit; } public function header() { ?> >