Skip to content
Permalink
Browse files

Use numeric timestamps for comparison

  • Loading branch information...
kasparsd committed Feb 7, 2019
1 parent a029ddb commit e8d2a6379239bc6fd00c945fa0141da672bd22a1
Showing with 6 additions and 2 deletions.
  1. +6 −2 README.md
@@ -68,6 +68,10 @@ Use the `msm_sitemap_index` filter to exclude daily sitemaps from the index base

```
add_filter( 'msm_sitemap_index', function( $sitemaps ) {
return array_filter( $sitemaps, function( $date ) { return '2017-09-09' < $date; } );
});
$reference_date = strtotime( '2017-09-09' );
return array_filter( $sitemaps, function ( $date ) use ( $reference_date ) {
return ( $reference_date < strtotime( $date ) );
} );
} );
```

0 comments on commit e8d2a63

Please sign in to comment.
You can’t perform that action at this time.