theme_name = $theme->Name; $this->theme_version = $theme->Version; /* Enqueue Styles & Scripts for Welcome Page */ add_action('admin_enqueue_scripts', array($this, 'welcome_styles_and_scripts')); /* Hide Notice */ add_filter('wp_loaded', array($this, 'hide_admin_notice'), 10); /* Create a Welcome Page */ add_action('wp_loaded', array($this, 'admin_notice'), 20); add_action('after_switch_theme', array($this, 'erase_hide_notice')); } /** Trigger Welcome Message Notification */ public function admin_notice() { $hide_notice = get_option('bura_hide_notice2'); if (!$hide_notice) { add_action('admin_notices', array($this, 'admin_notice_content')); } } /** Welcome Message Notification */ public function admin_notice_content() { $screen = get_current_screen(); if ('appearance_page_bura-welcome' === $screen->id || (isset($screen->parent_file) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id) || 'theme-install' === $screen->id) { return; } ?>
theme_version); } } public function erase_hide_notice() { delete_option('bura_hide_notice2'); } } new BURA_WELCOME(); endif;