display( 'Name' ), $ac_maintenance_theme->display( 'Name' ), 'manage_options', 'ac-maintenance', 'ac_maintenance_do_admin_page' ); } add_action( 'admin_menu', 'ac_maintenance_admin_menu_page' ); /** * Enqueue getting started styles and scripts */ function titan_widgets_backend_enqueue() { wp_enqueue_style( 'titan-getting-started', get_template_directory_uri() . '/about-theme/about-theme.css' ); } add_action( 'admin_enqueue_scripts', 'titan_widgets_backend_enqueue' ); /** * Class Titan_Notice_Handler */ class Titan_Notice_Handler { public static $nonce; /** * Empty Constructor */ public function __construct() { // Activation notice add_action( 'switch_theme', array( $this, 'flush_dismiss_status' ) ); add_action( 'admin_init', array( $this, 'getting_started_notice_dismissed' ) ); add_action( 'admin_notices', array( $this, 'titan_theme_info_welcome_admin_notice' ), 3 ); add_action( 'wp_ajax_titan_getting_started', array( $this, 'titan_getting_started' ) ); } /** * Display an admin notice linking to the about page */ public function titan_theme_info_welcome_admin_notice() { $current_screen = get_current_screen(); $ac_maintenance_theme = wp_get_theme(); if ( is_admin() && ! get_user_meta( get_current_user_id(), 'gs_notice_dismissed' ) && $current_screen->base != 'appearance_page_ac-maintenance' ) { echo '
' . sprintf( esc_html__( 'Welcome! Thank you for choosing %1$s.', 'ac-maintenance' ), esc_html( $ac_maintenance_theme->get( 'Name' ) ) ) . '
'; echo '' . esc_html__( 'By clicking "Get Started," you can access our theme features.', 'ac-maintenance' ) . '
'; echo ''; echo 'Dismiss'; echo '