Plugin Directory

Changeset 3347906


Ignore:
Timestamp:
08/21/2025 06:49:09 AM (5 months ago)
Author:
rtcamp
Message:

Update to version 2.3.5 from GitHub

Location:
nginx-helper
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • nginx-helper/tags/2.3.5/includes/class-nginx-helper-activator.php

    r3213676 r3347906  
    4141        }
    4242
     43        self::set_user_caps();
     44
     45        wp_schedule_event( time(), 'daily', 'rt_wp_nginx_helper_check_log_file_size_daily' );
     46       
     47        if ( method_exists( $nginx_helper_admin, 'store_default_options' ) ) {
     48            $nginx_helper_admin->store_default_options();
     49        }
     50
     51    }
     52
     53    /**
     54     * This function sets the user capabilites appropriately.
     55     */
     56    public static function set_user_caps() {
     57
     58        if ( ! current_user_can( 'activate_plugins' ) ) {
     59            return;
     60        }
     61
    4362        $role = get_role( 'administrator' );
    4463
     
    5776        $role->add_cap( 'Nginx Helper | Purge cache' );
    5877
    59         wp_schedule_event( time(), 'daily', 'rt_wp_nginx_helper_check_log_file_size_daily' );
    60        
    61         if( method_exists( $nginx_helper_admin, 'store_default_options' ) ) {
    62             $nginx_helper_admin->store_default_options();
    63         }
    64 
    6578    }
    6679
  • nginx-helper/tags/2.3.5/includes/class-nginx-helper-deactivator.php

    r1976548 r3347906  
    3434        $role->remove_cap( 'Nginx Helper | Purge cache' );
    3535
     36        delete_option( 'nginx_helper_version' );
     37
    3638    }
    3739
  • nginx-helper/tags/2.3.5/includes/class-nginx-helper.php

    r3347327 r3347906  
    7878
    7979        $this->plugin_name = 'nginx-helper';
    80         $this->version     = '2.3.4';
     80        $this->version     = '2.3.5';
    8181        $this->minimum_wp  = '3.0';
    8282
     
    232232        // add action to preload the cache
    233233        $this->loader->add_action( 'admin_init', $nginx_helper_admin, 'preload_cache' );
     234        $this->loader->add_action( 'plugins_loaded', $this, 'handle_nginx_helper_upgrade' );
    234235    }
    235236
     
    322323        <?php
    323324    }
     325
     326    /**
     327     * Detects when plugin version changes and updates accordingly.
     328     */
     329    public function handle_nginx_helper_upgrade() {
     330        $installed_version = get_option( 'nginx_helper_version', '0' );
     331
     332        if ( version_compare( $installed_version, $this->get_version(), '<' ) ) {
     333           
     334            require_once NGINX_HELPER_BASEPATH . 'includes/class-nginx-helper-activator.php';
     335            Nginx_Helper_Activator::set_user_caps();
     336
     337            update_option( 'nginx_helper_version', $this->get_version() );
     338        }
     339
     340    }
    324341}
  • nginx-helper/tags/2.3.5/nginx-helper.php

    r3347327 r3347906  
    44 * Plugin URI:        https://rtcamp.com/nginx-helper/
    55 * Description:       Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also does few more things.
    6  * Version:           2.3.4
     6 * Version:           2.3.5
    77 * Author:            rtCamp
    88 * Author URI:        https://rtcamp.com
  • nginx-helper/tags/2.3.5/readme.txt

    r3347327 r3347906  
    11=== Nginx Helper ===
    2 Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, agvs, diepbui4157, pratiklondhe, ravanh
    3 Unlinked Contributors: stefanfisk, SGr33n, webdados, ghost
     2Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, agvs, diepbui4157, pratiklondhe, ravanh, tjalexander70
     3Unlinked Contributors: stefanfisk, SGr33n, webdados, ghost, mrrobot47
    44Donate Link: http://rt.cx/eedonate/
    55Tags: nginx, cache-purge, fastcgi, permalinks, redis-cache
     
    88Requires at least: 3.0
    99Tested up to: 6.8
    10 Stable tag: 2.3.4
     10Stable tag: 2.3.5
    1111
    1212Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also does a few more things.
     
    152152
    153153== Changelog ==
     154
     155= 2.3.5 =
     156
     157* Purge not working. [#Issue](https://wordpress.org/support/topic/purge-not-working-7/) - by [tjalexander70](https://profiles.wordpress.org/tjalexander70/), [mrrobot47](https://github.com/mrrobot47)
     158
    154159
    155160= 2.3.4 =
  • nginx-helper/trunk/includes/class-nginx-helper-activator.php

    r3213676 r3347906  
    4141        }
    4242
     43        self::set_user_caps();
     44
     45        wp_schedule_event( time(), 'daily', 'rt_wp_nginx_helper_check_log_file_size_daily' );
     46       
     47        if ( method_exists( $nginx_helper_admin, 'store_default_options' ) ) {
     48            $nginx_helper_admin->store_default_options();
     49        }
     50
     51    }
     52
     53    /**
     54     * This function sets the user capabilites appropriately.
     55     */
     56    public static function set_user_caps() {
     57
     58        if ( ! current_user_can( 'activate_plugins' ) ) {
     59            return;
     60        }
     61
    4362        $role = get_role( 'administrator' );
    4463
     
    5776        $role->add_cap( 'Nginx Helper | Purge cache' );
    5877
    59         wp_schedule_event( time(), 'daily', 'rt_wp_nginx_helper_check_log_file_size_daily' );
    60        
    61         if( method_exists( $nginx_helper_admin, 'store_default_options' ) ) {
    62             $nginx_helper_admin->store_default_options();
    63         }
    64 
    6578    }
    6679
  • nginx-helper/trunk/includes/class-nginx-helper-deactivator.php

    r1976548 r3347906  
    3434        $role->remove_cap( 'Nginx Helper | Purge cache' );
    3535
     36        delete_option( 'nginx_helper_version' );
     37
    3638    }
    3739
  • nginx-helper/trunk/includes/class-nginx-helper.php

    r3347327 r3347906  
    7878
    7979        $this->plugin_name = 'nginx-helper';
    80         $this->version     = '2.3.4';
     80        $this->version     = '2.3.5';
    8181        $this->minimum_wp  = '3.0';
    8282
     
    232232        // add action to preload the cache
    233233        $this->loader->add_action( 'admin_init', $nginx_helper_admin, 'preload_cache' );
     234        $this->loader->add_action( 'plugins_loaded', $this, 'handle_nginx_helper_upgrade' );
    234235    }
    235236
     
    322323        <?php
    323324    }
     325
     326    /**
     327     * Detects when plugin version changes and updates accordingly.
     328     */
     329    public function handle_nginx_helper_upgrade() {
     330        $installed_version = get_option( 'nginx_helper_version', '0' );
     331
     332        if ( version_compare( $installed_version, $this->get_version(), '<' ) ) {
     333           
     334            require_once NGINX_HELPER_BASEPATH . 'includes/class-nginx-helper-activator.php';
     335            Nginx_Helper_Activator::set_user_caps();
     336
     337            update_option( 'nginx_helper_version', $this->get_version() );
     338        }
     339
     340    }
    324341}
  • nginx-helper/trunk/nginx-helper.php

    r3347327 r3347906  
    44 * Plugin URI:        https://rtcamp.com/nginx-helper/
    55 * Description:       Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also does few more things.
    6  * Version:           2.3.4
     6 * Version:           2.3.5
    77 * Author:            rtCamp
    88 * Author URI:        https://rtcamp.com
  • nginx-helper/trunk/readme.txt

    r3347327 r3347906  
    11=== Nginx Helper ===
    2 Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, agvs, diepbui4157, pratiklondhe, ravanh
    3 Unlinked Contributors: stefanfisk, SGr33n, webdados, ghost
     2Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123, ravanh, michaelbeil, samedwards, niwreg, entr, nuvoPoint, iam404, rittesh.patel, vishalkakadiya, BhargavBhandari90, bryant1410, 1gor, matt-h, dotsam, nathanielks, rigagoogoo, dslatten, jinschoi, kelin1003, vaishuagola27, rahulsprajapati, utkarshpatel, gsayed786, shashwatmittal, sudhiryadav, thrijith, stayallive, jaredwsmith, abhijitrakas, umeshnevase, sid177, souptik, arafatkn, subscriptiongroup, akrocks, vedantgandhi28, GridPane, agvs, diepbui4157, pratiklondhe, ravanh, tjalexander70
     3Unlinked Contributors: stefanfisk, SGr33n, webdados, ghost, mrrobot47
    44Donate Link: http://rt.cx/eedonate/
    55Tags: nginx, cache-purge, fastcgi, permalinks, redis-cache
     
    88Requires at least: 3.0
    99Tested up to: 6.8
    10 Stable tag: 2.3.4
     10Stable tag: 2.3.5
    1111
    1212Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also does a few more things.
     
    152152
    153153== Changelog ==
     154
     155= 2.3.5 =
     156
     157* Purge not working. [#Issue](https://wordpress.org/support/topic/purge-not-working-7/) - by [tjalexander70](https://profiles.wordpress.org/tjalexander70/), [mrrobot47](https://github.com/mrrobot47)
     158
    154159
    155160= 2.3.4 =
Note: See TracChangeset for help on using the changeset viewer.