Plugin Directory

Changeset 3408713


Ignore:
Timestamp:
12/03/2025 03:41:28 AM (4 months ago)
Author:
leopardhost
Message:

v2.0.8: Scheduled Posts

Location:
tnc-toolbox
Files:
18 added
3 edited

Legend:

Unmodified
Added
Removed
  • tnc-toolbox/trunk/core/core.php

    r3397813 r3408713  
    6262        add_action('admin_post_nginx_cache_purge', array($this, 'nginx_cache_purge'));
    6363        add_action('post_updated', array($this, 'purge_cache_on_update'), 10, 3);
     64        add_action('transition_post_status', array($this, 'purge_cache_on_transition'), 10, 3);
    6465        add_action('_core_updated_successfully', function() { TNC_cPanel_UAPI::make_api_request('NginxCaching/clear_cache', [], true); });
    6566
     
    262263
    263264    /**
    264      * Automatic cache purging
     265     * Automatic cache purging on post update
    265266     */
    266267    public function purge_cache_on_update($post_id, $post_after, $post_before) {
     
    268269            ($post_before->post_status === 'publish' && $post_after->post_status !== 'trash')) {
    269270            // Use the UAPI directly rather than function, to support automated (#31)
     271            TNC_cPanel_UAPI::make_api_request('NginxCaching/clear_cache', [], true);
     272        }
     273    }
     274
     275    /**
     276     * Automatic cache purging on post status transition
     277     */
     278    public function purge_cache_on_transition($new_status, $old_status, $post) {
     279        if ( 'publish' === $new_status && 'publish' !== $old_status ) {
     280            // This hook also fires on-update, so we verify status change has occurred
    270281            TNC_cPanel_UAPI::make_api_request('NginxCaching/clear_cache', [], true);
    271282        }
  • tnc-toolbox/trunk/readme.txt

    r3398444 r3408713  
    55Contributors:
    66Tags: NGINX, Cache Purge, Web Performance, Automatic Purge, Freeware
    7 Tested up to: 6.8
    8 Stable tag: 2.0.7
     7Tested up to: 6.9
     8Stable tag: 2.0.8
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1111
    12 Made to help you fly online! Adds functionality (cache purge, etc) to WP - designed for NGINX-powered Servers on cPanel+WHM.
     12Designed for ea-NGINX (Cache/Proxy) on cPanel+WHM. Made to help you fly online! 🚀
    1313
    1414
     
    3434- Shows you the status of cP UAPI via disk usage info
    3535- Purge when any ACF config options are saved
     36- Supports scheduled post publishing!
    3637
    3738**Eager for even more capabilities?**
     
    136137== Changelog ==
    137138
     139= 2.0.8: Dec 3, 2025 =
     140* Scheduled Posts: Support scheduled post go-lives (#34)
     141* WordPress 6.9: Bump tested-to version from major v6.8
     142
    138143= 2.0.7: Nov 18, 2025 =
    139144* Global Script: Update tool now purges artifact configs.
  • tnc-toolbox/trunk/tnc-toolbox.php

    r3398444 r3408713  
    66 * @author            The Network Crew Pty Ltd (Merlot Digital)
    77 * @license           gplv3
    8  * @version           2.0.7
     8 * @version           2.0.8
    99 *
    1010 * @wordpress-plugin
    1111 * Plugin Name:       TNC Toolbox: Web Performance
    1212 * Plugin URI:        https://merlot.digital
    13  * Description:       Designed for NGINX-powered Servers on cPanel+WHM. Made to help you fly online!
    14  * Version:           2.0.7
     13 * Description:       Designed for ea-NGINX (Cache/Proxy) on cPanel+WHM. Made to help you fly online!
     14 * Version:           2.0.8
    1515 * Author:            The Network Crew Pty Ltd (Merlot Digital)
    1616 * Author URI:        https://tnc.works
     
    3030
    3131// Plugin version
    32 define('TNCTOOLBOX_VERSION', '2.0.7');
     32define('TNCTOOLBOX_VERSION', '2.0.8');
    3333
    3434// Plugin Root File
Note: See TracChangeset for help on using the changeset viewer.