Plugin Directory

Changeset 3246966


Ignore:
Timestamp:
02/26/2025 09:49:34 AM (13 months ago)
Author:
mnttech
Message:

Release 4.2.1

Location:
flush-opcache
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • flush-opcache/tags/4.2.1/admin/class-flush-opcache-admin.php

    r2753547 r3246966  
    6060    public function flush_opcache_admin_menu() {
    6161        if ( is_multisite() && is_super_admin() && is_main_site() ) {
    62             add_menu_page(
     62            add_management_page(
    6363                __( 'WP OPcache Settings', 'flush-opcache' ),
    6464                __( 'WP OPcache', 'flush-opcache' ),
     
    6868            );
    6969        } elseif ( ! is_multisite() && is_admin() ) {
    70             add_menu_page(
     70            add_management_page(
    7171                __( 'WP OPcache Settings', 'flush-opcache' ),
    7272                __( 'WP OPcache', 'flush-opcache' ),
     
    377377        }
    378378    }
    379 
    380379}
  • flush-opcache/tags/4.2.1/admin/class-flush-opcache-cached-files-list.php

    r2753547 r3246966  
    130130            $opcache_scripts_filtered = array_filter(
    131131                $opcache_scripts,
    132                 function ( $array ) {
     132                function ( $array ) { // phpcs:ignore
    133133                    return sanitize_key( $_GET['s'] ) !== '' && mb_strpos( $array['full_path'], sanitize_key( $_GET['s'] ) ) !== false; // phpcs:ignore
    134134                }
     
    142142            usort(
    143143                $opcache_scripts_filtered,
    144                 function( $a, $b ) {
     144                function ( $a, $b ) {
    145145                    $orderby = sanitize_key( $_GET['orderby'] ); // phpcs:ignore
    146146                    if ( isset( $_GET['order'] ) && 'asc' === $_GET['order'] ) { // phpcs:ignore
     
    161161            'total_items' => count( $opcache_scripts_filtered ),
    162162        );
    163 
    164163    }
    165164
     
    305304        <?php
    306305    }
    307 
    308306}
  • flush-opcache/tags/4.2.1/admin/flush-opcache-statistics.php

    r2528653 r3246966  
    1414}
    1515
    16 require_once plugin_dir_path( dirname( __FILE__ ) ) . '/includes/class-flush-opcache-statistics.php';
     16require_once plugin_dir_path( __DIR__ ) . '/includes/class-flush-opcache-statistics.php';
    1717$opcache_data                   = new Flush_Opcache_Statistics();
    1818$opcache_stroke_dasharray       = pi() * 200;
     
    225225                        $count = 0;
    226226                        foreach ( $opcache_data->get_stats( 'functions' ) as $function ) {
    227                             $count++;
     227                            ++$count;
    228228                            ?>
    229229                            <tr<?php if ( 0 === $count % 2 ) { ?> class="alternate" <?php } // phpcs:ignore ?>>
     
    253253                        $count = 0;
    254254                        foreach ( $opcache_data_directives as $directive ) {
    255                             $count++;
     255                            ++$count;
    256256                            if ( is_array( $directive['v'] ) ) {
    257257                                $directive_value = '<ul>';
  • flush-opcache/tags/4.2.1/flush-opcache.php

    r2853148 r3246966  
    2222}
    2323
    24 define( 'FLUSH_OPCACHE_VERSION', '4.2.0' );
     24define( 'FLUSH_OPCACHE_VERSION', '4.2.1' );
    2525define( 'FLUSH_OPCACHE_NAME', 'flush-opcache' );
    2626
  • flush-opcache/tags/4.2.1/includes/class-flush-opcache-statistics.php

    r2528653 r3246966  
    197197            'functions'  => get_extension_funcs( 'Zend OPcache' ),
    198198        );
    199 
    200199    }
    201200}
  • flush-opcache/tags/4.2.1/includes/class-flush-opcache.php

    r2853148 r3246966  
    4646     */
    4747    private function load_dependencies() {
    48         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-flush-opcache-admin.php';
    49         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-flush-opcache-cached-files-list.php';
    50         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-flush-opcache-cli.php';
     48        require_once plugin_dir_path( __DIR__ ) . 'admin/class-flush-opcache-admin.php';
     49        require_once plugin_dir_path( __DIR__ ) . 'admin/class-flush-opcache-cached-files-list.php';
     50        require_once plugin_dir_path( __DIR__ ) . 'cli/class-flush-opcache-cli.php';
    5151    }
    5252
     
    8181        add_action(
    8282            'cli_init',
    83             function() use ( $cli ) {
     83            function () use ( $cli ) {
    8484                WP_CLI::add_command( 'flush-opcache', $cli );
    8585            }
     
    100100        return $this->version;
    101101    }
    102 
    103102}
  • flush-opcache/tags/4.2.1/readme.txt

    r2853148 r3246966  
    22Contributors: mnttech, ChristianGiupponi
    33Tags: opcache, cache, flush, php, multisite
    4 Requires at least: 5.5
    5 Requires PHP: 7.4
    6 Tested up to: 6.0
    7 Stable tag: 4.2.0
     4Requires at least: 6.0
     5Requires PHP: 8.1
     6Tested up to: 6.7.2
     7Stable tag: 4.2.1
    88License: GPLv2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1515**Flush OPcache**
    1616
    17 * add a button in admin bar to flush OPcache
     17* creates a button in admin bar to flush OPcache
     18* menu is under Tools
    1819* flush only files in WordPress absolute path
    1920* individual or bulk file invalidation
     
    5455== Changelog ==
    5556
     57= 4.2.1 =
     58* Maintenance release
     59* Menu moved under Tools
     60
    5661= 4.2.0 =
    5762* Add CLI support
  • flush-opcache/trunk/admin/class-flush-opcache-admin.php

    r2753547 r3246966  
    6060    public function flush_opcache_admin_menu() {
    6161        if ( is_multisite() && is_super_admin() && is_main_site() ) {
    62             add_menu_page(
     62            add_management_page(
    6363                __( 'WP OPcache Settings', 'flush-opcache' ),
    6464                __( 'WP OPcache', 'flush-opcache' ),
     
    6868            );
    6969        } elseif ( ! is_multisite() && is_admin() ) {
    70             add_menu_page(
     70            add_management_page(
    7171                __( 'WP OPcache Settings', 'flush-opcache' ),
    7272                __( 'WP OPcache', 'flush-opcache' ),
     
    377377        }
    378378    }
    379 
    380379}
  • flush-opcache/trunk/admin/class-flush-opcache-cached-files-list.php

    r2753547 r3246966  
    130130            $opcache_scripts_filtered = array_filter(
    131131                $opcache_scripts,
    132                 function ( $array ) {
     132                function ( $array ) { // phpcs:ignore
    133133                    return sanitize_key( $_GET['s'] ) !== '' && mb_strpos( $array['full_path'], sanitize_key( $_GET['s'] ) ) !== false; // phpcs:ignore
    134134                }
     
    142142            usort(
    143143                $opcache_scripts_filtered,
    144                 function( $a, $b ) {
     144                function ( $a, $b ) {
    145145                    $orderby = sanitize_key( $_GET['orderby'] ); // phpcs:ignore
    146146                    if ( isset( $_GET['order'] ) && 'asc' === $_GET['order'] ) { // phpcs:ignore
     
    161161            'total_items' => count( $opcache_scripts_filtered ),
    162162        );
    163 
    164163    }
    165164
     
    305304        <?php
    306305    }
    307 
    308306}
  • flush-opcache/trunk/admin/flush-opcache-statistics.php

    r2528653 r3246966  
    1414}
    1515
    16 require_once plugin_dir_path( dirname( __FILE__ ) ) . '/includes/class-flush-opcache-statistics.php';
     16require_once plugin_dir_path( __DIR__ ) . '/includes/class-flush-opcache-statistics.php';
    1717$opcache_data                   = new Flush_Opcache_Statistics();
    1818$opcache_stroke_dasharray       = pi() * 200;
     
    225225                        $count = 0;
    226226                        foreach ( $opcache_data->get_stats( 'functions' ) as $function ) {
    227                             $count++;
     227                            ++$count;
    228228                            ?>
    229229                            <tr<?php if ( 0 === $count % 2 ) { ?> class="alternate" <?php } // phpcs:ignore ?>>
     
    253253                        $count = 0;
    254254                        foreach ( $opcache_data_directives as $directive ) {
    255                             $count++;
     255                            ++$count;
    256256                            if ( is_array( $directive['v'] ) ) {
    257257                                $directive_value = '<ul>';
  • flush-opcache/trunk/flush-opcache.php

    r2853148 r3246966  
    2222}
    2323
    24 define( 'FLUSH_OPCACHE_VERSION', '4.2.0' );
     24define( 'FLUSH_OPCACHE_VERSION', '4.2.1' );
    2525define( 'FLUSH_OPCACHE_NAME', 'flush-opcache' );
    2626
  • flush-opcache/trunk/includes/class-flush-opcache-statistics.php

    r2528653 r3246966  
    197197            'functions'  => get_extension_funcs( 'Zend OPcache' ),
    198198        );
    199 
    200199    }
    201200}
  • flush-opcache/trunk/includes/class-flush-opcache.php

    r2853148 r3246966  
    4646     */
    4747    private function load_dependencies() {
    48         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-flush-opcache-admin.php';
    49         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-flush-opcache-cached-files-list.php';
    50         require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-flush-opcache-cli.php';
     48        require_once plugin_dir_path( __DIR__ ) . 'admin/class-flush-opcache-admin.php';
     49        require_once plugin_dir_path( __DIR__ ) . 'admin/class-flush-opcache-cached-files-list.php';
     50        require_once plugin_dir_path( __DIR__ ) . 'cli/class-flush-opcache-cli.php';
    5151    }
    5252
     
    8181        add_action(
    8282            'cli_init',
    83             function() use ( $cli ) {
     83            function () use ( $cli ) {
    8484                WP_CLI::add_command( 'flush-opcache', $cli );
    8585            }
     
    100100        return $this->version;
    101101    }
    102 
    103102}
  • flush-opcache/trunk/readme.txt

    r2853148 r3246966  
    22Contributors: mnttech, ChristianGiupponi
    33Tags: opcache, cache, flush, php, multisite
    4 Requires at least: 5.5
    5 Requires PHP: 7.4
    6 Tested up to: 6.0
    7 Stable tag: 4.2.0
     4Requires at least: 6.0
     5Requires PHP: 8.1
     6Tested up to: 6.7.2
     7Stable tag: 4.2.1
    88License: GPLv2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1515**Flush OPcache**
    1616
    17 * add a button in admin bar to flush OPcache
     17* creates a button in admin bar to flush OPcache
     18* menu is under Tools
    1819* flush only files in WordPress absolute path
    1920* individual or bulk file invalidation
     
    5455== Changelog ==
    5556
     57= 4.2.1 =
     58* Maintenance release
     59* Menu moved under Tools
     60
    5661= 4.2.0 =
    5762* Add CLI support
Note: See TracChangeset for help on using the changeset viewer.