Changeset 2605161
- Timestamp:
- 09/26/2021 09:15:49 PM (3 years ago)
- Location:
- disable-auto-updates/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
disable-auto-updates/trunk/disable-auto-updates.php
r2605151 r2605161 5 5 Plugin URI: https://wordpress.org/plugins/disable-auto-updates 6 6 Description: A simple plugin to disable plugin, theme or core auto updates 7 Version: 1.2 7 Version: 1.2 8 8 Author: Imran Hossain Sagor 9 9 Author URI: https://imransagor.codes … … 116 116 117 117 118 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', ' hide-notification', 'disable-admin-notice'];118 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', '']; 119 119 120 120 foreach ($dau_services as $service) { -
disable-auto-updates/trunk/readme.txt
r2605151 r2605161 4 4 Requires at least: 4.7 5 5 Tested up to: 5.8 6 Stable tag: 1.2 6 Stable tag: 1.2 7 7 Requires PHP: 5.0 8 8 License: GPLv3 … … 39 39 == Change Log == 40 40 41 42 43 44 41 45 = 1.2 = 42 46 -
disable-auto-updates/trunk/view/view.php
r2605151 r2605161 26 26 27 27 global $dau_services; 28 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', ' hide-notification', 'disable-admin-notice'];28 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', '']; 29 29 $submitted = []; 30 30 … … 88 88 $log_content = "Core auto update has been disabled - " . current_time('mysql') . " by $user<br />"; 89 89 } 90 } elseif($service === 'disable-admin-notice') {90 }elseif($service === 'disable-admin-notice') { 91 91 $content = '<?php 92 92 93 93 defined("ABSPATH") or die("Unauthorized Access"); 94 94 95 add_action("admin_enqueue_scripts", "hide_notices"); 96 add_action("login_enqueue_scripts", "hide_notices"); 97 function hide_notices() { 98 if (!current_user_can( "manage_options" )) { 99 echo "<style>.update-nag, .updated, .error, .is-dismissible, .notice { display: none; }</style>"; 100 } 101 }'; 102 } 103 104 if(!file_exists($dau_dir.'/'.$service.'.php')) { 105 $log_content = 'Admin notice has been disabled - ' . current_time('mysql') . ' by ' . $user . '<br />'; 95 add_action("admin_enqueue_scripts", "hide_notices"); 96 add_action("login_enqueue_scripts", "hide_notices"); 97 98 function hide_notices() { 99 if (!current_user_can( "manage_options" )) { 100 echo "<style>.update-nag, .updated, .error, .is-dismissible, .notice { display: none; }</style>"; 101 } 102 }'; 103 104 if(!file_exists("$dau_dir/$service.php")) { 105 $log_content = "Admin notice has been disabled - " . current_time('mysql') . " by $user<br />"; 106 } 107 108 106 109 } else { 107 110 $content = '<?php … … 140 143 } elseif($service === "disable-core") { 141 144 $log_content_delete = "Core auto update has been enabled - " . current_time('mysql') . " by $user<br />"; 142 } elseif($service === "'disable-admin-notice'") {145 }") { 143 146 $log_content_delete = "Admin notice has been enabled - " . current_time('mysql') . " by $user<br />"; 144 } else {147 } else { 145 148 $log_content_delete = "Update notifications have been enabled along with core, theme and plugin updates - " . current_time('mysql') . " by $user<br />"; 146 149 } … … 159 162 160 163 <div id="dau"> 161 <h1 id="dau-title">Disable Auto Updates <sub style="font-size: 12px">V 1.2 </sub></h1>164 <h1 id="dau-title">Disable Auto Updates <sub style="font-size: 12px">V 1.2</sub></h1> 162 165 <hr align="left" width="600"> 163 166
Note: See TracChangeset
for help on using the changeset viewer.