In Progress: Remove post limit on sitemaps#5394
In Progress: Remove post limit on sitemaps#5394nbloomf wants to merge 106 commits intoAutomattic:masterfrom nbloomf:master
Conversation
…le.com/jetpack-sitemap/sitemap and example.com/jetpack-sitemap/sitemapN
…edundant DB queries.
|
Hmm... the WordPress 404 means that the URL intercept callback isn't working. My dev environment has PHP 7.0.11; tomorrow I will try using 5.6 and lower to see if I can reproduce the error. The permalink settings shouldn't have an effect - the module hijacks the usual routing process on sitemap URLs. |
|
@eliorivero : I think I found the reason why the module wasn't working for you. When you get a chance, see if it's working in the latest commit.
|
Conflicts: class.jetpack.php tests/php/test_class.jetpack.php
|
I have messed something up while trying to merge commits back from Automattic/jetpack:master and now this repo is broken. I will open a new PR with a fresh fork. :( |
Addresses #3314: Remove 1000 post limit on sitemaps.
Changes proposed in this Pull Request:
Replace sitemap generating code.
Testing instructions:
Note that sitemap.xml links to two other files; one is the root of a tree of sitemaps for pages, the other is the root of a tree of sitemaps for images.
These changes allow for arbitrarily large sitemap trees per the spec. To test this functionality without having to create an arbitrarily large site, adjust the constant SITEMAP_MAX_ITEMS in modules/sitemaps.php, (5 is a good value.) This constant determines the maximum number of URLs on a single sitemap, so that if it's set to 5 and we have 6 posts then the tree structure kicks in.
The constant SITEMAP_INTERVAL is the minimum number of seconds between rebuilds; it's currently set to 60 for testing.
We reuse the filter
jetpack_sitemap_post_typeto allow plugin authors to include custom post types in the sitemap.Proposed changelog entry for your changes:
gulp js:hintbefore to commit your changes. It will allow you to detect errors in Javascript files.