display( 'Name' ), esc_html__( 'About', 'corporatecorner' ) . ' ' . $theme->display( 'Name' ), 'activate_plugins', 'welcome', array( $this, 'welcome_screen' ) ); add_action( 'admin_print_styles-' . $page, array( $this, 'enqueue_styles' ) ); } /** * Enqueue styles. */ public function enqueue_styles() { wp_enqueue_style( 'corporatecorner-welcome', get_template_directory_uri() . '/vendors/pro/welcome.css', array(), '1.0' ); } /** * Add admin notice. */ public function admin_notice() { global $pagenow; wp_enqueue_style( 'corporatecorner-message', get_template_directory_uri() . '/vendors/pro/message.css', array(), '1.0' ); // Let's bail on theme activation. if ( 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { add_action( 'admin_notices', array( $this, 'welcome_notice' ) ); update_option( 'bpt_admin_notice_welcome', 1 ); // No option? Let run the notice wizard again.. } elseif( ! get_option( 'bpt_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['corporatecorner-hide-notice'] ) && isset( $_GET['_corporatecorner_notice_nonce'] ) ) { if (isset( $_POST['_corporatecorner_notice_nonce'] ) && ! wp_verify_nonce( wp_unslash($_GET['_corporatecorner_notice_nonce']), 'corporatecorner_hide_notices_nonce' ) ) { /* translators: %s: plugin name. */ wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'corporatecorner' ) ); } if ( ! current_user_can( 'manage_options' ) ) /* translators: %s: plugin name. */{ wp_die( esc_html__( 'Cheatin’ huh?', 'corporatecorner' ) ); } $hide_notice = sanitize_text_field( wp_unslash( $_GET['corporatecorner-hide-notice'] ) ); update_option( 'bpt_admin_notice_' . $hide_notice, 1 ); } } /** * Show welcome notice. */ public function welcome_notice() { ?>

', '' ); ?>

get( 'Name' )) ." ". esc_html( $theme->get( 'Version' ) ); ?>

display( 'Description' ) ); ?>

{ $current_tab . '_screen' }(); } // Fallback to about screen. return $this->about_screen(); } /** * Output the about screen. */ public function about_screen() { $theme = wp_get_theme( get_template() ); ?>
intro(); ?>

|
intro(); ?>

get_contents( $changelog_file ); $changelog_list = $this->parse_changelog( $changelog ); echo wp_kses_post( $changelog_list ); } ?>
'; foreach ( $changes as $index => $line ) { $changelog .= wp_kses_post( preg_replace( '~(=\s*Version\s*(\d+(?:\.\d+)+)\s*=|$)~Uis', '${1}', $line ) ); } $changelog .= ''; } return wp_kses_post( $changelog ); } /** * Output the free vs pro screen. */ public function free_vs_pro_screen() { ?>
intro(); ?>

1 3

1 3