diff --git a/assets/images/reader-themes/twentytwentytwo.jpg b/assets/images/reader-themes/twentytwentytwo.jpg new file mode 100644 index 00000000000..1f4a9c926f5 Binary files /dev/null and b/assets/images/reader-themes/twentytwentytwo.jpg differ diff --git a/includes/sanitizers/class-amp-core-theme-sanitizer.php b/includes/sanitizers/class-amp-core-theme-sanitizer.php index d6036febc46..416a947aa95 100644 --- a/includes/sanitizers/class-amp-core-theme-sanitizer.php +++ b/includes/sanitizers/class-amp-core-theme-sanitizer.php @@ -40,6 +40,7 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer { * @var array */ protected static $supported_themes = [ + 'twentytwentytwo', 'twentytwentyone', 'twentytwenty', 'twentynineteen', @@ -82,6 +83,11 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer { */ protected static function get_theme_features_config( $theme_slug, $args = [] ) { switch ( $theme_slug ) { + // Twenty Twenty-Two. + case 'twentytwentytwo': + return []; + + // Twenty Twenty-One. case 'twentytwentyone': $config = [ 'dequeue_scripts' => [ diff --git a/tests/e2e/specs/amp-onboarding/reader-themes.js b/tests/e2e/specs/amp-onboarding/reader-themes.js index 64245f8f3bc..ded4192942b 100644 --- a/tests/e2e/specs/amp-onboarding/reader-themes.js +++ b/tests/e2e/specs/amp-onboarding/reader-themes.js @@ -17,7 +17,7 @@ describe( 'Reader themes', () => { it( 'main components exist with no selection', async () => { const itemCount = await page.$$eval( '.theme-card', ( els ) => els.length ); - expect( itemCount ).toBe( 11 ); + expect( itemCount ).toBe( 12 ); await expect( page ).not.toMatchElement( 'input[type="radio"]:checked' ); await testNextButton( { text: 'Next', disabled: true } ); diff --git a/tests/php/test-class-amp-core-theme-sanitizer.php b/tests/php/test-class-amp-core-theme-sanitizer.php index 2c12a67b405..182e836802b 100644 --- a/tests/php/test-class-amp-core-theme-sanitizer.php +++ b/tests/php/test-class-amp-core-theme-sanitizer.php @@ -176,6 +176,7 @@ public function test_get_closest_submenu( $dom, $element, $expected ) { */ public function test_get_supported_themes() { $supported_themes = [ + 'twentytwentytwo', 'twentytwentyone', 'twentytwenty', 'twentynineteen',