Plugin Directory

Changeset 3209466


Ignore:
Timestamp:
12/17/2024 07:37:16 PM (16 months ago)
Author:
Alphawolf
Message:

Version 1.8.0 update:

Location:
disable-wordpress-updates/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • disable-wordpress-updates/trunk/disable-updates.php

    r2850009 r3209466  
    1111Description: Disables the theme, plugin and core update checking, the related cronjobs and notification system.
    1212Plugin URI:  https://wordpress.org/plugins/disable-wordpress-updates/
    13 Version:     1.7.1
     13Version:     1.8.0
    1414Author:      Oliver Schlöbe
    1515Author URI:  https://www.schloebe.de/
     
    1818License:     GPL2
    1919
    20 Copyright 2013-2021 Oliver Schlöbe (email : wordpress@schloebe.de)
     20Copyright 2013-2024 Oliver Schlöbe (email : wordpress@schloebe.de)
    2121
    2222This program is free software; you can redistribute it and/or modify
     
    4040 * Define the plugin version
    4141 */
    42 define("OSDWPUVERSION", "1.7.1");
     42const OSDWPUVERSION = "1.8.0";
    4343
    4444
     
    4949 * @subpackage  OS_Disable_WordPress_Updates
    5050 * @since       1.3
    51  * @author      scripts@schloebe.de
     51 * @author      wordpress@schloebe.de
    5252 */
    5353class OS_Disable_WordPress_Updates {
     
    5959     *
    6060     * @since       1.3
    61      * @author      scripts@schloebe.de
     61     * @author      wordpress@schloebe.de
    6262     */
    6363    function __construct() {
     
    6868         * 2.8 to 3.0
    6969         */
    70         add_filter( 'pre_transient_update_themes', array($this, 'last_checked_atm') );
    71         /*
    72          * 3.0
    73          */
    74         add_filter( 'pre_site_transient_update_themes', array($this, 'last_checked_atm') );
     70        add_filter( 'pre_transient_update_themes', [$this, 'last_checked_atm'] );
     71        /*
     72         * 3.0
     73         */
     74        add_filter( 'pre_site_transient_update_themes', [$this, 'last_checked_atm'] );
    7575
    7676
     
    7979         * 2.8 to 3.0
    8080         */
    81         add_action( 'pre_transient_update_plugins', array($this, 'last_checked_atm') );
    82         /*
    83          * 3.0
    84          */
    85         add_filter( 'pre_site_transient_update_plugins', array($this, 'last_checked_atm') );
     81        add_action( 'pre_transient_update_plugins', [$this, 'last_checked_atm'] );
     82        /*
     83         * 3.0
     84         */
     85        add_filter( 'pre_site_transient_update_plugins', [$this, 'last_checked_atm'] );
    8686
    8787
     
    9090         * 2.8 to 3.0
    9191         */
    92         add_filter( 'pre_transient_update_core', array($this, 'last_checked_atm') );
    93         /*
    94          * 3.0
    95          */
    96         add_filter( 'pre_site_transient_update_core', array($this, 'last_checked_atm') );
     92        add_filter( 'pre_transient_update_core', [$this, 'last_checked_atm'] );
     93        /*
     94         * 3.0
     95         */
     96        add_filter( 'pre_site_transient_update_core', [$this, 'last_checked_atm'] );
    9797       
    9898       
     
    102102         * @link https://wordpress.org/support/topic/possible-performance-improvement/#post-8970451
    103103         */
    104         add_action('schedule_event', array($this, 'filter_cron_events'));
    105        
    106         add_action( 'pre_set_site_transient_update_plugins', array($this, 'last_checked_atm'), 21, 1 );
    107         add_action( 'pre_set_site_transient_update_themes', array($this, 'last_checked_atm'), 21, 1 );
     104        add_action('schedule_event', [$this, 'filter_cron_events']);
     105       
     106        add_action( 'pre_set_site_transient_update_plugins', [$this, 'last_checked_atm'], 21, 1 );
     107        add_action( 'pre_set_site_transient_update_themes', [$this, 'last_checked_atm'], 21, 1 );
    108108
    109109        /*
     
    134134        if( !defined( 'WP_AUTO_UPDATE_CORE') ) define( 'WP_AUTO_UPDATE_CORE', false );
    135135
    136         add_filter( 'pre_http_request', array($this, 'block_request'), 10, 3 );
     136        add_filter( 'pre_http_request', [$this, 'block_request'], 10, 3 );
    137137    }
    138138
     
    142142     *
    143143     * @since       1.3
    144      * @author      scripts@schloebe.de
     144     * @author      wordpress@schloebe.de
    145145     */
    146146    function admin_init() {
     
    148148
    149149        if ( current_user_can( 'update_core' ) ) {
    150             add_action( 'admin_bar_menu', array($this, 'add_adminbar_items'), 100 );
    151             add_action( 'admin_enqueue_scripts', array($this, 'admin_css_overrides') );
     150            add_action( 'admin_bar_menu', [$this, 'add_adminbar_items'], 100 );
     151            add_action( 'admin_enqueue_scripts', [$this, 'admin_css_overrides'] );
    152152        }
    153153       
     
    161161         * Hide maintenance and update nag
    162162         */
    163         add_filter( 'site_status_tests', array($this, 'site_status_tests') );
     163        add_filter( 'site_status_tests', [$this, 'site_status_tests'] );
    164164        remove_action( 'admin_notices', 'update_nag', 3 );
    165165        remove_action( 'network_admin_notices', 'update_nag', 3 );
     
    254254        $plugin_data = get_plugin_data( __FILE__ );
    255255
    256         $admin_bar->add_menu( array(
    257             'id'    => 'dwuos-notice',
     256        $admin_bar->add_menu([
     257            'id' => 'dwuos-notice',
    258258            'title' => '<span class="dashicons dashicons-info" aria-hidden="true"></span>',
    259             'href'  => network_admin_url('plugins.php'),
    260             'meta'  => array(
     259            'href' => network_admin_url('plugins.php'),
     260            'meta' => [
    261261                'class' => 'wp-admin-bar-dwuos-notice',
    262262                'title' => sprintf(
    263263                    /* translators: %s: Name of the plugin */
    264                     __( '"%s" plugin is enabled!', 'disable-wordpress-updates' ),
     264                    __('"%s" plugin is enabled!', 'disable-wordpress-updates'),
    265265                    $plugin_data['Name']
    266266                )
    267             ),
    268         ));
     267            ],
     268        ]);
    269269    }
    270270
     
    337337     */
    338338    public function last_checked_atm( $t ) {
    339         include( ABSPATH . WPINC . '/version.php' );
     339        include ABSPATH . WPINC . '/version.php';
    340340       
    341341        $current = new stdClass;
    342         $current->updates = array();
     342        $current->updates = [];
    343343        $current->version_checked = $wp_version;
    344344        $current->last_checked = time();
  • disable-wordpress-updates/trunk/readme.txt

    r2990019 r3209466  
    44Tags: disable, updates, theme, core, auto-update, update-check, version-check, browse-happy, serve-happy
    55Requires at least: 3.8
    6 Tested up to: 6.4.99
    7 Requires PHP: 5.6
     6Tested up to: 6.7.99
     7Requires PHP: 7.4
    88Stable tag: trunk
    99License: GPLv2 or later
     
    2323and themes and update them as new versions are released (simply by deactivating this plugin for a short time).
    2424
    25 [Developer on Twitter](https://twitter.com/wpseek "Developer on Twitter")
     25[Developer on X](https://twitter.com/wpseek "Developer on X")
    2626
    2727**Looking for more WordPress plugins? Visit [www.schloebe.de/portfolio/](https://www.schloebe.de/portfolio/)**
     
    5252
    5353== Changelog ==
     54
     55= 1.8.0 =
     56* WordPress 6.7 compatibility
    5457
    5558= 1.7.1 =
Note: See TracChangeset for help on using the changeset viewer.