display( 'Name' ), $bluetooth_speaker_theme->display( 'Name' ), 'manage_options', 'bluetooth-speaker', 'bluetooth_speaker_do_admin_page' ); } add_action( 'admin_menu', 'bluetooth_speaker_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(); $bluetooth_speaker_theme = wp_get_theme(); if ( is_admin() && ! get_user_meta( get_current_user_id(), 'gs_notice_dismissed' ) && $current_screen->base != 'appearance_page_bluetooth-speaker' ) { echo '
'; echo '

' . sprintf( esc_html__( 'Welcome! Thank you for choosing %1$s.', 'bluetooth-speaker' ), esc_html( $bluetooth_speaker_theme->get( 'Name' ) ) ) . '

'; echo '

' . esc_html__( 'By clicking "Get Started," you can access our theme features.', 'bluetooth-speaker' ) . '

'; echo '
'; echo '

' . sprintf( esc_html__( 'Get started with %s', 'bluetooth-speaker' ), esc_html( $bluetooth_speaker_theme->get( 'Name' ) ) ) . '

'; echo '

' . esc_html__( 'GO FOR PREMIUM', 'bluetooth-speaker' ) . '

'; echo '
'; echo 'Dismiss'; echo '
'; } } /** * Register dismissal of the getting started notification. * Acts on the dismiss link. * If clicked, the admin notice disappears and will no longer be visible to this user. */ public function getting_started_notice_dismissed() { if ( isset( $_GET['gs-notice-dismissed'] ) ) { add_user_meta( get_current_user_id(), 'gs_notice_dismissed', 'true' ); } } /** * Deletes the getting started notice's dismiss status upon theme switch. */ public function flush_dismiss_status() { delete_user_meta( get_current_user_id(), 'gs_notice_dismissed' ); } } new Titan_Notice_Handler(); /** * Render admin page. * * @since 1.0.0 */ function bluetooth_speaker_do_admin_page() { $bluetooth_speaker_theme = wp_get_theme(); ?>

Name ); ?>

get( 'Description' ) ) ) ); ?>