Automatically purge Cloudflare cache, including cache everything rules.
- Installation Instructions
- Developing
- Build from Source
- Extending Sunny
- Branches
- Support!
- Running the Tests
- Feedback
- Change log
- Security
- Contributing
- Credits
- License
This repository is a development version of Sunny intended to facilitate communication with developers. It is not stable and not intended for installation on production sites.
Bug reports and pull requests are welcome.
If you are not a developer or you'd like to receive the stable release version and automatic updates, install it via WordPress.org instead.
If you are not a developer or you'd like to receive the stable release version and automatic updates, install it via WordPress.org instead.
The master
branch is not installable. Use the nightly
branch instead. See branches.
-
Download the built archive from nightly branch
-
Unzip it
-
Upload it to
wp-content/plugins/
-
Go to the WordPress plugin menu and activate it
$ wp plugin install https://github.com/TypistTech/sunny/archive/nightly.zip --activate
Before start hacking, you need both composer
and yarn
installed. See:
To setup a developer workable version you should run these commands:
$ composer create-project --keep-vcs --no-install typisttech/sunny:dev-master
$ cd sunny
$ composer install
This command build the plugin into release/sunny.zip
.
$ composer build
Note: You need both composer
and yarn
installed.
Targets
and Post related urls
are filterable by StrategyInterface
, sunny_targets
and sunny_post_related_urls
. See examples on Sunny Purge Extra URLs Example.
Under the hood, Sunny uses WP Contained Hook and league/container. Sunny exposes its container
via WordPress actions sunny_register
and sunny_boot
in Laravel style.
Within the sunny_register
action, you should only bind things into the container. You should never attempt to register any hooks, actions, filters or any other piece of functionality within sunny_register
action. Otherwise, you may accidentally use an instance which has not been loaded yet.
The sunny_boot
action is called after this plugin and all its addons have been registered, meaning you have access to all instance that have been registered by this plugin and its addons.
The master
branch is the main branch where the source code of HEAD
always reflects a state with the latest delivered development changes for the next release. This is where the nightly
branch is built from. Since we built this plugin with composer
and grunt
, this branch is not installable.
The nightly
branch is built by TravisCI whenever the master
branch is updated. Anything in the nightly
branch is installable. See installation instructions.
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
Sunny run tests on Codeception and relies wp-browser to provide WordPress integration. Before testing, you have to install WordPress locally and add *.suite.yml files.
See *.suite.example.yml for a Varying Vagrant Vagrants configuration example.
Actually run the tests:
$ composer test
We also test all PHP files against PSR-2: Coding Style Guide and part of the WordPress coding standard.
Check the code style with $ composer check-style
and fix it with $ composer fix-style
.
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.
Please see CHANGELOG for more information on what has changed recently.
If you discover any security related issues, please email sunny@typist.tech instead of using the issue tracker.
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Sunny is a Typist Tech project and maintained by Tang Rufus, freelance developer for hire.
Full list of contributors can be found here.
Sunny is licensed under the GPLv2 (or later) from the Free Software Foundation. Please see License File for more information.