Skip to content
Draft
Changes from all commits
Commits
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
Binary file added assets/images/reader-themes/twentytwentytwo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions includes/sanitizers/class-amp-core-theme-sanitizer.php
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@
* @var array
*/
protected static $supported_themes = [
'twentytwentytwo',
'twentytwentyone',
'twentytwenty',
'twentynineteen',
@@ -82,6 +83,11 @@
*/
protected static function get_theme_features_config( $theme_slug, $args = [] ) {
switch ( $theme_slug ) {
// Twenty Twenty-Two.
case 'twentytwentytwo':
return [];

Check warning on line 88 in includes/sanitizers/class-amp-core-theme-sanitizer.php

Codecov / codecov/patch

includes/sanitizers/class-amp-core-theme-sanitizer.php#L87-L88

Added lines #L87 - L88 were not covered by tests

// Twenty Twenty-One.
case 'twentytwentyone':
$config = [
'dequeue_scripts' => [
2 changes: 1 addition & 1 deletion tests/e2e/specs/amp-onboarding/reader-themes.js
Original file line number Diff line number Diff line change
@@ -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 } );
1 change: 1 addition & 0 deletions tests/php/test-class-amp-core-theme-sanitizer.php
Original file line number Diff line number Diff line change
@@ -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',