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
{{ message }}
This repository was archived by the owner on Sep 14, 2021. It is now read-only.
Which feature is your enhancement request related to?
This is related to #25.
Describe the solution you'd like
As a person or plugin extending the sitemaps functionality, I want to be able to add extra attributes to sitemap entries to provide additional data to web crawlers.
A few possible solutions:
hook into the existing core_sitemaps_{object_type}_url_list filters to add attributes to the array which then get turned into XML nodes when the sitemap is rendered.
Add a new filter inside of each provider's get_url_list() method that allows each URL to be modified as it's added to the $url_list array.
Add a filter to Core_Sitemaps_Renderer::render_sitemap() that allows the XML output to be modified before the XML is echoed. The downside here being that filtering an SimpleXMLElement object is less intuitive that editing the raw data before the XML is created.
Acceptance Criteria
Additional attributes can be added to sitemap URL entries.
PHPUnit tests are added that confirm this functionality is working.
Description
Which feature is your enhancement request related to?
This is related to #25.
Describe the solution you'd like
As a person or plugin extending the sitemaps functionality, I want to be able to add extra attributes to sitemap entries to provide additional data to web crawlers.
A few possible solutions:
hook into the existing
core_sitemaps_{object_type}_url_listfilters to add attributes to the array which then get turned into XML nodes when the sitemap is rendered.Add a new filter inside of each provider's
get_url_list()method that allows each URL to be modified as it's added to the$url_listarray.Add a filter to
Core_Sitemaps_Renderer::render_sitemap()that allows the XML output to be modified before the XML is echoed. The downside here being that filtering anSimpleXMLElementobject is less intuitive that editing the raw data before the XML is created.Acceptance Criteria