This repository is an example of adding extra purge urls to Sunny by filters and strategies intended to facilitate communication with developers.
It is not stable and not intended for installation on production sites.
If you are not a developer or looking for the Sunny
plugin, install Sunny
via WordPress.org instead.
Bug reports and pull requests are welcome.
Related urls change from case to case, determined by its post
.
Targets never change no matter which post caused the purge.
Both related urls
and targets
can be filtered by filters and strategies.
Adding extra urls by using the sunny_post_related_urls
and sunny_targets
filters.
See sunny-purge-extra-urls-example.php
- Define a strategy class implementing
TypistTech\Sunny\Targets\Strategies\StrategyInterface
orTypistTech\Sunny\Posts\RelatedUrls\Strategies\StrategyInterface
- Add the strategy instance into Sunny's container by using the
sunny_register
action.
See sunny-purge-extra-urls-example.php, CustomRelatedUrlsStrategy.php and CustomTargetsStrategy.php
Love Sunny? Help me maintain Sunny, a donation here can help with it.
Ready to take freelance WordPress jobs. Contact me via the contact form here or, via email info@typist.tech
Contact: Tang Rufus
Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.
If you discover any security related issues, please email sunny@typist.tech instead of using the issue tracker.
Sunny Purge Extra URLs Example is a Typist Tech project and maintained by Tang Rufus, freelance developer for hire.
Full list of contributors can be found here.
Sunny Purge Extra URLs Example is licensed under the GPLv2 (or later) from the Free Software Foundation. Please see License File for more information.