Changeset 2925848
- Timestamp:
- 06/14/2023 11:26:57 AM (3 years ago)
- Location:
- tnc-toolbox
- Files:
-
- 20 added
- 4 edited
-
tags/1.3.4 (added)
-
tags/1.3.4/assets (added)
-
tags/1.3.4/assets/index.php (added)
-
tags/1.3.4/assets/tnc-icon.png (added)
-
tags/1.3.4/core (added)
-
tags/1.3.4/core/class-tnc-wp-toolbox.php (added)
-
tags/1.3.4/core/includes (added)
-
tags/1.3.4/core/includes/classes (added)
-
tags/1.3.4/core/includes/classes/class-tnc-wp-toolbox-helpers.php (added)
-
tags/1.3.4/core/includes/classes/class-tnc-wp-toolbox-run.php (added)
-
tags/1.3.4/core/includes/classes/class-tnc-wp-toolbox-settings.php (added)
-
tags/1.3.4/core/includes/classes/index.php (added)
-
tags/1.3.4/core/includes/index.php (added)
-
tags/1.3.4/core/index.php (added)
-
tags/1.3.4/index.php (added)
-
tags/1.3.4/languages (added)
-
tags/1.3.4/languages/index.php (added)
-
tags/1.3.4/license.txt (added)
-
tags/1.3.4/readme.txt (added)
-
tags/1.3.4/tnc-wp-toolbox.php (added)
-
trunk/core/includes/classes/class-tnc-wp-toolbox-run.php (modified) (3 diffs)
-
trunk/core/includes/classes/class-tnc-wp-toolbox-settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tnc-wp-toolbox.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tnc-toolbox/trunk/core/includes/classes/class-tnc-wp-toolbox-run.php
r2925615 r2925848 82 82 add_action( 'admin_notices', array( $this, 'tnc_wp_toolbox_nginx_action_error_notice') ); 83 83 add_action( 'admin_notices', array( $this, 'tnc_wp_toolbox_nginx_action_success_notice') ); 84 add_action( 'save_post', array( $this, 'purge_cache_on_update' ), 10, 3 ); 85 add_action( 'post_updated', array( $this, 'purge_cache_on_update' ), 10, 3 ); 86 84 add_action( 'tnc_scheduled_cache_purge', array( $this, 'nginx_cache_purge' ) ); 85 add_action( 'post_updated', array( $this, 'purge_cache_on_update' ), 10, 3 ); 87 86 } 88 87 … … 149 148 wp_enqueue_style( 'tnc_custom_css' ); 150 149 $custom_css = " 151 /*.nginx-cache-btn.nginx-cache-off a { background-color: #d63638 !important; }150 .nginx-cache-btn.nginx-cache-off a { background-color: #d63638 !important; } 152 151 .nginx-cache-btn.nginx-cache-purge a { background-color: #ff9500 !important; } 153 .nginx-cache-btn.nginx-cache-on a { background-color: green !important; } */152 .nginx-cache-btn.nginx-cache-on a { background-color: green !important; } 154 153 "; 155 154 wp_add_inline_style( 'tnc_custom_css', $custom_css ); … … 289 288 * @return void 290 289 */ 291 public function purge_cache_on_update( $post_id, $post , $update ){290 public function purge_cache_on_update( $post_id, $post_after, $post_before ) { 292 291 // Check if the post is published or updated 293 if ( 'publish' === $post ->post_status || $update) {294 // Purge the cache295 $this->nginx_cache_purge();292 if ( 'publish' === $post_after->post_status || ( $post_before->post_status === 'publish' && $post_after->post_status !== 'trash' ) ) { 293 // Schedule the cache purge to run after the current request 294 wp_schedule_single_event( time(), 'tnc_scheduled_cache_purge' ); 296 295 } 297 296 } -
tnc-toolbox/trunk/core/includes/classes/class-tnc-wp-toolbox-settings.php
r2925615 r2925848 190 190 <div class="wrap"> 191 191 <h1><?php echo esc_html( get_admin_page_title() ); ?></h1> 192 <h4>To communicate with the cPanel API (UAPI), we need your API Token, Username & Server Hostname.</h4> 192 193 <form method="post"> 193 194 <input type="hidden" name="action" value="tnc_toolbox_settings" /> -
tnc-toolbox/trunk/readme.txt
r2925615 r2925848 8 8 Tested up to: 6.2 9 9 Requires PHP: 10 Stable tag: 1.3. 310 Stable tag: 1.3.4 11 11 License: GPLv2 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 61 61 == Changelog == 62 62 63 = 1.3.3: June 13, 2023 = 63 = 1.3.4: June 14, 2023 = 64 * Auto-purge: Fix GUI save issue 65 66 = 1.3.3: June 14, 2023 = 64 67 * Top bar links: Move into sub-menu 65 68 -
tnc-toolbox/trunk/tnc-wp-toolbox.php
r2925615 r2925848 6 6 * @author The Network Crew Pty Ltd 7 7 * @license gplv2 8 * @version 1.3. 38 * @version 1.3.4 9 9 * 10 10 * @wordpress-plugin … … 12 12 * Plugin URI: https://leopard.host 13 13 * Description: Adds functionality to WP that ties into your NGINX-powered Hosting on cPanel. 14 * Version: 1.3. 214 * Version: 1.3.4 15 15 * Author: The Network Crew Pty Ltd 16 16 * Author URI: https://thenetworkcrew.com.au … … 47 47 48 48 // Plugin version 49 define( 'TNCWPTBOX_VERSION', '1.3. 3' );49 define( 'TNCWPTBOX_VERSION', '1.3.4' ); 50 50 51 51 // Plugin Root File
Note: See TracChangeset
for help on using the changeset viewer.