Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

typisttech/sunny-purge-extra-urls-example

Repository files navigation

Sunny Purge Extra URLs Example

License Donate via PayPal Hire Typist Tech

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 vs Targets

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.

Examples

Filters

Adding extra urls by using the sunny_post_related_urls and sunny_targets filters.

See sunny-purge-extra-urls-example.php

Strategies

  1. Define a strategy class implementing TypistTech\Sunny\Targets\Strategies\StrategyInterface or TypistTech\Sunny\Posts\RelatedUrls\Strategies\StrategyInterface
  2. 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

Support!

Donate via PayPal Donate via PayPal

Love Sunny? Help me maintain Sunny, a donation here can help with it.

Why don't you hire me?

Ready to take freelance WordPress jobs. Contact me via the contact form here or, via email info@typist.tech

Want to help in other way? Want to be a sponsor?

Contact: Tang Rufus

Feedback

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.

Security

If you discover any security related issues, please email sunny@typist.tech instead of using the issue tracker.

Credits

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.

License

Sunny Purge Extra URLs Example is licensed under the GPLv2 (or later) from the Free Software Foundation. Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages