wp_create_nonce( 'stm_install_plugin' ), 'stm_actions_plugin' => wp_create_nonce( 'stm_actions_plugin' ), 'stm_actions_plugin_info' => wp_create_nonce( 'stm_actions_plugin_info' ), 'stm_action_developer_access' => wp_create_nonce( 'stm_action_developer_access' ), ) ); wp_enqueue_script( 'stm-admin' ); } public static function localize_vars() { $localizeVars = array( 'stm_install_plugin' => wp_create_nonce( 'stm_install_plugin' ), 'stm_actions_plugin' => wp_create_nonce( 'stm_actions_plugin' ), 'stm_actions_plugin_info' => wp_create_nonce( 'stm_actions_plugin_info' ), ); return $localizeVars; } public static function register_pages() { $theme = STM_Theme_Info::get_theme_info(); $theme_name = $theme['name']; $theme_name_sanitized = 'stm-admin'; /** * Item Registration */ add_menu_page( $theme_name, $theme_name, 'manage_options', $theme_name_sanitized, [ self::class, 'startup' ], get_template_directory_uri() . '/assets/admin/images/icon.png', '2.11' ); /** * Demo Import */ add_submenu_page( $theme_name_sanitized, 'Demo import', 'Demo import', 'manage_options', $theme_name_sanitized . '-demos', [ self::class, 'install_demo' ] ); /** * Plugins */ add_submenu_page( $theme_name_sanitized, 'Plugins', 'Plugins', 'manage_options', $theme_name_sanitized . '-plugins', [ self::class, 'plugins' ] ); /** * System status */ add_submenu_page( $theme_name_sanitized, 'System status', 'System status', 'manage_options', $theme_name_sanitized . '-system-status', [ self::class, 'system_status' ] ); } public static function get_admin_tabs( $screen = 'welcome' ) { $theme_name_sanitized = 'stm-admin'; $screen = $screen ?: $theme_name_sanitized; ?>
Activation alert:

Dashboard Install Demos Plugins System Status Theme Options