Skip to content

Commit

Permalink
Remove outdated hook dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pierlon committed Aug 7, 2020
1 parent b322c37 commit 9364a51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9364a51

Please sign in to comment.