jmslbam / wp-cli-base-command
A base command for WP-CLI
1.0.0
2023-09-11 13:20 UTC
Requires
- php: >=7.4.0
README
-
Install via
composer require jmslbam/wp-cli-base-command
. -
Extend your own command:
<?php use \JMSLBAM\WP_CLI\Base_Command; class Import extends Base_Command { function import( $args, $assoc_args ) { $this->start_bulk_operation(); // Optional: Disable a bunch of pre-defined plugin actions $this->disable_hooks(); // Optional: Call "free_up_memory" after importing X amount of posts $this->free_up_memory(); // Finalize your command $this->end_bulk_operation(); } }