Changeset 3420834
- Timestamp:
- 12/16/2025 09:55:03 AM (4 months ago)
- Location:
- ergonet-varnish-cache
- Files:
-
- 1 added
- 2 edited
- 3 copied
-
tags/1.0.13 (added)
-
tags/1.0.13/index.php (copied) (copied from ergonet-varnish-cache/trunk/index.php)
-
tags/1.0.13/readme.txt (copied) (copied from ergonet-varnish-cache/trunk/readme.txt) (1 diff)
-
tags/1.0.13/varnishCache.php (copied) (copied from ergonet-varnish-cache/trunk/varnishCache.php) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/varnishCache.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ergonet-varnish-cache/tags/1.0.13/readme.txt
r3273064 r3420834 3 3 Tags: cache 4 4 Requires at least: 4.9 5 Tested up to: 6. 76 Stable tag: 1.0.1 15 Tested up to: 6.9 6 Stable tag: 1.0.13 7 7 Requires PHP: 7.1 8 8 License: GPLv2 or later -
ergonet-varnish-cache/tags/1.0.13/varnishCache.php
r3273064 r3420834 6 6 Plugin Name: Ergonet Cache 7 7 Description: Plugin per la gestione delle cache Nginx e Varnish su hosting Ergonet. 8 Version: 1.0.1 18 Version: 1.0.13 9 9 Author: Ergonet srl 10 10 Author URI: https://www.ergonet.it … … 62 62 } 63 63 64 function cache_purge_action_js() { ?> 64 function cache_purge_action_js() { 65 $nonce = wp_create_nonce( 'ergonet_cache_nonce' ); 66 ?> 65 67 <script type="text/javascript" > 66 68 jQuery("li#wp-admin-bar-cache-purge-homepage .ab-item").on( "click", function() { 67 69 var data = { 68 70 'action': 'varnish_cache_purge_homepage', 71 _ajax_nonce: '<?php echo $nonce; ?>' 69 72 }; 70 73 … … 76 79 jQuery("li#wp-admin-bar-cache-purge-all .ab-item").on( "click", function() { 77 80 var data = { 78 'action': 'varnish_cache_purge_all', 81 action: 'varnish_cache_purge_all', 82 _ajax_nonce: '<?php echo $nonce; ?>' 79 83 }; 80 84 … … 97 101 98 102 function adminBarMenu($wp_admin_bar) { 103 if ( ! current_user_can('manage_options') ) { 104 return; 105 } 99 106 global $pagenow; 100 107 $wp_admin_bar->add_node(array("id"=>"parent_node_1", "title"=>"<span class=\"ab-icon dashicons dashicons-performance\"></span>Ergonet Cache", "href"=>false)); … … 109 116 function purgeCache($post_id) 110 117 { 118 if ( ! current_user_can('edit_post', $post_id) ) { 119 return; 120 } 121 122 if ( wp_is_post_revision( $post_id ) ) { 123 return; 124 } 125 111 126 if(!$this->notToDo) { 112 127 $this->purgePost($post_id); -
ergonet-varnish-cache/trunk/readme.txt
r3273051 r3420834 3 3 Tags: cache 4 4 Requires at least: 4.9 5 Tested up to: 6. 76 Stable tag: 1.0.1 15 Tested up to: 6.9 6 Stable tag: 1.0.13 7 7 Requires PHP: 7.1 8 8 License: GPLv2 or later -
ergonet-varnish-cache/trunk/varnishCache.php
r3273044 r3420834 6 6 Plugin Name: Ergonet Cache 7 7 Description: Plugin per la gestione delle cache Nginx e Varnish su hosting Ergonet. 8 Version: 1.0.1 18 Version: 1.0.13 9 9 Author: Ergonet srl 10 10 Author URI: https://www.ergonet.it … … 62 62 } 63 63 64 function cache_purge_action_js() { ?> 64 function cache_purge_action_js() { 65 $nonce = wp_create_nonce( 'ergonet_cache_nonce' ); 66 ?> 65 67 <script type="text/javascript" > 66 68 jQuery("li#wp-admin-bar-cache-purge-homepage .ab-item").on( "click", function() { 67 69 var data = { 68 70 'action': 'varnish_cache_purge_homepage', 71 _ajax_nonce: '<?php echo $nonce; ?>' 69 72 }; 70 73 … … 76 79 jQuery("li#wp-admin-bar-cache-purge-all .ab-item").on( "click", function() { 77 80 var data = { 78 'action': 'varnish_cache_purge_all', 81 action: 'varnish_cache_purge_all', 82 _ajax_nonce: '<?php echo $nonce; ?>' 79 83 }; 80 84 … … 97 101 98 102 function adminBarMenu($wp_admin_bar) { 103 if ( ! current_user_can('manage_options') ) { 104 return; 105 } 99 106 global $pagenow; 100 107 $wp_admin_bar->add_node(array("id"=>"parent_node_1", "title"=>"<span class=\"ab-icon dashicons dashicons-performance\"></span>Ergonet Cache", "href"=>false)); … … 109 116 function purgeCache($post_id) 110 117 { 118 if ( ! current_user_can('edit_post', $post_id) ) { 119 return; 120 } 121 122 if ( wp_is_post_revision( $post_id ) ) { 123 return; 124 } 125 111 126 if(!$this->notToDo) { 112 127 $this->purgePost($post_id);
Note: See TracChangeset
for help on using the changeset viewer.