Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Add examples related to recently active
  • Loading branch information
ernilambar committed May 2, 2024
commit 6e09dcbfd5ab70bb78aaaf39055e37ab38561097
16 changes: 16 additions & 0 deletions src/Plugin_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,18 @@ protected function get_all_items() {
* $ wp plugin activate hello --network
* Plugin 'hello' network activated.
* Success: Network activated 1 of 1 plugins.
*
* # Activate plugins that were recently active.
* $ wp plugin activate $(wp plugin list --recently-active --field=name)
* Plugin 'bbpress' activated.
* Plugin 'buddypress' activated.
* Success: Activated 2 of 2 plugins.
*
* # Activate plugins that were recently active on a multisite.
* $ wp plugin activate $(wp plugin list --recently-active --field=name) --network
* Plugin 'bbpress' network activated.
* Plugin 'buddypress' network activated.
* Success: Activated 2 of 2 plugins.
*/
public function activate( $args, $assoc_args = array() ) {
$network_wide = Utils\get_flag_value( $assoc_args, 'network', false );
Expand Down Expand Up @@ -1371,6 +1383,10 @@ public function delete( $args, $assoc_args = array() ) {
* | local | | |
* +--------------------+--------------+--------------------+
*
* # List recently active plugins on the site.
* $ wp plugin list --recently-active --field=name --format=json
* ["akismet","bbpress","buddypress"]
*
* @subcommand list
*/
public function list_( $_, $assoc_args ) {
Expand Down