• Resolved inthylight

    (@inthylight)


    Hi there,

    Thank you for this excellent plugin!

    I have a question about what is included in the purge when the Purge Taxonomies is enabled:

    1. Is the default WP RSS feed (i.e., site.com/feed/) purged?
    2. If there is a plugin installed that generates a sitemap automatically (such as Yoast SEO or Google Sitemap), will the sitemap.xml files be purged?

    If not, to handle purging these sorts of files, do you think it would make good sense to add a textarea to the settings page where users can list specific URLs that will be purged every time SUNNY calls for a purge?

    https://www.ads-software.com/plugins/sunny/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tang Rufus

    (@tangrufus)

    RSS feeds and sitemaps are not purged for now.
    Purging special URLs is good idea.
    Stay tuned for the next version of Sunny

    Thread Starter inthylight

    (@inthylight)

    Hi Tang,

    Great news, thanks.

    One more thing. In looking at the purge functions (https://github.com/wphuman/sunny/blob/aba32f18299b75cc39d4d8b5441cc02db3f8eefb/modules/class-sunny-post-purger.php), I think there’s a use case missing: when a scheduled post changes from future to published.

    In other words, I think you need to add a filter for the future_to_publish hook in order to execute purges when scheduled posts are published.

    Plugin Author Tang Rufus

    (@tangrufus)

    Sunny_Post_Purger::purge_post_on_status_transition is hooked in transition_post_status (WP Codex)

    Sunny_Post_Purger::purge_post_on_status_transition checks 'publish' == $new_status || 'publish' == $old_status.

    I think both transition_post_status & future_to_publish hooks are triggered when scheduled posts are published.

    Are you having issues that Sunny not purging scheduled posts?

    Thread Starter inthylight

    (@inthylight)

    Hey Tang,

    My apologies: I thought I was having issues with scheduled posts; however, after looking at it again, I think my own implementation of my test code is to blame. In other words, no, I’m not having issues with scheduled posts, and your current implementation appears correct to me.

    On another note, in case anyone else needs a temporary fix that purges the feed URL until this feature becomes available in the Sunny plugin, here’s one way to do it: https://gist.github.com/lolux/7580f2f0f3bf78bf8a1e

    Add this to functions.php; or, add it using the handy Add Actions and Filters plugin (https://www.ads-software.com/plugins/add-actions-and-filters/).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Are RSS feed and sitemap URLs included in purges?’ is closed to new replies.