-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo here: Activate it if first if
. Two if
s.
I'm still getting the error when By |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: