You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI and cron duplicate code used to generate the sitemap for a given day:
$date_stamp = Metro_Sitemap::get_date_stamp( $year, $month, $day );
if ( Metro_Sitemap::date_range_has_posts( $date_stamp, $date_stamp ) ) {
Metro_Sitemap::generate_sitemap_for_date( $date_stamp ); // TODO: simplify; this function should accept the year, month, day and translate accordingly
}
This should be refactored into a method that includes the date_range_has_posts check, as we need to attempt to delete the sitemap if it doesn't have any posts, and there is no need to maintain that code in multiple places.
CLI and cron duplicate code used to generate the sitemap for a given day:
This should be refactored into a method that includes the
date_range_has_posts
check, as we need to attempt to delete the sitemap if it doesn't have any posts, and there is no need to maintain that code in multiple places.Needed for #63
The text was updated successfully, but these errors were encountered: