/**
  * Create / Get the instance of this class.
  *
  * @return TR_Review_Info Instance of this class.
  */
 public static function get_instance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #2
0
function theme_review_dropdown()
{
    global $wp_admin_bar, $wpdb;
    $content = '';
    if (!is_super_admin() || !is_admin_bar_showing()) {
        return;
    }
    $args = array('id' => 'theme_review_bar', 'parent' => 'top-secondary', 'title' => __('Theme Review', 'theme-review'), 'href' => false);
    $trt_theme = wp_get_theme();
    $trt_author_uri = $trt_theme->get('AuthorURI');
    $trt_theme_uri = $trt_theme->get('ThemeURI');
    $trt_author_uri = '<a href="' . esc_url($trt_author_uri) . '">' . __('Check Author URI', 'theme-review') . '</a>';
    $trt_theme_uri = '<a href="' . esc_url($trt_theme_uri) . '">' . __('Check Theme URI', 'theme-review') . '</a>';
    $trt_textdomain = $trt_theme->get('TextDomain');
    if (!$trt_textdomain) {
        $trt_textdomain = __('<b class="theme-review-required">REQUIRED</b>: Text domain is missing or blank in style.css', 'theme-review');
    }
    // id, name, description
    $requirements = array(array('theme_review_code', __('Code', 'theme-review'), __('Check for any php or javascript errors, warnings or notices on different pages of the theme.', 'theme-review') . '<br>' . __('Perform a search, check the 404 page, and make sure that you also test any custom functionality and custom widgets.', 'theme-review') . '<br>' . __('Check for broken images and test any header, logo, and background settings.', 'theme-review') . '<br><br>' . sprintf(__('Themes are required to have a valid DOCTYPE declaration and include <a href="%s">language_attributes</a>.', 'theme-review'), esc_url('https://developer.wordpress.org/reference/hooks/language_attributes/')) . '<br> <code> &lt;!DOCTYPE html&gt;<br>&lt;html &lt;?php language_attributes(); ?&gt;></code>' . '<br><br>' . __('<i>Other HTML and css errors are not reasons for not approving a theme, but the theme should not be broken.</i>', 'theme-review') . '<br>'), array('theme_review_prefix', '<span class="theme-review-indent"></span>' . __('Prefix', 'theme-review'), __('The theme should use a unique prefix for everything the Theme defines in the public namespace.', 'theme-review') . '<br>' . __('It is not uncommon for authors to forget to prefix their functions or Classes. The recommended prefix is the theme-slug.', 'theme-review') . '<br><br>' . __('<i>Tip: use a text editor that can search entire directories to create a list of all functions.</i>', 'theme-review') . '<br><br><span class="ab-icon dashicons dashicons-visibility"></span> <a href="http://themereview.co/prefix-all-the-things/">Prefix all the things</a>' . '<br>'), array('theme_review_sanitize', '<span class="theme-review-indent"></span>' . __('Sanitize', 'theme-review'), __('Sanitize everything.', 'theme-review') . ' ' . __('If the theme uses the customizer, then each setting should have a <code>sanitize_callback</code>. Make sure that the callback function is appropriate and working.', 'theme-review') . '<br>' . __('If the theme uses meta boxes, the options needs to be sanitized before they are added or updated.', 'theme-review') . '<br>'), array('theme_review_hooks', '<span class="theme-review-indent"></span>' . __('Hooks', 'theme-review'), __('Removing or modifying non-presentational hooks is not allowed. This includes disabling the admin tool bar, removing versions, or removing rss feeds.', 'theme-review') . '<br>' . __('Examples:', 'theme-review') . '<br><code>remove_action( "wp_head", "wp_generator" )</code> ' . "<br><code>add_filter( show_admin_bar', '__return_false' );</code> " . "<br><code>remove_filter( 'the_content','wpautop' );</code> " . '<br><br>' . __('Themes should use the correct hooks for their functions.', 'theme-review') . ' ' . __('The most common issue in this section is that load_theme_textdomain, add_theme_support, and register_nav_menu(s) should be inside a function, added with <br><code>add_action( "after_setup_theme", "function_name" );</code>', 'theme-review') . '<br>'), array('theme_review_core', __('Core Functionality and Features', 'theme-review'), __('The theme should use WordPress functionality and features first, if available. This means that custom functions should not mimic or attempt to replace core functions.', 'theme-review') . '<br>' . __('(Function parameters and filters should be used instead.)', 'theme-review') . '<br>' . __('Functionality that authors often missuse includes custom pagination, hard coded search forms, options to disable comments, and custom image resizing.', 'theme-review') . '<br><br>' . __('The theme must include comments_template(). (Also see the Template section.)', 'theme-review') . '<br><br>' . __('Use get_template_directory() rather than TEMPLATEPATH to return the template path. <br> Use get_stylesheet_directory() rather than STYLESHEETPATH to return the stylesheet path.', 'theme-review') . '<br>' . __('There should be no pay wall restricting any WordPress feature.', 'theme-review') . '<br>'), array('theme_review_tags', '<span class="theme-review-indent"></span>' . __('Theme tags', 'theme-review'), __('The theme tags and description must match what the theme actually does in respect to functionality and design.', 'theme-review') . '<br><span class="ab-icon dashicons dashicons-visibility"></span>' . sprintf(__('You can view a list of all the tags <a href="%s">here</a>.', 'theme-review'), esc_url('https://make.wordpress.org/themes/handbook/review/required/theme-tags/')) . '<br>'), array('theme_review_presentation', __('Presentation vs Functionality, Plugins & favicons', 'theme-review'), __('Themes must not generate non-trivial user content or configure non-theme options or functionality.', 'theme-review') . '<br>' . __('Examples of functionality that should not be in the theme includes: social sharing, flickr widgets, custom post types, shortcodes, dashboard widgets, admin pointers, analytics, ads, SEO. This also includes making changes to login forms, admin interface, user profiles, editors etc.') . '<br><br>' . __('A theme can recommend plugins, but not include them in the theme. The theme must work without plugins, and <i>reviewers are not required to test the theme with the plugins installed.</i>', 'theme-review') . '<br><br>' . __('If implemented, favicons must be disabled by default, and there must be an option where the user can change the icon.', 'theme-review') . '<br>'), array('theme_review_documentation', __('Documentation', 'theme-review'), __('Is there enough documentation for you to set up the theme?', 'theme-review') . '<br>'), array('theme_review_language', __('Language', 'theme-review'), __('All theme text strings are to be translatable.', 'theme-review') . '<br>' . __('Text domain: ', 'theme-review') . ' ' . $trt_textdomain . '<br>' . __('WordPress must be spelled with a capital W and P. <br>A theme can be in any language, but only one.', 'theme-review') . '' . '<br><b class="theme-review-recommended">' . __('RECOMMENDED:', 'theme-review') . '</b>' . '<br><span class="ab-icon dashicons dashicons-media-code"></span>' . __('Make sure that there is a language file in the theme folder and that it refers to the correct theme.', 'theme-review') . '<br><span class="ab-icon dashicons dashicons-visibility"></span> <a href="https://developer.wordpress.org/themes/functionality/internationalization/">' . __('Theme Handbook: Internationalization.', 'theme-review') . '</a>' . "<br>" . __('A basic translation string can look like this:', 'theme-review') . '<br>' . "<code> __( 'text to be internationalized', 'text-domain' );</code><br>" . __('If a translation is echoed, it can also look like this:', 'theme-review') . '<br>' . "<code>_e( 'WordPress is the best!', 'text-domain' );</code><br>" . __('A text that looks like this would fail, since it is not translatable:', 'theme-review') . '<br>' . "<code>&lt;h2&gt;Hello World&lt;/h2&gt;</code> " . __('should be:', 'theme-review') . '<br>' . "<code>&lt;h2&gt;&lt;?php _e('Hello World', 'text-domain'); ?&gt; &lt;/h2&gt;</code><br>" . __('Translated attributes should be escaped.', 'theme-review') . ' ' . __('Example:', 'theme-review') . '<br>' . '<code>value="&lt;?php esc_attr_e("Search","text-domain" ); ?&gt;"</code>' . '<br>'), array('theme_review_licensing', __('Naming and Licensing', 'theme-review'), __('The theme needs to be 100% GPL compatible.', 'theme-review') . ' ' . __('The theme should:', 'theme-review') . '<br>' . __('-Use the license and license uri in the header of style.css.', 'theme-review') . '<br>' . __('Declare licenses of any resources included such as fonts or images, including images used in the screenshot.', 'theme-review') . '<br>' . __('Have a copyright notice: (Copyright Year Name).', 'theme-review') . '<br>' . __('The theme name must not contain trademarks, "WordPress" or "Theme".', 'theme-review') . '<br><br><span class="ab-icon dashicons dashicons-media-code"></span>' . __('Open the readme file and make sure that license and copyright has been declared for all included third party resources.', 'theme-review') . '<br><span class="ab-icon dashicons dashicons-visibility"></span> ' . sprintf(__('<a href="%s">List of GPL compatible licenses</a>.', 'theme-review'), esc_url('http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses/')) . '<br>' . sprintf(__('<a href="%s">Proper Copyright/License Attribution for Themes</a>.', 'theme-review'), esc_url('https://make.wordpress.org/themes/2014/07/08/proper-copyrightlicense-attribution-for-themes/')) . '<br>'), array('theme_review_optset', __('Options and Settings', 'theme-review'), __('Are all options in the customizer? New themes are no longer allowed to create a separate options page.', 'theme-review') . '<br>' . __('Themes must respect the user settings, such as the General, Writing, Reading and Discussion settings.', 'theme-review') . '<br><br>' . __('Common problems in this section includes <i>Display Header Text</i> under Site Title and Tagline in the customizer, background colors, and how the front page is displayed. ', 'theme-review') . '<br>' . __('If the option <i>Front page displays your latest posts</i> is chosen, then the theme must show the latest posts on the front page.', 'theme-review') . '<br>'), array('theme_review_screenshot', __('Screenshot', 'theme-review'), __('The Screenshot should be of the actual theme as it appears with default options, not a logo or mockup. If the theme is for example a niche or e-commerce theme, then shop plugins may be installed on the screenshot. The Screenshot should be in the 4:3 ratio, no bigger than 1200 x 900px.', 'theme-review') . '<br>'), array('theme_review_security', __('Security and Privacy', 'theme-review'), __('Themes must not collect user data without asking for permission. This includes google analytics campaign tracking.', 'theme-review') . '<br>' . __(' No URL shorteners should be used in the theme.', 'theme-review')), array('theme_review_escaping', '<span class="theme-review-indent"></span>' . __('Escaping', 'theme-review'), __('All untrusted data should be escaped before output. This is a very common problem.', 'theme-review') . '<br>' . __('esc_url() should be used on all URLs, including those in the "src" and "href" attributes of an HTML element.', 'theme-review') . '<br>' . '<code>&lt;img src="&lt;?php echo esc_url( $great_user_picture_url ); ?&gt;" /&gt;</code>' . '<br>' . __('esc_attr() can be used in other attributes. esc_attr_e() can be used when echoing a translation inside an attribute.', 'theme-review') . '<br><code>class="&lt;?php echo esc_attr( $stored_class ); ?&gt;"</code>' . '<br>' . __('Recommended:', 'theme-review') . '<br>' . __('esc_html() is used anytime our HTML element encloses a section of data we are outputting. esc_html_e() can be used when echoing a translation.', 'theme-review') . '<br><code>&lt;h4&gt;&lt;?php echo esc_html( $title ); ?&gt;&lt;/h4&gt;</code>' . '<br><span class="ab-icon dashicons dashicons-visibility"></span> <a href="https://codex.wordpress.org/Data_Validation">Data Validation</a>
      <a href="https://codex.wordpress.org/Validating_Sanitizing_and_Escaping_User_Data#Escaping:_Securing_Output">Escaping: Securing Output</a>' . '<br>'), array('theme_review_links', __('Selling, credits and links', 'theme-review'), $trt_author_uri . '<br>' . $trt_theme_uri . '<br>' . __('Theme URI is optional. If used, it is required to link to a page with information about the Theme. If a demonstration site is being used, the content must be related to the theme itself and not test data.', 'theme-review') . '<br>' . __(' Author URI is optional. If used it is required to link to an author\'s personal website or project/development website.', 'theme-review') . '<br><br>' . __('Check if there are any credit- or upsell links and if they are appropriate.', 'theme-review') . ' ' . __('There should only be one footer credit link.', 'theme-review') . '<br>' . __('WordPress.org links are reserved for official themes.', 'theme-review') . '<br><br>' . __('Theme shops should be selling under GPL to be in the WordPress.org repo.', 'theme-review') . '<br>' . __('There should be no links to the authors social network pages.', 'theme-review') . '<br>'), array('theme_review_scripts', __('Stylesheets and Scripts', 'theme-review'), __('The theme must use core-bundled scripts if available, and include all scripts rather than hot-linking.', 'theme-review') . '<br>' . __('Themes must not deregister core scripts.', 'theme-review') . '<br>' . __('If minfied scripts or styles are used, the original file must also be included.', 'theme-review') . '<br>' . __('The most common errors for this section are hardcoded scripts or styles in header.php and footer.php, and theme authors including their own version of jQuery or jQuery UI instead of using the core-bundled scripts.', 'theme-review') . '<br>' . __('Check all folders for minified and duplicate files. It is not uncommon for authors to forget to include the original versions of Font Awesome and Bootstrap.', 'theme-review') . '<br>'), array('theme_review_enqueue_styles', '<span class="theme-review-indent"></span>' . __('Enqueueing Stylesheets', 'theme-review'), __('Script and stylesheets must be enqueued, with the exception of browser workaround scripts.', 'theme-review') . '<br>' . __('This is the wrong way of adding the stylesheet:', 'theme-review') . '<br>' . '<code> &lt;link type="text/css" rel="stylesheet" href="&lt;?php echo get_stylesheet_uri(); ?> /></code><br>' . __('The correct way of adding a stylesheet to the front end:', 'theme-review') . "<br>\n      <code>\n          add_action( 'wp_enqueue_scripts', 'theme_slug_css' );<br>\n          function theme_slug_css() {<br>\n              wp_enqueue_style( 'theme-slug-style', get_stylesheet_uri() );<br>\n          }\n       </code>" . '<br>'), array('theme_review_enqueue_scripts', '<span class="theme-review-indent"></span>' . __('Enqueueing Scripts', 'theme-review'), __('jQuery can be added as a dependancy of a custom script like this:', 'theme-review') . "<br><code>\n          add_action( 'wp_enqueue_scripts', 'theme_slug_scripts' );<br>\n          function theme_slug_scripts() {<br>\n          wp_enqueue_script('theme-slug-script', get_stylesheet_directory_uri() . '/js/script.js', array( 'jquery' ) );<br>\n          }\n        </code><br>" . __('Or by itself like this:', 'theme-review') . "<br>\n           <code>\n            add_action( 'wp_enqueue_scripts', 'theme_slug_scripts' );<br>\n            function theme_slug_scripts() {<br>\n              wp_enqueue_script('jquery');<br>\n            }\n         </code>" . '<br>'), array('theme_review_templates', __('Templates', 'theme-review'), __('If used in the theme, standard template files are required to be called using the correct template tag:', 'theme-review') . '<br>' . 'header.php ( get_header() )' . '<br>' . 'footer.php ( get_footer() )' . '<br>' . 'sidebar.php ( get_sidebar() )' . '<br>' . 'comments.php ( comments_template() )' . '<br>' . 'searchform.php ( get_search_form() )' . '<br><br>' . __('If custom template files are used, the author must include documentation as to what it refers to.', 'theme-review') . '<br>'));
    // Load the review info for the current theme.
    $review_info = TR_Review_Info::load($trt_theme->get('Name'));
    foreach ($requirements as $req) {
        // Make the $req fields easier to use by putting them into variables.
        list($req_id, $req_title, $req_content) = $req;
        // If we're saving the statuses or if there are old options available, save them to the new format.
        if (isset($_POST[$req_id]) && ($req_status = $_POST[$req_id]) || ($req_status = get_option($req_id))) {
            //validate before update
            if ('fail' === $req_status || 'pass' === $req_status) {
                $review_info->set_status($req_id, $req_status);
            }
            // If there are still old options around, delete them.
            // @todo This is here temporarily. If the plugin ever gets full-blown settings, put this into the upgrade procedure!
            delete_option($req_id);
        }
        $value = esc_attr($review_info->get_status($req_id));
        $content .= '
      <li class="theme-review-header">' . $req_title . '</li>
      <li class="theme-review-description">' . $req_content . '<br>
        <span class="theme-review-mark-completed">' . esc_html__('Mark as completed:', 'theme-review') . '</span><br>
        <label><input type="radio" name="' . esc_attr($req_id) . '" value="pass" ' . checked($value, 'pass', false) . '> ' . esc_html__('Pass', 'theme-review') . '</label><br>
        <label><input type="radio" name="' . esc_attr($req_id) . '" value="fail" ' . checked($value, 'fail', false) . '> ' . esc_html__('Fail', 'theme-review') . '</label>
      </li>';
    }
    //end for each
    // Remember to save the review info!
    $review_info->save();
    $dropdown_section = '<div id="theme-review-dropdown">
    <div class="theme-review-fix-wrap">
      <label class="theme-review-fix" for="theme-review-fix"><input type="checkbox" id="theme-review-fix" name="theme-review-fix" /> ' . esc_html__('Fix this check list.', 'theme-review') . '</label>
    </div>
    <form method="POST">
      <ul>' . $content . '</ul>
      <br>
      <input type="submit" value="' . esc_html__('Save Progress', 'theme-review') . '" id="trchecklist" class="button button-primary button-large">
      <a href="#">' . __('View Summary', 'theme-review') . '</a>
    </form>
  </div>
  ';
    $wp_admin_bar->add_node($args);
    $wp_admin_bar->add_node(array('id' => 'theme_review_bar_slide', 'parent' => 'theme_review_bar', 'title' => $dropdown_section, 'href' => FALSE));
}
Example #3
0
/**
 * Create the page
 */
function theme_review_do_page()
{
    ?>
<script>
	jQuery(document).ready(function($) {
		$('.welcome-panel').find('.handlediv').click(function() {
			//Expand or collapse this panel
			$(this).next().slideToggle('fast');
		});
	});
</script>

<div class="wrap">
	<div class="welcome-panel">
		<h1><?php 
    _e('Theme Review', 'theme-review');
    ?>
</h1>
		<div title="<?php 
    _e('Click to toggle', 'theme-review');
    ?>
" class="handlediv"><br></div>
		<div class="welcome-panel-content">
			<p class="about-description"><?php 
    _e('This plugin is designed to be a compliment to the Theme Review guidelines and a guide to help you with your first theme review.', 'theme-review');
    ?>
<br>
			<?php 
    _e('Please note that this plugin is not required to perform a review, and the plugin is at an early development stage.', 'theme-review');
    ?>
</p>

			<div class="welcome-panel-column-container">
				<div class="tr-width">
					<h3><b><?php 
    _e('Preparing for your review', 'theme-review');
    ?>
</b></h3>

					<?php 
    _e('Awesome! You have already completed the first steps in setting up your testing environment:', 'theme-review');
    if (defined('WP_DEBUG') && true === WP_DEBUG) {
        echo ' <code>' . __('WP_DEBUG is on.', 'theme-review') . '</code> ';
    } else {
        echo '<p>';
        // @todo Add a more informative message regarding WP_DEBUG and why it should be enabled.
        printf(__('Now, we recommend you to set the following constants to <code>true</code> in your <code>wp-config.php</code> file. <a href="%s" target="_blank">Need help?</a>', 'theme-review'), esc_url('http://codex.wordpress.org/Editing_wp-config.php'));
        echo '</p>';
    }
    echo '<br>';
    // Check if Theme Check plugin is active.
    if (is_plugin_active('theme-check/theme-check.php')) {
        // Plugin is installed and active.
        echo '<code>' . __('Theme Check is active.', 'theme-review') . '</code>';
    } elseif (array_key_exists('theme-check/theme-check.php', get_plugins())) {
        // Plugin is installed but inactive.
        echo esc_html__('Theme Check is installed but not active:', 'theme-review') . '<br>';
        if (current_user_can('activate_plugins')) {
            // Set up the plugin activation URL.
            $plugin_activate_url = wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=theme-check/theme-check.php'), 'activate-plugin_theme-check/theme-check.php');
            echo '<a id="theme-check-plugin-activate" href="' . $plugin_activate_url . '" class="button button-primary button-hero">' . esc_html__('Activate Theme Check', 'theme-review') . '</a>';
        } else {
            esc_html_e('You have no permission to activate the plugin.', 'theme-review');
        }
    } else {
        // Plugin isn't installed.
        echo esc_html__('We recommend that you also install the Theme Check plugin:', 'theme-review') . '<br>';
        if (current_user_can('install_plugins')) {
            // Set up the plugin installation URL.
            $plugin_install_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=theme-check'), 'install-plugin_theme-check');
            echo '<a id="theme-check-plugin-install" href="' . $plugin_install_url . '" class="button button-primary button-hero">' . esc_html__(' Install Theme Check', 'theme-review') . '</a>';
        } else {
            esc_html_e('You have no permission to install the plugin.', 'theme-review');
        }
    }
    ?>

					<br><br>
						<h3><b><?php 
    _e('Now, is your ticket ready?', 'theme-review');
    ?>
</b></h3>
						<h5><?php 
    _e('You are reviewing:', 'theme-review');
    ?>
							<?php 
    // Fetch and print the theme name
    $trt_theme = wp_get_theme();
    echo $trt_name = $trt_theme->get('Name');
    ?>
.
							<?php 
    printf(__('-If this is not your ticket, <a href="%s">install and activate the correct theme.</a>', 'theme-review'), esc_url(admin_url('themes.php')));
    ?>
							<br>
						</h5>
						<h4><?php 
    _e('Ticket? -What ticket?', 'theme-review');
    ?>
</h4>
						<?php 
    _e('A theme trac ticket is a ticket with information about a theme that has been submitted to WordPress.org.', 'theme-review');
    ?>
<br>
						<?php 
    printf(__('If this is your first review, you might be more comfortable reviewing our test theme that you can download <a href="%s">here</a>.', 'theme-review'), esc_url('https://github.com/WPTRT/doingitwrong'));
    ?>
<br><br>
						<?php 
    printf(__('If you are ready to take on a real ticket, please <a href="%s"><button class="make-request">Request a theme to review.</button></a>', 'theme-review'), esc_url('https://make.wordpress.org/themes/'));
    ?>
						<?php 
    printf(__('You will then find your tickets here: <a href="%s">https://themes.trac.wordpress.org</a>.', 'theme-review'), esc_url('https://themes.trac.wordpress.org/query?status=!closed&owner=$USER'));
    ?>
						<br><br>
						<?php 
    _e('In your ticket you will find the theme name, the authors name, and a link to a zip file containing the theme that you should review.<br>', 'theme-review');
    ?>
						<?php 
    _e('Below the theme screenshot is a form, so sa "Hi" and <b>introduce yourself to your author.</b>', 'theme-review');
    ?>
						<br><br>					
				</div>
				<div class="welcome-panel-column welcome-panel-last">
					<h4><?php 
    _e('Stuck?', 'theme-review');
    ?>
</h4>
					<p><b><?php 
    printf(__('If you have questions about reviewing, come talk to other reviewers on <a href="%s">wordpress.slack.com #themereview</a>', 'theme-review'), esc_url('https://make.wordpress.org/chat/'));
    ?>
</b></p>
					<?php 
    printf(__('The Theme Review Team also have weekly meetings on Slack:<br>Tuesdays @ 18:00 UTC<br><i>For agenda, visit our Make blog:</i> <a href="%s">make.wordpress.org/themes/</a>', 'theme-review'), esc_url('https://make.wordpress.org/themes/'));
    ?>
					<br><br>
					<?php 
    _e('We would be thrilled to hear your ideas and suggestions for the plugin.', 'theme-review');
    ?>
					<?php 
    _e('You can follow the development on Github.', 'theme-review');
    ?>
<br>
					<a href="https://github.com/carolinan/theme-review">https://github.com/carolinan/theme-review</a>
					<br><br>
				</div>
			</div>
		</div>
	</div>

	<div class="welcome-panel">
		<h2><b><?php 
    _e('Performing your review', 'theme-review');
    ?>
</b></h2>
		<div title="<?php 
    _e('Click to toggle', 'theme-review');
    ?>
" class="handlediv"><br></div>
		<div class="welcome-panel-content">
			<h5><?php 
    printf(__('The full guidelines that you will review the theme against can be found <a href="%s">here.</a>', 'theme-review'), esc_url('https://make.wordpress.org/themes/handbook/review/required/'));
    echo ' ' . __('The plugin should only be seen as a complement to the guidelines.', 'theme-review');
    ?>
			</h5><br>
			<?php 
    _e('You should now have your theme folder and your code editor ready so that you can easilly check the files.', 'theme-review');
    ?>
			<br>
			<?php 
    echo __('<b>What you will be checking:</b>', 'theme-review') . '<br>' . __('There is more to a review than checking if the content is displayed nicely. You will be checking if the theme is <b>secure</b>,
			if there are any <b>errors</b>, if it is <b>translatable</b> and if all theme <b>options</b> are working correctly.<br>', 'theme-review');
    _e('You will be reading a lot of code, and one theme will have a different setup than the other, but don\'t worry, this becomes easier as you gain more experience.<br>', 'theme-review');
    echo __('<b>Reviewing a theme with the help of the plugin:</b>', 'theme-review') . '<br>';
    echo __('You will find a new menu in the admin bar to your top right. Each menu section represents a requirement, accompanied by a short statement or a question.', 'theme-review') . '<br>' . __('Some of the sections has additional information, examples and links that can help you on your way.', 'theme-review') . ' ';
    printf(__('The developer Code Reference is <a href="%s">invaluable</a> when you want to look up functions and hooks.', 'theme-review'), esc_url('https://developer.wordpress.org/reference/'));
    echo '<br>' . __('Some requriements can be checked very quickly, while others takes a bit longer.', 'theme-review') . ' ' . __('Once a check has been completed, save your progress and it will be added to the summary below.', 'theme-review');
    echo '<br><i>' . __('Example:', 'theme-review') . '</i><br>';
    echo '<img src="' . esc_url(plugins_url('lang.png', __FILE__)) . '" alt=""> ';
    echo '<br><i>' . __('Anything in red is a required item that should be noted in your review.', 'theme-review') . '</i><br>' . __('Start by running Theme Check and look for required, recommended and info notices. Theme Check can help you find files that you need to look closer at.', 'theme-review') . '<br>' . __('For your first review, it is probably easiest to start with the most obvios problems: php errors and notices, and then move on to check header.php and footer.php for hard coded scripts or stylesheets.', 'theme-review') . '<br>' . __('Eventually you will find a flow that works well for you, and your reviews will become faster.', 'theme-review') . '<br><br>';
    echo '<h3><b>' . __('Writing your review', 'theme-review') . '</b></h3>';
    echo __('Take notes as you review each part of the theme, and write down any questions that you have for the author.', 'theme-review') . '<br>' . __('The suggested format for your review is as follows:', 'theme-review') . '<br>';
    echo '<ul><li><b>' . __('Welcome wrapper.', 'theme-review') . '</b> ' . __('Say Hi to the author, let them know what you are going to do. This may be their first review.', 'theme-review') . '</li>' . '<li><b>' . __('Say the outcome.', 'theme-review') . '</b> ' . __('Let the author know from the start what the outcome is.', 'theme-review') . '</li>' . '<li><b>' . __('Required.', 'theme-review') . '</b> ' . __('List all the required items, a theme can\'t be approved until all of these are met.', 'theme-review') . '</li>' . '<li><b>' . __('Recommended.', 'theme-review') . '</b> ' . __('You can then list all the recommended items. These won\'t be a grounds to not approve, but they are good theme practice.', 'theme-review') . '</li>' . '<li><b>' . __('Notes.', 'theme-review') . '</b> ' . __('This could be a section where you add design notes, maybe additional information. Again, this can\'t be something you don\'t approve because, but it can be a way to educate.', 'theme-review') . '</li>' . '<li><b>' . __('Say what is going to happen next.', 'theme-review') . '</b> ' . __('Keeping the author informed is great. Let them know you will let them upload a new version or what the approval process is.', 'theme-review') . '</li>' . '</ul>';
    _e('<h5>Using the headings "Required, Recommended and Notes" is really helpful for people when viewing the review.</h5>', 'theme-review');
    echo '<br><h3><b>' . __('Finishing your review', 'theme-review') . '</b></h3>' . __('It is important that you do not close the ticket when you submit your notes.', 'theme-review') . '<br>' . __('If there are required items that needs to be fixed, the author has seven days to reply.', 'theme-review') . '<br>';
    printf(__('The author should then fix the issue, update the theme\'s version number, and submit it again via <a href="%s">the upload page</a>.', 'theme-review'), esc_url('https://wordpress.org/themes/upload/'));
    echo '<br>';
    echo __('When a new version is submitted, you need to check if all the required items has been fixed.', 'theme-review') . '<br>' . __('When you feel that a theme is ready to be approved, you can ask for feedback from your mentor or an experienced theme reviewer before you close the ticket.', 'theme-review') . '<br>' . __('Approved themes goes to a separate queue and are checked before they go live.', 'theme-review') . '<br>' . __('If seven days has passed without any word from the theme author, you can close the ticket as not approved.', 'theme-review') . '<br><br>';
    ?>
		</div>
	</div>

	<br>
	<h2><?php 
    _e('Summary:', 'theme-review');
    ?>
</h2>
	<hr>
	<?php 
    // Load the review info for the current theme.
    $review_info = TR_Review_Info::load($trt_theme->get('Name'));
    $code = esc_attr($review_info->get_status('theme_review_code', __('Not completed', 'theme-review')));
    $prefix = esc_attr($review_info->get_status('theme_review_prefix', __('Not completed', 'theme-review')));
    $sanitize = esc_attr($review_info->get_status('theme_review_sanitize', __('Not completed', 'theme-review')));
    $hooks = esc_attr($review_info->get_status('theme_review_hooks', __('Not completed', 'theme-review')));
    $core = esc_attr($review_info->get_status('theme_review_core', __('Not completed', 'theme-review')));
    $tags = esc_attr($review_info->get_status('theme_review_tags', __('Not completed', 'theme-review')));
    $presentation = esc_attr($review_info->get_status('theme_review_presentation', __('Not completed', 'theme-review')));
    $documentation = esc_attr($review_info->get_status('theme_review_documentation', __('Not completed', 'theme-review')));
    $favicons = esc_attr($review_info->get_status('theme_review_favicons', __('Not completed', 'theme-review')));
    $lang = esc_attr($review_info->get_status('theme_review_language', __('Not completed', 'theme-review')));
    $license = esc_attr($review_info->get_status('theme_review_licensing', __('Not completed', 'theme-review')));
    /* options & settings */
    $optset = esc_attr($review_info->get_status('theme_review_optset', __('Not completed', 'theme-review')));
    $screenshot = esc_attr($review_info->get_status('theme_review_screenshot', __('Not completed', 'theme-review')));
    $security = esc_attr($review_info->get_status('theme_review_security', __('Not completed', 'theme-review')));
    $escaping = esc_attr($review_info->get_status('theme_review_escaping', __('Not completed', 'theme-review')));
    $links = esc_attr($review_info->get_status('theme_review_links', __('Not completed', 'theme-review')));
    $scripts = esc_attr($review_info->get_status('theme_review_scripts', __('Not completed', 'theme-review')));
    $enqueue_styles = esc_attr($review_info->get_status('theme_review_enqueue_styles', __('Not completed', 'theme-review')));
    $enqueue_scripts = esc_attr($review_info->get_status('theme_review_enqueue_scripts', __('Not completed', 'theme-review')));
    $templates = esc_attr($review_info->get_status('theme_review_templates', __('Not completed', 'theme-review')));
    echo '<h3>' . __('Code', 'theme-review') . ': <i class="' . $code . '">' . $code . '</i></h2>';
    echo '<h3 class="theme-review-indent">' . __('Prefix', 'theme-review') . ': <i class="' . $prefix . '">' . $prefix . '</i></h3>';
    echo '<h3 class="theme-review-indent">' . __('Sanitize', 'theme-review') . ': <i class="' . $sanitize . '">' . $sanitize . '</i></h3>';
    echo '<h3 class="theme-review-indent">' . __('Hooks', 'theme-review') . ': <i class="' . $hooks . '">' . $hooks . '</i></h3>';
    echo '<h3>' . __('Core Functionality and Features', 'theme-review') . ': <i class="' . $core . '">' . $core . '</i></h2>';
    echo '<h3 class="theme-review-indent">' . __('Theme tags', 'theme-review') . ': <i class="' . $tags . '">' . $tags . '</i></h3>';
    echo '<h3>' . __('Presentation vs Functionality, Plugins & Favicons', 'theme-review') . ': <i class="' . $presentation . '">' . $presentation . '</i></h2>';
    echo '<h3>' . __('Documentation', 'theme-review') . ': <i class="' . $documentation . '">' . $documentation . '</i></h3>';
    echo '<h3>' . __('Language', 'theme-review') . ': <i class="' . $lang . '">' . $lang . '</i></h3>';
    echo '<h3>' . __('Naming and Licensing', 'theme-review') . ': <i class="' . $license . '">' . $license . '</i></h3>';
    echo '<h3>' . __('Options and Settings', 'theme-review') . ': <i class="' . $optset . '">' . $optset . '</i></h2>';
    echo '<h3>' . __('Screenshot', 'theme-review') . ': <i class="' . $screenshot . '">' . $screenshot . '</i></h3>';
    echo '<h3>' . __('Security and Privacy', 'theme-review') . ': <i class="' . $security . '">' . $security . '</i></h3>';
    echo '<h3 class="theme-review-indent">' . __('Escaping', 'theme-review') . ': <i class="' . $escaping . '">' . $escaping . '</i></h3>';
    echo '<h3>' . __('Selling, credits and links', 'theme-review') . ': <i class="' . $links . '">' . $links . '</i></h3>';
    echo '<h3>' . __('Stylesheets and Scripts', 'theme-review') . ': <i class="' . $scripts . '">' . $scripts . '</i></h3>';
    echo '<h3 class="theme-review-indent">' . __('Enqueueing Stylesheets', 'theme-review') . ': <i class="' . $enqueue_styles . '">' . $enqueue_styles . '</i></h3>';
    echo '<h3 class="theme-review-indent">' . __('Enqueueing Scripts', 'theme-review') . ': <i class="' . $enqueue_scripts . '">' . $enqueue_scripts . '</i></h3>';
    echo '<h3>' . __('Templates', 'theme-review') . ': <i class="' . $templates . '">' . $templates . '</i></h3>';
    $trt_theme = wp_get_theme();
    $trt_tags = $trt_theme->get('Tags');
    if (in_array('accessibility-ready', $trt_tags)) {
        echo '<br><h3>' . __('Note:', 'theme-review') . '</h3> ' . __('<b>This theme has an accessibility-ready tag and it needs an additional review by an accessibility expert. It is important that you do not close the ticket when you are finished with the basic review.</b>', 'theme-review');
    }
    ?>

	<br><br>

	<div class="welcome-panel">
		<h2><b><?php 
    _e('Additional help', 'theme-review');
    ?>
</b></h2>
		<div title="<?php 
    _e('Click to toggle', 'theme-review');
    ?>
" class="handlediv"><br></div>
		<div class="welcome-panel-content">
		<?php 
    echo '<h3>' . __('Requesting help', 'theme-review') . '</b></h3>' . __('You can always search in the Slack archive to see if your question has been answered before.', 'theme-review') . '<br>' . __('In your ticket, below the text area, is a text-field labeled "Cc:". To request help from an admin, add their username as one of the recipients.', 'theme-review') . '<br>';
    printf(__('<a href="%s">List of active admins.</a>', 'theme-review'), esc_url('https://make.wordpress.org/themes/handbook/the-team/members/'));
    echo '<br><br><h3>' . __('More explanations and examples', 'theme-review') . '</b></h3><a href="https://make.wordpress.org/themes/handbook/review/required/explanations-and-examples/">Explanations and examples</a><br><br>';
    ?>
		</div>
	</div>
</div><!--end wrap -->
<?php 
}