theme_screenshot = get_template_directory_uri()."/screenshot.png"; } else { $this->theme_screenshot = get_stylesheet_directory_uri()."/screenshot.png"; } $this->theme_name = $theme->get( 'Name' ); } /** * Localize array for import button AJAX request. */ public function azure_news_enqueue_scripts() { wp_enqueue_style( 'azure-news-admin-style', get_template_directory_uri() . '/inc/admin/assets/css/admin.css', array(), AZURE_NEWS_VERSION ); wp_enqueue_script( 'azure-news-plugin-install-helper', get_template_directory_uri() . '/inc/admin/assets/js/plugin-handle.js', array( 'jquery' ), AZURE_NEWS_VERSION ); $demo_importer_plugin = WP_PLUGIN_DIR . '/one-click-demo-import/one-click-demo-import.php'; if ( ! file_exists( $demo_importer_plugin ) ) { $action = 'install'; } elseif ( file_exists( $demo_importer_plugin ) && !is_plugin_active( 'one-click-demo-import/one-click-demo-import.php' ) ) { $action = 'activate'; } else { $action = 'redirect'; } wp_localize_script( 'azure-news-plugin-install-helper', 'azAdminObject', array( 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ), '_wpnonce' => wp_create_nonce( 'azure_news_plugin_install_nonce' ), 'buttonStatus' => esc_html( $action ) ) ); } /** * Add admin welcome notice. */ public function azure_news_welcome_notice() { if ( isset( $_GET['activated'] ) ) { update_option( 'azure_news_admin_notice_welcome', true ); } $welcome_notice_option = get_option( 'azure_news_admin_notice_welcome' ); // Let's bail on theme activation. if ( $welcome_notice_option ) { add_action( 'admin_notices', array( $this, 'azure_news_welcome_notice_html' ) ); } } /** * Hide a notice if the GET variable is set. */ public static function azure_news_hide_welcome_notices() { if ( isset( $_GET['azure-news-hide-welcome-notice'] ) && isset( $_GET['_azure_news_welcome_notice_nonce'] ) ) { if ( ! wp_verify_nonce( $_GET['_azure_news_welcome_notice_nonce'], 'azure_news_hide_welcome_notices_nonce' ) ) { wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'azure-news' ) ); } if ( ! current_user_can( 'manage_options' ) ) { wp_die( esc_html__( 'Cheat in ’ huh?', 'azure-news' ) ); } $hide_notice = sanitize_text_field( $_GET['azure-news-hide-welcome-notice'] ); update_option( 'azure_news_admin_notice_' . $hide_notice, false ); } } /** * function to display welcome notice section */ public function azure_news_welcome_notice_html() { $current_screen = get_current_screen(); if ( $current_screen->id !== 'dashboard' && $current_screen->id !== 'themes' ) { return; } ?>

theme_name ); ?>

Demo Importer Plugin and redirect to the theme settings page. In order to summon azure news theme settings, click on the Theme Settings buton in below.
And Thank so much for being a part of us.', 'azure-news' ) ); ?>

%1$s looks like? You can browse from our demos and see the live previews before you get started.', 'azure-news' ), $this->theme_name ); ?>

%1$s and its functionality. Let this detailed documentation navigate you through any confusion along the way. Cheers!', 'azure-news' ), $this->theme_name ); ?>