Add option to list recently active plugins#383
Conversation
Add examples for activate and listing plugins with new flag Add tests for new flag
|
@wp-cli/committers Instead of |
@swissspidy I prefer |
| @@ -0,0 +1,103 @@ | |||
| Feature: List Recently Active WordPress plugins | |||
There was a problem hiding this comment.
Can we rename this file to plugin-list-recently-active.feature?
Also, given we have a code path for multisite, we should have a multisite scenario too.
src/Plugin_Command.php
Outdated
| $auto_updates = []; | ||
| } | ||
|
|
||
| $recently_active = is_multisite() ? get_site_option( 'recently_activated' ) : get_option( 'recently_activated' ); |
There was a problem hiding this comment.
Is this get_site_option( 'recently_activated' ) option applied to single site plugin pages on multisite too? Or only the network plugins screen?
There was a problem hiding this comment.
yes,
extension-command/src/Plugin_Command.php
Lines 443 to 453 in 7118325
| * : If set, the plugin update check will be skipped. | ||
| * | ||
| * [--recently-active] | ||
| * : If set, only recently active plugins will be shown and the status filter will be ignored. |
There was a problem hiding this comment.
We should document how the behavior changes for multisite too.
There was a problem hiding this comment.
@danielbachhuber sorry, didn't get what needs to be done here.
src/WP_CLI/CommandWithUpgrade.php
Outdated
|
|
||
| $all_items = $this->get_all_items(); | ||
|
|
||
| // Only show plugins that are recently active. |
There was a problem hiding this comment.
This comment isn't necessary and can be removed. It simply duplicates the code.
There was a problem hiding this comment.
Removed in 805760d, but I didn't get what you meant here.
|
Not sure what the error is in https://github.com/wp-cli/extension-command/actions/runs/7077555679/job/19262025024?pr=383#step:12:260, unable to replicate on local site, getting this error only in tests, please check https://cleanshot.thrijith.com/jMsCpCyk |
|
Closing the PR as I was not able to figure out the reason for one of the failure in tests, anyone who wants to takes this, please feel free to do so, thanks! |
Fixes #232