-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add filter to limit the sitemap date range #147
Conversation
This is ready for code review. |
How about a test to demonstrate and prove how this new filter works in practice? |
@GaryJones Are you thinking of a unit test for the filter? I'm not sure exactly what to test there since it is only a pass-through for a variable and the result depends purely on the filter implementation. In a pure unit test way it would just check if We've already added an example to the readme to illustrate a sample usage. Did you have any other ideas in mind? |
Right - we're not testing how |
I don't see any tests for
@GaryJones, does this sound right? Also should this be added to |
msm-sitemap.php
Outdated
@@ -674,6 +674,9 @@ public static function build_root_sitemap_xml( $year = false ) { | |||
// Sometimes duplicate sitemaps exist, lets make sure so they are not output | |||
$sitemaps = array_unique( $sitemaps ); | |||
|
|||
// Filter daily sitemaps from the index by date. |
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.
This should be properly documented.
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.
@GaryJones This is documented now. What is next on the path to merger?
Fixes #146.
msm_sitemap_index
filter which allows removing daily sitemaps from the root sitemap index.