Changeset 3209466
- Timestamp:
- 12/17/2024 07:37:16 PM (16 months ago)
- Location:
- disable-wordpress-updates/trunk
- Files:
-
- 2 edited
-
disable-updates.php (modified) (15 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
disable-wordpress-updates/trunk/disable-updates.php
r2850009 r3209466 11 11 Description: Disables the theme, plugin and core update checking, the related cronjobs and notification system. 12 12 Plugin URI: https://wordpress.org/plugins/disable-wordpress-updates/ 13 Version: 1. 7.113 Version: 1.8.0 14 14 Author: Oliver Schlöbe 15 15 Author URI: https://www.schloebe.de/ … … 18 18 License: GPL2 19 19 20 Copyright 2013-202 1Oliver Schlöbe (email : wordpress@schloebe.de)20 Copyright 2013-2024 Oliver Schlöbe (email : wordpress@schloebe.de) 21 21 22 22 This program is free software; you can redistribute it and/or modify … … 40 40 * Define the plugin version 41 41 */ 42 define("OSDWPUVERSION", "1.7.1");42 const OSDWPUVERSION = "1.8.0"; 43 43 44 44 … … 49 49 * @subpackage OS_Disable_WordPress_Updates 50 50 * @since 1.3 51 * @author scripts@schloebe.de51 * @author wordpress@schloebe.de 52 52 */ 53 53 class OS_Disable_WordPress_Updates { … … 59 59 * 60 60 * @since 1.3 61 * @author scripts@schloebe.de61 * @author wordpress@schloebe.de 62 62 */ 63 63 function __construct() { … … 68 68 * 2.8 to 3.0 69 69 */ 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'] ); 75 75 76 76 … … 79 79 * 2.8 to 3.0 80 80 */ 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'] ); 86 86 87 87 … … 90 90 * 2.8 to 3.0 91 91 */ 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'] ); 97 97 98 98 … … 102 102 * @link https://wordpress.org/support/topic/possible-performance-improvement/#post-8970451 103 103 */ 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 ); 108 108 109 109 /* … … 134 134 if( !defined( 'WP_AUTO_UPDATE_CORE') ) define( 'WP_AUTO_UPDATE_CORE', false ); 135 135 136 add_filter( 'pre_http_request', array($this, 'block_request'), 10, 3 );136 add_filter( 'pre_http_request', [$this, 'block_request'], 10, 3 ); 137 137 } 138 138 … … 142 142 * 143 143 * @since 1.3 144 * @author scripts@schloebe.de144 * @author wordpress@schloebe.de 145 145 */ 146 146 function admin_init() { … … 148 148 149 149 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'] ); 152 152 } 153 153 … … 161 161 * Hide maintenance and update nag 162 162 */ 163 add_filter( 'site_status_tests', array($this, 'site_status_tests'));163 add_filter( 'site_status_tests', [$this, 'site_status_tests'] ); 164 164 remove_action( 'admin_notices', 'update_nag', 3 ); 165 165 remove_action( 'network_admin_notices', 'update_nag', 3 ); … … 254 254 $plugin_data = get_plugin_data( __FILE__ ); 255 255 256 $admin_bar->add_menu( array(257 'id' => 'dwuos-notice',256 $admin_bar->add_menu([ 257 'id' => 'dwuos-notice', 258 258 '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' => [ 261 261 'class' => 'wp-admin-bar-dwuos-notice', 262 262 'title' => sprintf( 263 263 /* translators: %s: Name of the plugin */ 264 __( '"%s" plugin is enabled!', 'disable-wordpress-updates'),264 __('"%s" plugin is enabled!', 'disable-wordpress-updates'), 265 265 $plugin_data['Name'] 266 266 ) 267 ),268 ));267 ], 268 ]); 269 269 } 270 270 … … 337 337 */ 338 338 public function last_checked_atm( $t ) { 339 include ( ABSPATH . WPINC . '/version.php' );339 include ABSPATH . WPINC . '/version.php'; 340 340 341 341 $current = new stdClass; 342 $current->updates = array();342 $current->updates = []; 343 343 $current->version_checked = $wp_version; 344 344 $current->last_checked = time(); -
disable-wordpress-updates/trunk/readme.txt
r2990019 r3209466 4 4 Tags: disable, updates, theme, core, auto-update, update-check, version-check, browse-happy, serve-happy 5 5 Requires at least: 3.8 6 Tested up to: 6. 4.997 Requires PHP: 5.66 Tested up to: 6.7.99 7 Requires PHP: 7.4 8 8 Stable tag: trunk 9 9 License: GPLv2 or later … … 23 23 and themes and update them as new versions are released (simply by deactivating this plugin for a short time). 24 24 25 [Developer on Twitter](https://twitter.com/wpseek "Developer on Twitter")25 [Developer on X](https://twitter.com/wpseek "Developer on X") 26 26 27 27 **Looking for more WordPress plugins? Visit [www.schloebe.de/portfolio/](https://www.schloebe.de/portfolio/)** … … 52 52 53 53 == Changelog == 54 55 = 1.8.0 = 56 * WordPress 6.7 compatibility 54 57 55 58 = 1.7.1 =
Note: See TracChangeset
for help on using the changeset viewer.