From 9364a513607a504be7fcb701d3ab84a6e15919cf Mon Sep 17 00:00:00 2001 From: Pierre Gordon Date: Fri, 7 Aug 2020 19:52:32 -0400 Subject: [PATCH] Remove outdated hook dependencies --- amp.php | 15 +++++++++++++++ .../reader-themes-context-provider/index.js | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/amp.php b/amp.php index 582d022c3b9..5575c29b788 100644 --- a/amp.php +++ b/amp.php @@ -28,6 +28,21 @@ */ global $_amp_load_errors; +add_filter( + 'amp_reader_themes', + function ( $reader_themes ) { + $reader_themes[] = [ + 'name' => 'Neve', + 'slug' => 'neve', + 'preview_url' => 'https://wp-themes.com/neve', + 'screenshot_url' => 'https://i0.wp.com/themes.svn.wordpress.org/neve/2.7.5/screenshot.png?w=1144&strip=all', + 'homepage' => 'https://themeisle.com/themes/neve/', + 'description' => 'This is a non-core theme.', + ]; + return $reader_themes; + } +); + $_amp_load_errors = new WP_Error(); if ( version_compare( phpversion(), '5.6', '<' ) ) { diff --git a/assets/src/components/reader-themes-context-provider/index.js b/assets/src/components/reader-themes-context-provider/index.js index 38cfb5c48d7..b39f7041f88 100644 --- a/assets/src/components/reader-themes-context-provider/index.js +++ b/assets/src/components/reader-themes-context-provider/index.js @@ -97,7 +97,7 @@ export function ReaderThemesContextProvider( { wpAjaxUrl, children, currentTheme updateOptions( { reader_theme: LEGACY_THEME_SLUG } ); setThemeWasOverridden( true ); } - }, [ originalSelectedTheme.availability, selectedTheme.availability, originalSelectedTheme.slug, selectedTheme.slug, themeWasOverridden, updateOptions ] ); + }, [ originalSelectedTheme.availability, selectedTheme.availability, themeWasOverridden, updateOptions ] ); /** * Downloads the selected reader theme, if necessary, when options are saved.