Added a WP CLI command to rebuild the sitemap.#7930
Conversation
This will help in testing and will allow users at least a low level way to rebuild the sitemap.
oskosk
left a comment
There was a problem hiding this comment.
I get Fatal error: Class 'Jetpack_Sitemap_Builder' not found even when the sitemaps module is enabled.
| * @synopsis <rebuild> | ||
| */ | ||
| public function sitemap( $args, $assoc_args ) { | ||
| if ( ! Jetpack::is_active() ) { |
There was a problem hiding this comment.
Can we check if sitemaps is active too?
class.jetpack-cli.php
Outdated
| WP_CLI::error( __( 'Jetpack is not currently connected to WordPress.com', 'jetpack' ) ); | ||
| } | ||
| if ( ! Jetpack::is_module_active( 'sitemaps' ) ) { | ||
| WP_CLI::error( __( 'Jetpack Sitemaps module is not currently active. Activate it if first if you want to work with sitemaps.', 'jetpack' ) ); |
There was a problem hiding this comment.
There's a typo here: Activate it if first if. Two ifs.
|
I'm still getting the error when By |
oskosk
left a comment
There was a problem hiding this comment.
LGTM ! Added a commit removing an extra if in the text.
* Changelog 5.6: create base for changelog. * Update changelog with 5.5.1 info. * Changelog: add #7930 and #8238 * Changelog: add #8076 * Changelog: add #8100 * Changelog: add #8117 * Changelog: add #8141 * Changelog: add #8143 * Changelog: add #8147 * Changelog: add #8149 * Changelog: add #8153 * Changelog: add #8173 * Changelog: add #8184 * Changelog: add #8196 * Changelog: add #8199 * Changelog: add #8093 * Changelog: add #8171 * Changelog: add #8182 * Changelog: add #8202, #8222 * Changelog: add #8228 * Changelog: add #8240 * Changelog: add #8251 * remove AL card change
This will help in testing and will allow users at least a low level way to rebuild the sitemap.
Changes proposed in this Pull Request:
Proposed changelog entry for your changes: