PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
admin-site-enhancements
/
classes
<?php namespace ASENHA\Classes; /** * Class for Disable Updates module * * @since 6.9.5 */ class Disable_Updates { /** * Disable updates and related functionalities * * @since 4.0.0 */ public function disable_update_notices_version_checks() { // Remove nags remove_action( 'admin_notices', 'update_nag', 3 ); remove_action( 'admin_notices', 'maintenance_nag' ); // Disable WP version check remove_action( 'wp_version_check', 'wp_version_check' ); remove_action( 'admin_init', 'wp_version_check' ); wp_clear_scheduled_hook( 'wp_version_check' ); add_filter( 'pre_option_update_core', '__return_null' ); // Disable theme version checks remove_action( 'wp_update_themes', 'wp_update_themes' ); remove_action( 'admin_init', '_maybe_update_themes' ); wp_clear_scheduled_hook( 'wp_update_themes' ); remove_action( 'load-themes.php', 'wp_update_themes' ); remove_action( 'load-update.php', 'wp_update_themes' ); remove_action( 'load-update-core.php', 'wp_update_themes' ); // Disable plugin version checks remove_action( 'wp_update_plugins', 'wp_update_plugins' ); remove_action( 'admin_init', '_maybe_update_plugins' ); wp_clear_scheduled_hook( 'wp_update_plugins' ); remove_action( 'load-plugins.php', 'wp_update_plugins' ); remove_action( 'load-update.php', 'wp_update_plugins' ); remove_action( 'load-update-core.php', 'wp_update_plugins' ); // Disable auto updates wp_clear_scheduled_hook( 'wp_maybe_auto_update' ); remove_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' ); remove_action( 'admin_init', 'wp_maybe_auto_update' ); remove_action( 'admin_init', 'wp_auto_update_core' ); // Disable Site Health checks add_filter( 'site_status_tests', [ $this, 'disable_update_checks_in_site_health' ] ); } /** * Override version check info stored in transients named update_core, update_plugins, update_themes. * * @since 4.0.0 */ public function override_version_check_info() { include( ABSPATH . WPINC . '/version.php' ); // get $wp_version from here $current = (object)array(); // create empty object $current->updates = array(); $current->response = array(); $current->version_checked = $wp_version; $current->last_checked = time(); return $current; } /** * Disable Background Updates and Auto-Updates tests in Site Health tests * * @since 4.0.0 */ public function disable_update_checks_in_site_health( $tests ) { unset( $tests['async']['background_updates'] ); unset( $tests['direct']['plugin_theme_auto_updates'] ); return $tests; } /** * Remove Dashboard >> Updates menu item * * @since 4.0.0 */ public function remove_updates_menu() { global $submenu; remove_submenu_page( 'index.php', 'update-core.php' ); } }
[-] class-hide-admin-bar.php
[edit]
[-] class-svg-upload.php
[edit]
[-] class-disable-gutenberg.php
[edit]
[-] class-cleanup-admin-bar.php
[edit]
[-] class-disable-rest-api.php
[edit]
[-] class-multiple-user-roles.php
[edit]
[-] class-disable-updates.php
[edit]
[-] class-image-upload-control.php
[edit]
[-] class-hide-admin-notices.php
[edit]
[-] class-content-duplication.php
[edit]
[-] class-insert-head-body-footer-code.php
[edit]
[-] class-media-replacement.php
[edit]
[-] class-password-protection.php
[edit]
[-] class-heartbeat-control.php
[edit]
[-] class-email-address-obfuscator.php
[edit]
[-] class-settings-sanitization.php
[edit]
[-] class-wp-config-transformer.php
[edit]
[-] class-content-order.php
[edit]
[-] class-custom-css.php
[edit]
[-] class-enhance-list-tables.php
[edit]
[-] class-login-logout-menu.php
[edit]
[-] class-search-engines-visibility.php
[edit]
[-] class-limit-login-attempts.php
[edit]
[-] class-disable-xml-rpc.php
[edit]
[-] class-common-methods.php
[edit]
[-] class-email-delivery.php
[edit]
[-] class-obfuscate-author-slugs.php
[edit]
[-] class-external-permalinks.php
[edit]
[-] class-wider-admin-menu.php
[edit]
[-] class-display-system-summary.php
[edit]
[-] class-admin-menu-organizer.php
[edit]
[-] class-redirect-fourofour.php
[edit]
[-] class-manage-robots-txt.php
[edit]
[-] class-site-identity-on-login-page.php
[edit]
[-] class-avif-upload.php
[edit]
[-] class-disable-comments.php
[edit]
[-] class-manage-ads-appads-txt.php
[edit]
[-] class-various-admin-ui-enhancements.php
[edit]
[-] class-admin-menu-svg-icon-mask.php
[edit]
[-] class-deactivation.php
[edit]
[-] class-activation.php
[edit]
[-] class-view-admin-as-role.php
[edit]
[-] class-maintenance-mode.php
[edit]
[-] class-custom-body-class.php
[edit]
[-] class-disable-dashboard-widgets.php
[edit]
[-] class-login-id-type.php
[edit]
[-] class-image-sizes-panel.php
[edit]
[-] class-redirect-after-login.php
[edit]
[-] class-settings-sections-fields.php
[edit]
[-] class-auto-publish-posts-with-missed-schedule.php
[edit]
[-] class-revisions-control.php
[edit]
[+]
..
[-] class-registration-date-column.php
[edit]
[-] class-disable-embeds.php
[edit]
[-] class-show-custom-taxonomy-filters.php
[edit]
[-] class-custom-nav-menu-items-in-new-tab.php
[edit]
[-] class-disable-feeds.php
[edit]
[-] class-captcha-protection.php
[edit]
[-] class-custom-admin-footer-text.php
[edit]
[-] class-change-login-url.php
[edit]
[-] class-last-login-column.php
[edit]
[-] class-settings-fields-render.php
[edit]
[-] class-disable-smaller-components.php
[edit]
[-] class-disable-author-archives.php
[edit]
[-] class-redirect-after-logout.php
[edit]
[-] class-open-external-links-in-new-tab.php
[edit]