@@ 267-286 (lines=20) @@ | ||
264 | ) |
|
265 | ); |
|
266 | ||
267 | if ( false === $result ) { |
|
268 | // If no sitemap was generated, advance to the next type. |
|
269 | Jetpack_Sitemap_State::check_in( array( |
|
270 | 'sitemap-type' => $index_type, |
|
271 | 'last-added' => 0, |
|
272 | 'number' => 0, |
|
273 | 'last-modified' => '1970-01-01 00:00:00', |
|
274 | ) ); |
|
275 | ||
276 | if ( $this->logger ) { |
|
277 | $this->logger->report( "-- Cleaning Up $sitemap_type" ); |
|
278 | } |
|
279 | ||
280 | // Clean up old files. |
|
281 | $this->librarian->delete_numbered_sitemap_rows_after( |
|
282 | $state['number'], $sitemap_type |
|
283 | ); |
|
284 | ||
285 | return; |
|
286 | } |
|
287 | ||
288 | // Otherwise, update the state. |
|
289 | Jetpack_Sitemap_State::check_in( array( |
|
@@ 361-379 (lines=19) @@ | ||
358 | ); |
|
359 | ||
360 | // If no index was built, advance to the next type and return. |
|
361 | if ( false === $result ) { |
|
362 | Jetpack_Sitemap_State::check_in( array( |
|
363 | 'sitemap-type' => $next_type, |
|
364 | 'last-added' => 0, |
|
365 | 'number' => 0, |
|
366 | 'last-modified' => '1970-01-01 00:00:00', |
|
367 | ) ); |
|
368 | ||
369 | if ( $this->logger ) { |
|
370 | $this->logger->report( "-- Cleaning Up $index_type" ); |
|
371 | } |
|
372 | ||
373 | // Clean up old files. |
|
374 | $this->librarian->delete_numbered_sitemap_rows_after( |
|
375 | $state['number'], $index_type |
|
376 | ); |
|
377 | ||
378 | return; |
|
379 | } |
|
380 | ||
381 | // Otherwise, check in the state. |
|
382 | Jetpack_Sitemap_State::check_in( array( |