{"id":30657,"date":"2014-07-16T19:08:18","date_gmt":"2014-07-16T19:08:18","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/sunny\/"},"modified":"2018-01-08T11:09:41","modified_gmt":"2018-01-08T11:09:41","slug":"sunny","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/sunny\/","author":13621662,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.5.0","stable_tag":"2.5.0","tested":"4.9.29","requires":"4.7","requires_php":"7.0.0","requires_plugins":"","header_name":"Sunny","header_author":"Typist Tech","header_description":"","assets_banners_color":"d0bea6","last_updated":"2018-01-08 11:09:41","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/typist.tech\/donation\/","header_plugin_uri":"https:\/\/www.typist.tech\/","header_author_uri":"https:\/\/www.typist.tech\/","rating":4,"author_block_rating":0,"active_installs":100,"downloads":31772,"num_ratings":23,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":"4","2":"2","3":0,"4":"4","5":"15"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1798938","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1798938","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":"1798938","resolution":"1544x500","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1798938","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.1.1","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.3.0","1.4.0","1.4.1","1.4.11","1.4.12","1.4.13","1.4.14","1.4.15","1.4.16","1.4.2","1.4.3","1.4.4","1.4.5","1.4.7","1.4.8","1.4.9","1.5.0","1.5.1","1.5.3","1.5.4","1.6.0","1.6.1","2.0.0","2.0.1","2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1","2.5.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1798938","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1798938","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1798938","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1798938","resolution":"4","location":"assets"},"screenshot-5.png":{"filename":"screenshot-5.png","revision":"1798938","resolution":"5","location":"assets"},"screenshot-6.png":{"filename":"screenshot-6.png","revision":"1798938","resolution":"6","location":"assets"},"screenshot-7.png":{"filename":"screenshot-7.png","revision":"1798938","resolution":"7","location":"assets"}},"screenshots":{"1":"Cloudflare Settings","2":"Admin Bar Settings","3":"Purge when Post Updated","4":"Debuggers - Cache Status for a Given URL","5":"Debuggers - Related URLs for a Given Post","6":"Debuggers - Additional URLs for Every Purge","7":"Annoying Sunny v1 deprecated notice"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[146,144,3882,23853,794],"plugin_category":[52,54],"plugin_contributors":[78961,130301],"plugin_business_model":[],"class_list":["post-30657","plugin","type-plugin","status-publish","hentry","plugin_tags-cache","plugin_tags-caching","plugin_tags-cloudflare","plugin_tags-rest-api","plugin_tags-speed","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_contributors-tangrufus","plugin_contributors-typisttech","plugin_committers-tangrufus"],"banners":{"banner":"https:\/\/ps.w.org\/sunny\/assets\/banner-772x250.png?rev=1798938","banner_2x":"https:\/\/ps.w.org\/sunny\/assets\/banner-1544x500.png?rev=1798938","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/sunny\/assets\/icon-128x128.png?rev=1798938","icon_2x":"https:\/\/ps.w.org\/sunny\/assets\/icon-256x256.png?rev=1798938","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-1.png?rev=1798938","caption":"Cloudflare Settings"},{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-2.png?rev=1798938","caption":"Admin Bar Settings"},{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-3.png?rev=1798938","caption":"Purge when Post Updated"},{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-4.png?rev=1798938","caption":"Debuggers - Cache Status for a Given URL"},{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-5.png?rev=1798938","caption":"Debuggers - Related URLs for a Given Post"},{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-6.png?rev=1798938","caption":"Debuggers - Additional URLs for Every Purge"},{"src":"https:\/\/ps.w.org\/sunny\/assets\/screenshot-7.png?rev=1798938","caption":"Annoying Sunny v1 deprecated notice"}],"raw_content":"<!--section=description-->\n<p>Automatically purge Cloudflare cache, including cache everything rules.<\/p>\n\n<h4>Warning!!!<\/h4>\n\n<p>This plugin is not for normal users! Read the whole <a href=\"https:\/\/wordpress.org\/plugins\/sunny\/#description\">readme<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/sunny\/#faq\">FAQ<\/a> before installing.<\/p>\n\n<p>Cloudflare cache everything rules breaks most WordPress dynamic functionalities:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/codex.wordpress.org\/WordPress_Nonces\">WordPress Nonces<\/a> will be cached<\/li>\n<li>Forms must be loaded via AJAX unless you\u2019re using the USD$ 200 Cloudflare plan. <a href=\"https:\/\/github.com\/TypistTech\/sunny\/issues\/118#issuecomment-324325599\">Learn more<\/a><\/li>\n<\/ul>\n\n<p>Sunny shows a few admin notices in WP admin dashboard promoting the author's web development services every 2 weeks.They are dismissible via the <code>X<\/code> button on the right corner. See faq for more info.This is a free plugin, free as in free of charge and in freedom. You can always remove those notices without breaking other parts of Sunny.<\/p>\n\n<p>The next major release of Sunny(v3.0.0) will require:<\/p>\n\n<ul>\n<li>PHP 7.1<\/li>\n<li>WordPress 4.9<\/li>\n<li>Properly working <a href=\"https:\/\/typist.tech\/articles\/ensure-wp-cron-runs-on-time\/\">WP Cron<\/a><\/li>\n<\/ul>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Automatically purge Cloudflare <code>cache everything<\/code> rules' caches<\/li>\n<li>Use the latest Cloudflare API v4<\/li>\n<li>Support custom post type<\/li>\n<li>Hide admin bar from public-facing pages<\/li>\n<li>WP REST API support<\/li>\n<li><a href=\"https:\/\/github.com\/Typisttech\/sunny#extending-sunny\">Extendable Laravel-like container<\/a><\/li>\n<\/ul>\n\n<h4>Debuggers<\/h4>\n\n<p>Go <code>Sunny<\/code> --&gt; <code>Debuggers<\/code>, it shows:<\/p>\n\n<ul>\n<li>All related urls to be purged for a given post<\/li>\n<li>Show targeted urls which always be purged<\/li>\n<li><code>Cache Status<\/code> of a given URL<\/li>\n<\/ul>\n\n<h4>How does Sunny different from Cloudflare's official plugin?<\/h4>\n\n<p>At the time of writing, Cloudflare's <a href=\"https:\/\/wordpress.org\/plugins\/cloudflare\/\">official plugin<\/a> doesn't purge <code>cache everything<\/code> rules' caches. Here comes Sunny! Sunny focus on purging caches when needed.<\/p>\n\n<h4>Compatibility<\/h4>\n\n<ul>\n<li>Works with Cloudflare's <a href=\"https:\/\/wordpress.org\/plugins\/cloudflare\/\">official plugin<\/a><\/li>\n<li>Works with <a href=\"https:\/\/wordpress.org\/plugins\/wp-cloudflare-guard\/\">WP Cloudflare Guard (Automatically create firewall rules to block dangerous IPs.)<\/a><\/li>\n<\/ul>\n\n<h4>Things You Need to Know<\/h4>\n\n<ul>\n<li>You need PHP <code>7.0<\/code> or later<\/li>\n<li>You need WordPress <code>4.7<\/code> or later<\/li>\n<li>You need a Cloudflare account (free plan is okay)<\/li>\n<li>This plugin was not built by <a href=\"https:\/\/www.cloudflare.com\/\">Cloudflare, Inc<\/a><\/li>\n<\/ul>\n\n<blockquote>\n  <p>If you like the plugin, feel free to <a href=\"https:\/\/wordpress.org\/support\/plugin\/sunny\/reviews\/#new-post\">rate it<\/a> or <a href=\"https:\/\/typist.tech\/donation\/\">donate<\/a>. Thanks a lot! :)<\/p>\n<\/blockquote>\n\n<h4>Support<\/h4>\n\n<p>To save time so that we can spend it on development, please read the plugin's <a href=\"https:\/\/wordpress.org\/plugins\/sunny\/faq\/\">FAQ<\/a> first. Before requesting support, and ensure that you have updated Sunny and WordPress to the latest released version and installed PHP 7 or later.<\/p>\n\n<p>You can get support via <a href=\"https:\/\/github.com\/Typisttech\/sunny\/issues\">GitHub issues<\/a>(preferred) and WordPress <a href=\"https:\/\/wordpress.org\/support\/plugin\/sunny\">support forum<\/a>.<\/p>\n\n<p>If you don't provide these information, your support ticket will be ignored:<\/p>\n\n<ul>\n<li>PHP version number (if you say <code>latest<\/code>, your ticket will be closed without replies)<\/li>\n<li>WordPress version number<\/li>\n<li>Sunny version number<\/li>\n<li>What is the current behavior<\/li>\n<li>What is the expected or desired behavior<\/li>\n<li>Step to reproduce current behavior<\/li>\n<li>Does it behave the same when Sunny is disabled<\/li>\n<li>Does it behave the same when only Sunny is enabled<\/li>\n<li>What have you tried to resolve the issue<\/li>\n<\/ul>\n\n<h4>For Developers<\/h4>\n\n<p>Sunny is open source and hosted on <a href=\"https:\/\/github.com\/TypistTech\/sunny\">GitHub<\/a>. Feel free to make <a href=\"https:\/\/github.com\/Typisttech\/sunny\/pulls\">pull requests<\/a>.<\/p>\n\n<p>You can also tweak <code>Sunny<\/code> to work for you by <a href=\"https:\/\/github.com\/Typisttech\/sunny#extending-sunny\">extending its Laravel-like container<\/a>.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>How can I purge extra URLs?<\/dt>\n<dd><p>Post related urls are filterable by <code>Strategies<\/code> and <code>sunny_post_related_urls<\/code>. See examples on <a href=\"https:\/\/github.com\/TypistTech\/sunny-purge-extra-urls-example\">Sunny Purge Extra URLs Example<\/a>.<\/p>\n\n<p>If you don't understand the example code, <a href=\"https:\/\/typist.tech\/contact\/\">hire me<\/a> instead.<\/p><\/dd>\n<dt>How can I tweak Sunny to work for my special needs?<\/dt>\n<dd><p>Extend its <a href=\"https:\/\/github.com\/Typisttech\/sunny#extending-sunny\">Laravel-like container<\/a>.<\/p><\/dd>\n<dt>What version of PHP do I need?<\/dt>\n<dd><p>PHP <code>7.0<\/code> or later.<\/p><\/dd>\n<dt>What version of WordPress do I need?<\/dt>\n<dd><p>WordPress <code>4.7<\/code> or later.<\/p><\/dd>\n<dt>What to do when `Parse error: syntax error`?<\/dt>\n<dd><p>If you encountered this error:<\/p>\n\n<pre><code>Parse error: syntax error, unexpected \u2018:\u2019, expecting \u2018;\u2019 or \u2018{\u2018 in wp-content\/plugins\/sunny\/src\/Sunny.php on line XX\n<\/code><\/pre>\n\n<p>You probably running on a old version of PHP. Upgrade your server to PHP <code>7.0<\/code> or later.<\/p><\/dd>\n<dt>Unable to dismiss advertisements<\/dt>\n<dd><p>Sunny shows a few admin notices in WP admin dashboard promoting the author's web development services every 2 weeks.\nThey are dismissible via the <code>X<\/code> button on the right corner.<\/p>\n\n<p>Why do they don\u2019t go away?\nYour caching settings are incorrect! Possible issues:<\/p>\n\n<ul>\n<li>Database query caches not purged when updated<\/li>\n<li>Object cache expire time too long<\/li>\n<li>Cloudflare is caching <code>wp-admin<\/code><\/li>\n<\/ul>\n\n<p>Sunny works with database query caching and object caching. This plugin won't fix improper server configuration.<\/p>\n\n<p>But... other plugins don't have this issue?<\/p>\n\n<p>I doubt. Sunny saves\/retrieves those notices via <a href=\"https:\/\/codex.wordpress.org\/Options_API\">Options API<\/a> which commonly used in plugins. Thus, other plugins should get outdated options as well. Hire a developer to check your site!<\/p>\n\n<p>If you still not convinced, submit a pull request with failing test case via <a href=\"https:\/\/github.com\/TypistTech\/sunny\">GitHub<\/a>.<\/p><\/dd>\n<dt>Should I install Sunny version 1 because of PHP 5 incompatibles?<\/dt>\n<dd><p>No. Sunny version 1 uses Cloudflare API v1 which <a href=\"https:\/\/blog.cloudflare.com\/sunsetting-api-v1-in-favor-of-cloudflares-current-client-api-api-v4\/\">deprecated since 9th November, 2016<\/a>. Either update your server or uninstall Sunny.<\/p><\/dd>\n<dt>Don't know how to update PHP?<\/dt>\n<dd><ul>\n<li>Contact you hosting company<\/li>\n<li>Switch to a better hosting such as <a href=\"https:\/\/typist.tech\/go\/wp-engine-isnt-business-worth-29-month\/\">WP Engine<\/a> or <a href=\"https:\/\/typist.tech\/go\/kinsta-staging-environment\/\">Kinsta<\/a><\/li>\n<li>Hire me <a href=\"https:\/\/typist.tech\/contact\">https:\/\/typist.tech\/contact<\/a><\/li>\n<\/ul><\/dd>\n<dt>Will you support older versions of PHP or WordPress?<\/dt>\n<dd><p>Depends. I accept this kind of custom coding jobs. However, prepare for being rejected if the requirement doesn't make sense.\nShoot me an email at <a href=\"mailto:&#105;&#110;&#102;&#x6f;&#x40;&#x74;&#121;&#112;&#105;&#115;&#x74;&#x2e;&#x74;&#101;&#099;&#104;\">info@typist.tech<\/a> or use this <a href=\"https:\/\/typist.tech\/contact\/\">contact form<\/a>.<\/p><\/dd>\n<dt>Is this plugin written by Cloudflare, Inc.?<\/dt>\n<dd><p>No. This plugin is a <a href=\"https:\/\/typist.tech\">Typist Tech<\/a> project.<\/p><\/dd>\n<dt>Who make this plugin?<\/dt>\n<dd><p><a href=\"mailto:&#105;&#110;&#102;&#x6f;&#x40;&#x74;&#121;&#112;&#105;&#115;&#x74;&#x2e;&#x74;&#101;&#099;&#104;\">Tang Rufus<\/a>, a freelance developer for hire. I make <a href=\"https:\/\/typist.tech\/\">Typist Tech<\/a> also.<\/p><\/dd>\n<dt>Can I install Sunny, Sunny and Cloudflare's official plugin at the same time?<\/dt>\n<dd><p>Yes, all of them work together without problems.<\/p>\n\n<ul>\n<li>Install <a href=\"https:\/\/wordpress.org\/plugins\/wp-cloudflare-guard\/\">WP Cloudflare Guard<\/a> if you want to protect your site from bad IPs<\/li>\n<li>Install <a href=\"https:\/\/wordpress.org\/plugins\/sunny\/\">Sunny<\/a> if you want to purge Cloudflare's cache automatically<\/li>\n<li>Install the <a href=\"https:\/\/wordpress.org\/plugins\/cloudflare\/\">official plugin<\/a> if you can't see the real IP from visitors<\/li>\n<\/ul><\/dd>\n<dt>Does this plugin available in my language?<\/dt>\n<dd><p>English works out of the box.<\/p>\n\n<p>Traditional Chinese language pack is available <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/sunny\/language-packs\">here<\/a>.<\/p>\n\n<p>You can add your own translation at <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/sunny\">translate.wordpress.org<\/a>.<\/p><\/dd>\n<dt>How to get support?<\/dt>\n<dd><p>Read the whole <a href=\"https:\/\/wordpress.org\/plugins\/sunny\/#description\">readme<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/sunny\/#faq\">FAQ<\/a> first!<\/p><\/dd>\n<dt>How can I support this plugin?<\/dt>\n<dd><p>If you like the plugin, feel free to:<\/p>\n\n<ul>\n<li>Give us a 5-star review on <a href=\"https:\/\/wordpress.org\/support\/plugin\/sunny\/reviews\/#new-post\">WordPress.org<\/a><\/li>\n<li>Translate it at <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/sunny\">translate.wordpress.org<\/a><\/li>\n<li><a href=\"https:\/\/typist.tech\/donation\/\">Donate<\/a>. Thanks a lot! :)<\/li>\n<\/ul>\n\n<p>Besides, <code>Sunny<\/code> is open source and hosted on <a href=\"https:\/\/github.com\/TypistTech\/sunny\">GitHub<\/a>. Feel free to make pull requests.<\/p>\n\n<p>Last but not least, you can hire me. Shoot me an email at <a href=\"mailto:&#105;&#110;&#102;&#x6f;&#x40;&#x74;&#121;&#112;&#105;&#115;&#x74;&#x2e;&#x74;&#101;&#099;&#104;\">info@typist.tech<\/a> or use this <a href=\"https:\/\/typist.tech\/contact\/\">contact form<\/a>.<\/p><\/dd>\n<dt>What if I want more?<\/dt>\n<dd><p>Hire me! Shoot me an email at <a href=\"mailto:&#105;&#110;&#102;&#x6f;&#x40;&#x74;&#121;&#112;&#105;&#115;&#x74;&#x2e;&#x74;&#101;&#099;&#104;\">info@typist.tech<\/a> or use this <a href=\"https:\/\/typist.tech\/contact\/\">contact form<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>Full change log available at <a href=\"https:\/\/github.com\/typisttech\/sunny\/blob\/master\/CHANGELOG.md\">GitHub<\/a><\/p>\n\n<h4>2.5.0<\/h4>\n\n<ul>\n<li>Remove class <code>I18n<\/code><\/li>\n<li>Update dependencies<\/li>\n<li>Update readme<\/li>\n<\/ul>\n\n<h4>2.4.1<\/h4>\n\n<ul>\n<li>Add required php version to README.txt<\/li>\n<li>Apply code style patches and minor refactoring<\/li>\n<li>Test on PHP nightly<\/li>\n<li>Update dependencies<\/li>\n<\/ul>\n\n<h4>2.4.0<\/h4>\n\n<ul>\n<li>Extract targets service provider<\/li>\n<li>Show post type name in purge initiated notices<\/li>\n<\/ul>\n\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>Expose Container via WordPress action in Laravel style<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Fix: Ensure admins have a chance to view PHP 5.x unsupported notice<\/li>\n<li>Fix: Do not force sticky notice when WP_DEBUG is true<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>Purge adjacent posts urls<\/li>\n<li>Debugger: Check whether a url is cached by Cloudflare<\/li>\n<li>Add lots of tests<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Better WP REST API support<\/li>\n<li>Purge homepage (both dynamic and static)<\/li>\n<li>Add Debugger: Show all urls to be purged for a given post<\/li>\n<li>Add Debugger: Show targeted urls which always be purged<\/li>\n<li>Fix: Missing post url when purging<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Self deactivate if PHP version is older than <code>7.0.0<\/code><\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Update to Cloudflare API v4<\/li>\n<li>Codebase rewrite<\/li>\n<\/ul>","raw_excerpt":"Automatically purge Cloudflare cache, including cache everything rules.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/30657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=30657"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/tangrufus"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=30657"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=30657"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=30657"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=30657"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=30657"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=30657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}