Automattic / msm-sitemap

Comprehensive sitemaps for your WordPress VIP site. Joint collaboration between Metro.co.uk, WordPress VIP, Alley Interactive, Maker Media, 10up, and others.
74 stars 37 forks source link

adding custom hook for generated xml properties #177

Closed elysium001 closed 9 months ago

elysium001 commented 9 months ago

Feature: Sitemap Generation Hook

Description:

~This pull request introduces a new action hook, msm_sitemap_generated, triggered after a sitemap has been generated. This hook provides developers with a convenient entry point to perform additional actions, such as pinging search engines, after the creation of a sitemap.~

This enhancement provides flexibility for developers to extend and customize the sitemap generation process based on their specific needs.

UPDATE After further review, appending the xml and total_url_count values to the existing hooks msm_update_sitemap_post and msm_insert_sitemap_post makes the most sense.

GaryJones commented 9 months ago

Instead of adding a new hook, could the generated XML and total_url_count not just be added to the msm_update_sitemap_post and msm_insert_sitemap_post hook instances, since they happen right before the proposed new action hook spot?