PluginProbe ʕ •ᴥ•ʔ
Rank Math SEO – AI SEO Tools to Dominate SEO Rankings / 1.0.247
Rank Math SEO – AI SEO Tools to Dominate SEO Rankings v1.0.247
1.0.271 1.0.271.1 1.0.270 1.0.269 trunk 1.0.216 1.0.217 1.0.218 1.0.219 1.0.220 1.0.221 1.0.222 1.0.223 1.0.224 1.0.225 1.0.226 1.0.227 1.0.227.1 1.0.228 1.0.229 1.0.230 1.0.231 1.0.232 1.0.233 1.0.234 1.0.234.1 1.0.235 1.0.236 1.0.237 1.0.238 1.0.239 1.0.240 1.0.241 1.0.242 1.0.243 1.0.244 1.0.245 1.0.246 1.0.247 1.0.248 1.0.249 1.0.250 1.0.251 1.0.251.1 1.0.252 1.0.252.1 1.0.253 1.0.254 1.0.255 1.0.256 1.0.257 1.0.258 1.0.259 1.0.259.1 1.0.260 1.0.261 1.0.262 1.0.263 1.0.264 1.0.264.1 1.0.265 1.0.266 1.0.266.1 1.0.267 1.0.268
seo-by-rank-math / includes / cli / class-commands.php
seo-by-rank-math / includes / cli Last commit date
class-commands.php 5 years ago
class-commands.php
45 lines
1 <?php
2 /**
3 * Rank Math core CLI commands.
4 *
5 * @since 0.9.0
6 * @package RankMath
7 * @subpackage RankMath\WP_CLI
8 * @author Rank Math <support@rankmath.com>
9 */
10
11 namespace RankMath\CLI;
12
13 use WP_CLI;
14 use WP_CLI_Command;
15 use RankMath\Helper;
16 use RankMath\Sitemap\Cache;
17 use RankMath\Sitemap\Sitemap_XML;
18
19 defined( 'ABSPATH' ) || exit;
20
21 /**
22 * Commands class.
23 */
24 class Commands extends WP_CLI_Command {
25
26 /**
27 * Generate the sitemap.
28 *
29 * @param array $args Arguments passed.
30 */
31 public static function sitemap_generate( $args ) {
32 $sitemap = Helper::get_module( 'sitemap' );
33 if ( false === $sitemap ) {
34 WP_CLI::error( 'Sitemap module not active.' );
35 return;
36 }
37
38 Cache::invalidate_storage();
39 $generator = new Sitemap_XML( '1' );
40 $generator->get_output();
41
42 WP_CLI::success( 'Sitemap generated.' );
43 }
44 }
45