display( 'Name' ), esc_html__( 'About', 'editorial' ) . ' ' . $theme->display( 'Name' ), 'activate_plugins', 'editorial-welcome', array( $this, 'welcome_screen' ) ); } /** * Enqueue styles. */ public function about_theme_styles( $hook ) { if( 'appearance_page_editorial-welcome' != $hook && 'themes.php' != $hook ) { return; } global $editorial_version; wp_enqueue_style( 'editorial-theme-style', get_template_directory_uri() . '/inc/about-theme/about.css', array(), $editorial_version ); } /** * Add admin notice. */ public function admin_notice() { global $editorial_version, $pagenow; // Let's bail on theme activation. if ( 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { add_action( 'admin_notices', array( $this, 'welcome_notice' ) ); update_option( 'editorial_admin_notice_welcome', 1 ); // No option? Let run the notice wizard again.. } elseif( ! get_option( 'editorial_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['editorial-hide-notice'] ) && isset( $_GET['_editorial_notice_nonce'] ) ) { if ( ! wp_verify_nonce( $_GET['_editorial_notice_nonce'], 'editorial_hide_notices_nonce' ) ) { wp_die( __( 'Action failed. Please refresh the page and retry.', 'editorial' ) ); } if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Cheatin’ huh?', 'editorial' ) ); } $hide_notice = sanitize_text_field( $_GET['editorial-hide-notice'] ); update_option( 'editorial_admin_notice_' . $hide_notice, 1 ); } } /** * Show welcome notice. */ public function welcome_notice() { $theme = wp_get_theme( get_template() ); $theme_name = $theme->get( 'Name' ); ?>

', '' ); ?>

get( 'Name' ); $theme_description = $theme->get( 'Description' ); $theme_uri = $theme->get( 'ThemeURI' ); $author_uri = $theme->get( 'AuthorURI' ); $author_name = $theme->get( 'Author' ); ?>

%2$s', 'editorial' ), $author_uri, $author_name ); ?>

{ $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() ); $theme_name = $theme->get( 'Name' ); ?>
intro(); ?>

|
intro(); ?>
'mysterythemes', 'per_page' => 100 ); // Set the $request array. $request = array( 'body' => array( 'action' => 'query_themes', 'request' => serialize( (object)$args ) ) ); $themes = $this->editorial_get_themes( $request ); $active_theme = wp_get_theme()->get( 'Name' ); $counter = 1; // For currently active theme. foreach ( $themes->themes as $theme ) { if( $active_theme == $theme->name ) { ?>

: name ); ?>

themes as $theme ) { if( $active_theme != $theme->name ) { // Set the argument array with author name. $args = array( 'slug' => $theme->slug, ); // Set the $request array. $request = array( 'body' => array( 'action' => 'theme_information', 'request' => serialize( (object)$args ) ) ); $theme_details = $this->editorial_get_themes( $request ); if( empty( $theme_details->template ) ) { ?>

name ); ?>

slug )->exists() ) { ?> 'install-theme', 'theme' => $theme->slug, ), self_admin_url( 'update.php' ) ); ?>
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(); ?>

id ) { $theme = wp_get_theme( get_template() ); $theme_name = $theme->get( 'Name' ); $text = sprintf( __( 'If you like %1$s please leave us a %2$s rating. A huge thank you from Mystery Themes in advance!', 'editorial' ), esc_html( $theme_name ), '★★★★★' ); } return $text; } } endif; return new Editorial_About();