Skip to content

Commit

Permalink
Merge pull request #16 from mihdan/master
Browse files Browse the repository at this point in the history
rocket_clean_domain_for_all_langs is deprecated
  • Loading branch information
GeekPress authored May 27, 2019
2 parents 04ff23b + 9572e91 commit 9b833eb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions command.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public function deactivate() {
* [--blog_id=<blog_id>]
* : List blogs to purge cache files. Trumps --post_id & --permalink & lang.
*
* [--confirm]
* : Automatic 'yes' to any confirmation
*
* ## EXAMPLES
*
* wp rocket clean
Expand Down Expand Up @@ -220,14 +223,13 @@ public function clean( $args = array(), $assoc_args = array() ) {

} else {

WP_CLI::confirm( 'Delete all cache files ?' );

if( rocket_has_i18n() ) {
rocket_clean_domain_for_all_langs();
if ( ! empty( $assoc_args['confirm'] ) && $assoc_args['confirm'] ) {
WP_CLI::line('Deleting all cache files.');
} else {
rocket_clean_domain();
WP_CLI::confirm('Delete all cache files ?');
}


rocket_clean_domain();
WP_CLI::success( 'All cache files cleared.' );

}
Expand Down Expand Up @@ -299,4 +301,4 @@ public function regenerate( $args = array(), $assoc_args = array() ) {
}
}

WP_CLI::add_command( 'rocket', 'WPRocket_CLI' );
WP_CLI::add_command( 'rocket', 'WPRocket_CLI' );

0 comments on commit 9b833eb

Please sign in to comment.