display( 'Name' ), esc_html__( 'About', 'atavist' ) . ' ' . $theme->display( 'Name' ), 'activate_plugins', 'atavist-welcome', array( $this, 'welcome_screen', ) ); add_action( 'admin_print_styles-' . $page, array( $this, 'enqueue_styles' ) ); } /** * Enqueue styles. */ public function enqueue_styles() { global $atavist_version; wp_enqueue_style( 'atavist-welcome', get_template_directory_uri() . '/admin/assets/css/welcome.css', array(), $atavist_version ); } /** * Add admin notice. */ public function admin_notice() { global $atavist_version, $pagenow; wp_enqueue_style( 'atavist-message', get_template_directory_uri() . '/admin/assets/css/message.css', array(), $atavist_version ); // Let's bail on theme activation. if ( 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { add_action( 'admin_notices', array( $this, 'welcome_notice' ) ); update_option( 'atavist_admin_notice_welcome', 1 ); // No option? Let run the notice wizard again.. } elseif ( ! get_option( 'atavist_admin_notice_welcome' ) ) { add_action( 'admin_notices', array( $this, 'welcome_notice' ) ); } } /** * Hide a notice if the GET variable is set. */ public static function hide_notices() { if ( isset( $_GET['atavist-hide-notice'] ) && isset( $_GET['_atavist_notice_nonce'] ) ) { if ( ! wp_verify_nonce( sanitize_text_field(wp_unslash($_GET['_atavist_notice_nonce'])), 'atavist_hide_notices_nonce' ) ) { wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'atavist' ) ); } if ( ! current_user_can( 'manage_options' ) ) { wp_die( esc_html__( 'Cheatin’ huh?', 'atavist' ) ); } $hide_notice = sanitize_text_field( wp_unslash($_GET['atavist-hide-notice']) ); update_option( 'atavist_admin_notice_' . $hide_notice, 1 ); } } /** * Show welcome notice. */ public function welcome_notice() { ?>
" class="button button-primary docs" target="_blank">*/ ?> " class="button button-secondary docs" target="_blank"> */ ?>