cleaner = $cleaner; } /** * Clears the sitemap cache and the cached list of pattern redirects. * * ## EXAMPLES * * wp elevenrank cache clear * * @param array $args Positional arguments. * @param array $assoc_args Flags. * @return void */ public function clear( $args, $assoc_args ): void { WP_CLI::success( 'Cleared: ' . implode( ', ', $this->cleaner->clear() ) . '.' ); } /** * Removes the stored SEO scores. * * Scores are worked out by the editor's analysis in the browser, so they cannot be recalculated from * the command line; each one comes back when its post is next saved in the editor. * * ## EXAMPLES * * wp elevenrank cache scores * * @param array $args Positional arguments. * @param array $assoc_args Flags. * @return void */ public function scores( $args, $assoc_args ): void { $this->cleaner->clear_scores(); WP_CLI::success( 'Stored scores removed.' ); } }