-
Notifications
You must be signed in to change notification settings - Fork 383
Add WP-CLI commands for managing AMP settings #7368
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
Conversation
d9f50af to
fbfcb62
Compare
f8e212b to
fbfcb62
Compare
src/Cli/OptionCommand.php
Outdated
| Option::READER_THEME, | ||
| Option::THEME_SUPPORT, | ||
| Option::MOBILE_REDIRECT, | ||
| Option::SUPPRESSED_PLUGINS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we don't need to include Suppressed Plugins
| Option::SUPPRESSED_PLUGINS, |
src/Cli/OptionCommand.php
Outdated
|
|
||
| /** | ||
| * PluginSuppression instance. | ||
| * | ||
| * @var PluginSuppression | ||
| */ | ||
| private $plugin_suppression; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /** | |
| * PluginSuppression instance. | |
| * | |
| * @var PluginSuppression | |
| */ | |
| private $plugin_suppression; |
src/Cli/OptionCommand.php
Outdated
| * @param PluginSuppression $plugin_suppression PluginSuppression instance. | ||
| */ | ||
| public function __construct( ReaderThemes $reader_themes, PluginSuppression $plugin_suppression ) { | ||
| $this->reader_themes = $reader_themes; | ||
| $this->plugin_suppression = $plugin_suppression; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @param PluginSuppression $plugin_suppression PluginSuppression instance. | |
| */ | |
| public function __construct( ReaderThemes $reader_themes, PluginSuppression $plugin_suppression ) { | |
| $this->reader_themes = $reader_themes; | |
| $this->plugin_suppression = $plugin_suppression; | |
| */ | |
| public function __construct( ReaderThemes $reader_themes ) { | |
| $this->reader_themes = $reader_themes; |
src/Cli/OptionCommand.php
Outdated
| // Add reader themes to the options. | ||
| $options[ self::READER_THEMES ] = wp_list_pluck( $this->reader_themes->get_themes(), 'slug' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be confusing to a user as this is not actually an option.
If we want a way to list the available Reader themes, this can be done via a separate command entirely. For example, wp amp options list-reader-themes.
8cab1f3 to
bbc5c1c
Compare
Summary
Fixes #5783
Checklist