Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebrand Classic as Reader mode and Paired as Transitional mode; add Exit Reader Mode link #2034

Merged
merged 19 commits into from
Apr 6, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3418a56
Rebrand Classic mode as Reader mode.
felixarntz Mar 28, 2019
7d2c9ac
Add link for exiting reader mode to reader mode templates.
felixarntz Mar 28, 2019
33a4cb4
Fix incorrect screenshot numbering in readme.
felixarntz Mar 28, 2019
d5cdd94
Update reader mode description.
felixarntz Apr 1, 2019
089fc62
Restore spaces in readme.
felixarntz Apr 1, 2019
09df6d8
Rebrand Paired as Transitional mode.
felixarntz Apr 1, 2019
982bf65
Introduce Customizer UI for controlling reader mode exit link and mak…
felixarntz Apr 1, 2019
5f58a72
Merge branch 'develop' of github.com:ampproject/amp-wp into add/reade…
westonruter Apr 5, 2019
c269707
Update mode descriptions
westonruter Apr 5, 2019
b360935
Prevent showing any reader Customizer settings when AMP theme support…
westonruter Apr 5, 2019
11ea84c
Reuse rest_sanitize_boolean function instead of adding sanitize_boole…
westonruter Apr 5, 2019
611f53c
Fix position of exit reader link when site icon present
westonruter Apr 5, 2019
5df747d
Revert changes to legacy 0.3 templates since obsolete
westonruter Apr 5, 2019
297e668
Merge branch 'develop' of github.com:ampproject/amp-wp into add/reade…
westonruter Apr 5, 2019
e35d629
Add note about dev work being needed for non-reader mode
westonruter Apr 5, 2019
a35e51f
Add clarification about mobile redirections
amedina Apr 6, 2019
c007f2f
Update screenshots and squooshify
westonruter Apr 6, 2019
cabdf2b
Always include amp-wp-canonical-link style in customizer preview
westonruter Apr 6, 2019
8026f7a
Update behavior description in readme
westonruter Apr 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function amp_maybe_add_actions() {
if ( ! post_supports_amp( $post ) ) {
if ( $is_amp_endpoint ) {
/*
* Temporary redirect is used for admin users because classic mode and AMP support can be enabled by user at any time,
* Temporary redirect is used for admin users because reader mode and AMP support can be enabled by user at any time,
* so they will be able to make AMP available for this URL and see the change without wrestling with the redirect cache.
*/
wp_safe_redirect( get_permalink( $post->ID ), current_user_can( 'manage_options' ) ? 302 : 301 );
Expand Down
9 changes: 8 additions & 1 deletion back-compat/templates-v0-3/header-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* @package AMP
*/

$site_icon_url = $this->get( 'site_icon_url' );
$site_icon_url = $this->get( 'site_icon_url' );
$canonical_link_url = $this->get( 'post_canonical_link_url' );
?>

<nav class="amp-wp-title-bar">
Expand All @@ -17,5 +18,11 @@

<?php echo esc_html( $this->get( 'blog_name' ) ); ?>
</a>
<?php if ( $canonical_link_url ) : ?>
<?php $canonical_link_text = $this->get( 'post_canonical_link_text' ); ?>
<a class="amp-wp-canonical-link" href="<?php echo esc_url( $canonical_link_url ); ?>">
<?php echo esc_html( $canonical_link_text ); ?>
</a>
<?php endif; ?>
</div>
</nav>
7 changes: 7 additions & 0 deletions back-compat/templates-v0-3/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@
}

nav.amp-wp-title-bar div {
display: flex;
justify-content: space-between;
line-height: 54px;
color: <?php echo esc_html( $this->get_customizer_setting( 'navbar_color', self::DEFAULT_NAVBAR_COLOR ) ); ?>;
}
Expand All @@ -202,6 +204,11 @@
text-decoration: none;
}

nav.amp-wp-title-bar .amp-wp-canonical-link {
font-size: 20px;
text-decoration: underline;
}

nav.amp-wp-title-bar .amp-wp-site-icon {
/** site icon is 32px **/
float: left;
Expand Down
2 changes: 1 addition & 1 deletion includes/amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function amp_add_generator_metadata() {
} elseif ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
$mode = 'paired';
} else {
$mode = 'classic';
$mode = 'reader';
}
printf( '<meta name="generator" content="%s">', esc_attr( sprintf( 'AMP Plugin v%s; mode=%s', AMP__VERSION, $mode ) ) );
}
Expand Down
2 changes: 1 addition & 1 deletion includes/class-amp-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function validate_site( $args, $assoc_args ) {
} else {
WP_CLI::error(
sprintf(
'The current template mode is Classic, which does not allow crawling the site. Please pass the --%s flag in order to force crawling for validation.',
'Your templates are currently in Reader mode, which does not allow crawling the site. Please pass the --%s flag in order to force crawling for validation.',
self::FLAG_NAME_FORCE_VALIDATION
)
);
Expand Down
2 changes: 1 addition & 1 deletion includes/class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public static function ensure_proper_amp_location( $exit = true ) {
$old_url = amp_get_current_url();
$new_url = add_query_arg( amp_get_slug(), '', amp_remove_endpoint( $old_url ) );
if ( $old_url !== $new_url ) {
// A temporary redirect is used for admin users to allow them to see changes between classic and paired modes.
// A temporary redirect is used for admin users to allow them to see changes between reader mode and paired modes.
wp_safe_redirect( $new_url, current_user_can( 'manage_options' ) ? 302 : 301 );
// @codeCoverageIgnoreStart
if ( $exit ) {
Expand Down
4 changes: 2 additions & 2 deletions includes/options/class-amp-options-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ public static function handle_updated_theme_support_option() {
$theme_support['paired'] = 'paired' === $template_mode;
add_theme_support( AMP_Theme_Support::SLUG, $theme_support );
} else {
remove_theme_support( AMP_Theme_Support::SLUG ); // So that the amp_get_permalink() will work for classic URL.
remove_theme_support( AMP_Theme_Support::SLUG ); // So that the amp_get_permalink() will work for reader mode URL.
}

$url = amp_admin_get_preview_permalink();
Expand Down Expand Up @@ -648,7 +648,7 @@ public static function handle_updated_theme_support_option() {
$message = wp_kses_post(
sprintf(
/* translators: %s is an AMP URL */
__( 'Classic mode activated! View the <a href="%s">AMP version of a recent post</a>. It is recommended that you upgrade to Native or Paired mode.', 'amp' ),
__( 'Reader mode activated! View the <a href="%s">AMP version of a recent post</a>. It is recommended that you upgrade to Native or Paired mode.', 'amp' ),
esc_url( $url )
)
);
Expand Down
4 changes: 2 additions & 2 deletions includes/options/class-amp-options-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ public function render_theme_support() {
<dt>
<input type="radio" id="theme_support_disabled" name="<?php echo esc_attr( AMP_Options_Manager::OPTION_NAME . '[theme_support]' ); ?>" value="disabled" <?php checked( $theme_support, 'disabled' ); ?>>
<label for="theme_support_disabled">
<strong><?php esc_html_e( 'Classic', 'amp' ); ?></strong>
<strong><?php esc_html_e( 'Reader', 'amp' ); ?></strong>
</label>
</dt>
<dd>
<?php esc_html_e( 'Display AMP responses in classic (legacy) post templates in a basic design that does not match your theme\'s templates.', 'amp' ); ?>
<?php esc_html_e( 'Display AMP responses in a simplified reader mode design that does not match your theme\'s templates.', 'amp' ); ?>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to discuss how to best phrase this here. Do we want to highlight that it's not respecting the theme's design? Should we maybe phrase this as "separate from your theme" to sound less negative?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Display AMP responses in a simplified reader mode design separate from your theme could work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another alternative: Generates AMP content using simplified templates, which are light but may not match the look-and-feel of your site


<?php if ( ! current_theme_supports( AMP_Theme_Support::SLUG ) && wp_count_posts( AMP_Validated_URL_Post_Type::POST_TYPE_SLUG )->publish > 0 ) : ?>
<div class="notice notice-info inline notice-alt">
Expand Down
18 changes: 10 additions & 8 deletions includes/templates/class-amp-post-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,23 +267,25 @@ private function build_post_data() {

$this->add_data(
array(
'post' => $this->post,
'post_id' => $this->ID,
'post_title' => $post_title,
'post_publish_timestamp' => $post_publish_timestamp,
'post_modified_timestamp' => $post_modified_timestamp,
'post_author' => $post_author,
'post' => $this->post,
'post_id' => $this->ID,
'post_title' => $post_title,
'post_publish_timestamp' => $post_publish_timestamp,
'post_modified_timestamp' => $post_modified_timestamp,
'post_author' => $post_author,
'post_canonical_link_url' => get_permalink( $this->ID ),
'post_canonical_link_text' => __( 'Exit Reader Mode', 'amp' ),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could say "View Canonical". What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the average user knows what "Canonical" means in this context. Not to speak of translators. "Original" or "Full Version" would work better though

Exit Reader Mode sounds reasonable though.

For comparison, Safari uses "Hide Reader View".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the point of "View Canonical", but it is true that is will be confusing for most users. OTOH, having "Exit Reader Mode" implies that the user is aware that she is in Reader Mode. Probably we can express the duality by a exit route with a message along these lines: "You are viewing the Reader Mode version of <this post>", where <this post> links to the canonical version.

)
);

$this->build_post_featured_image();
$this->build_post_commments_data();
$this->build_post_comments_data();
}

/**
* Buuild post comments data.
*/
private function build_post_commments_data() {
private function build_post_comments_data() {
if ( ! post_type_supports( $this->post->post_type, 'comments' ) ) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions includes/validation/class-amp-validated-url-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ public static function print_admin_notice() {
} elseif ( current_theme_supports( AMP_Theme_Support::SLUG ) ) {
$template_mode = 'paired';
} else {
$template_mode = 'classic';
$template_mode = 'reader';
}
$auto_sanitization = AMP_Options_Manager::get_option( 'auto_accept_sanitization' );

Expand All @@ -1250,7 +1250,7 @@ public static function print_admin_notice() {
esc_url( admin_url( 'admin.php?page=' . AMP_Options_Manager::OPTION_NAME ) )
);
} else {
$message = __( 'The site is using classic AMP mode, your theme templates are not used and the errors below are irrelevant.', 'amp' );
$message = __( 'The site is using AMP reader mode, your theme templates are not used and the errors below are irrelevant.', 'amp' );
}

$class = 'info';
Expand Down
28 changes: 14 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
![Banner](wp-assets/banner-1544x500.png)
Enable AMP on your WordPress site, the WordPress way.

**Contributors:** [automattic](https://profiles.wordpress.org/automattic), [xwp](https://profiles.wordpress.org/xwp), [google](https://profiles.wordpress.org/google), [westonruter](https://profiles.wordpress.org/westonruter), [ryankienstra](https://profiles.wordpress.org/ryankienstra), [batmoo](https://profiles.wordpress.org/batmoo), [stubgo](https://profiles.wordpress.org/stubgo), [albertomedina](https://profiles.wordpress.org/albertomedina), [tweetythierry](https://profiles.wordpress.org/tweetythierry), [joshuawold](https://profiles.wordpress.org/joshuawold), [postphotos](https://profiles.wordpress.org/postphotos)
**Tags:** [amp](https://wordpress.org/plugins/tags/amp), [mobile](https://wordpress.org/plugins/tags/mobile)
**Requires at least:** 4.9
**Tested up to:** 5.1
**Stable tag:** 1.0.2
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
**Requires PHP:** 5.4
westonruter marked this conversation as resolved.
Show resolved Hide resolved
**Contributors:** [automattic](https://profiles.wordpress.org/automattic), [xwp](https://profiles.wordpress.org/xwp), [google](https://profiles.wordpress.org/google), [westonruter](https://profiles.wordpress.org/westonruter), [ryankienstra](https://profiles.wordpress.org/ryankienstra), [batmoo](https://profiles.wordpress.org/batmoo), [stubgo](https://profiles.wordpress.org/stubgo), [albertomedina](https://profiles.wordpress.org/albertomedina), [tweetythierry](https://profiles.wordpress.org/tweetythierry), [joshuawold](https://profiles.wordpress.org/joshuawold), [postphotos](https://profiles.wordpress.org/postphotos)
**Tags:** [amp](https://wordpress.org/plugins/tags/amp), [mobile](https://wordpress.org/plugins/tags/mobile)
**Requires at least:** 4.9
**Tested up to:** 5.1
**Stable tag:** 1.0.2
**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
**Requires PHP:** 5.4

[![Build Status](https://travis-ci.org/ampproject/amp-wp.svg?branch=develop)](https://travis-ci.org/ampproject/amp-wp) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com)
[![Build Status](https://travis-ci.org/ampproject/amp-wp.svg?branch=develop)](https://travis-ci.org/ampproject/amp-wp) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com)

## Description ##

Expand All @@ -32,8 +32,8 @@ With the official AMP plugin for WordPress, the WordPress ecosystem is provided
## Installation ##

1. Upload the folder to the `/wp-content/plugins/` directory.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. If you currently use older versions of the plugin in `Classic mode`, it is strongly encouraged to migrate to `Paired` or `Native mode`.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. If you currently use older versions of the plugin in `Reader` mode, it is strongly encouraged to migrate to `Paired` or `Native` mode.

## Getting Started ##

Expand All @@ -51,13 +51,13 @@ If you are a developer, we encourage you to [follow along](https://github.com/am

![Many themes can be served as AMP without any changes; the default experience is as if JavaScript is turned off in the browser since scripts are removed.](wp-assets/screenshot-2.png)

### Classic templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized.
### Reader mode templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized.

![Classic templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized.](wp-assets/screenshot-3.png)
![Reader mode templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized.](wp-assets/screenshot-3.png)

### Switch from Classic to Paired or Native modes in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS.
### Switch from Reader mode to Paired or Native mode in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS.

![Switch from Classic to Paired or Native modes in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS.](wp-assets/screenshot-4.png)
![Switch from Reader mode to Paired or Native mode in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS.](wp-assets/screenshot-4.png)

### Make the entire site available in AMP or pick specific post types and templates; you can also opt-out on per-post basis.

Expand Down
8 changes: 4 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ With the official AMP plugin for WordPress, the WordPress ecosystem is provided
== Installation ==

1. Upload the folder to the `/wp-content/plugins/` directory.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. If you currently use older versions of the plugin in `Classic mode`, it is strongly encouraged to migrate to `Paired` or `Native mode`.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. If you currently use older versions of the plugin in `Reader` mode, it is strongly encouraged to migrate to `Paired` or `Native` mode.

== Getting Started ==

Expand All @@ -41,8 +41,8 @@ If you are a developer, we encourage you to [follow along](https://github.com/am

1. Theme support enables you to reuse the active theme's templates and stylesheets; all WordPress features (menus, widgets, comments) are available in AMP.
1. Many themes can be served as AMP without any changes; the default experience is as if JavaScript is turned off in the browser since scripts are removed.
1. Classic templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized.
1. Switch from Classic to Paired or Native modes in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS.
1. Reader mode templates are still available, but they are are limited. Not only do they differ from the active theme, any validation errors are silently sanitized.
1. Switch from Reader mode to Paired or Native mode in AMP settings screen. You may need to disable the admin bar in AMP if your theme has a larger amount of CSS.
1. Make the entire site available in AMP or pick specific post types and templates; you can also opt-out on per-post basis.
1. Plugin checks for AMP validity and will indicate when either: no issues are found, new issues need moderation, or issues block AMP from being served.
1. The editor will surface validation issues during content authoring. The specific blocks with validation errors are indicated.
Expand Down
7 changes: 7 additions & 0 deletions templates/header-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@
<?php echo esc_html( wptexturize( $this->get( 'blog_name' ) ) ); ?>
</span>
</a>
<?php $canonical_link_url = $this->get( 'post_canonical_link_url' ); ?>
<?php if ( $canonical_link_url ) : ?>
<?php $canonical_link_text = $this->get( 'post_canonical_link_text' ); ?>
<a class="amp-wp-canonical-link" href="<?php echo esc_url( $canonical_link_url ); ?>">
<?php echo esc_html( $canonical_link_text ); ?>
</a>
<?php endif; ?>
</div>
</header>
7 changes: 7 additions & 0 deletions templates/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@

.amp-wp-header div {
color: <?php echo sanitize_hex_color( $header_color ); ?>;
display: flex;
font-size: 1em;
font-weight: 400;
justify-content: space-between;
margin: 0 auto;
max-width: calc(840px - 32px);
padding: .875em 16px;
Expand All @@ -140,6 +142,11 @@
text-decoration: none;
}

.amp-wp-header .amp-wp-canonical-link {
font-size: 0.8em;
text-decoration: underline;
}

/* Site Icon */

.amp-wp-header .amp-wp-site-icon {
Expand Down
2 changes: 1 addition & 1 deletion tests/test-amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public function test_amp_add_generator_metadata() {
ob_start();
amp_add_generator_metadata();
$output = ob_get_clean();
$this->assertContains( 'mode=classic', $output );
$this->assertContains( 'mode=reader', $output );
$this->assertContains( 'v' . AMP__VERSION, $output );

add_theme_support( AMP_Theme_Support::SLUG, array( 'paired' => true ) );
Expand Down
10 changes: 5 additions & 5 deletions tests/test-class-amp-gallery-block-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ public function test_sanitizer( $source, $expected ) {
}

/**
* Get the Classic mode data.
* Get the Reader mode data.
*
* @return array
*/
public function get_classic_mode_data() {
public function get_reader_mode_data() {
return array(
'no_block_class' => array(
'<ul data-amp-carousel="true"><li class="blocks-gallery-item"><figure><a href="http://example.com"><amp-img src="http://example.com/img.png" width="600" height="400"></amp-img></a></figure></li></ul>',
Expand All @@ -104,17 +104,17 @@ public function get_classic_mode_data() {
}

/**
* Test the sanitizer in Classic mode (without theme support).
* Test the sanitizer in Reader mode (without theme support).
*
* The tested sanitizer will have an argument of array( 'carousel_required' => true ),
* which sometimes causes different output.
*
* @see amp_get_content_sanitizers()
* @dataProvider get_classic_mode_data
* @dataProvider get_reader_mode_data
* @param string $source Source.
* @param string $expected Expected.
*/
public function test_sanitizer_classic_mode( $source, $expected ) {
public function test_sanitizer_reader_mode( $source, $expected ) {
$dom = AMP_DOM_Utils::get_dom_from_content( $source );
$sanitizer = new AMP_Gallery_Block_Sanitizer(
$dom,
Expand Down
2 changes: 1 addition & 1 deletion tests/test-class-amp-meta-box.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function test_render_status() {
$amp_status_markup = '<div class="misc-pub-section misc-amp-status"';
$checkbox_enabled = '<input id="amp-status-enabled" type="radio" name="amp_status" value="enabled" checked=\'checked\'>';

// This is not in AMP 'canonical mode' but rather classic paired mode.
// This is not in AMP 'canonical mode' but rather reader or paired mode.
remove_theme_support( AMP_Theme_Support::SLUG );
ob_start();
$this->instance->render_status( $post );
Expand Down
6 changes: 3 additions & 3 deletions tests/test-class-amp-options-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ public function test_render_cache_miss_notice() {
}

/**
* Test handle_updated_theme_support_option for classic.
* Test handle_updated_theme_support_option for reader mode.
*
* @covers AMP_Options_Manager::handle_updated_theme_support_option()
* @covers \amp_admin_get_preview_permalink()
Expand All @@ -466,7 +466,7 @@ public function test_handle_updated_theme_support_option_disabled() {
AMP_Options_Manager::handle_updated_theme_support_option();
$amp_settings_errors = get_settings_errors( AMP_Options_Manager::OPTION_NAME );
$new_error = end( $amp_settings_errors );
$this->assertStringStartsWith( 'Classic mode activated!', $new_error['message'] );
$this->assertStringStartsWith( 'Reader mode activated!', $new_error['message'] );
$this->assertContains( esc_url( amp_get_permalink( $page_id ) ), $new_error['message'], 'Expect amp_admin_get_preview_permalink() to return a page since it is the only post type supported.' );
$this->assertCount( 0, get_posts( array( 'post_type' => AMP_Validated_URL_Post_Type::POST_TYPE_SLUG ) ) );
}
Expand Down Expand Up @@ -555,7 +555,7 @@ public function test_handle_updated_theme_support_option_native_validate_error()
}

/**
* Test handle_updated_theme_support_option for classic.
* Test handle_updated_theme_support_option for paired mode.
*
* @covers AMP_Options_Manager::handle_updated_theme_support_option()
* @covers \amp_admin_get_preview_permalink()
Expand Down