Changeset 2605151
- Timestamp:
- 09/26/2021 08:21:39 PM (4 years ago)
- Location:
- disable-auto-updates
- Files:
-
- 16 added
- 6 edited
-
tags/1.2 (added)
-
tags/1.2/css (added)
-
tags/1.2/css/styles.css (added)
-
tags/1.2/css/styles.css.map (added)
-
tags/1.2/css/styles.less (added)
-
tags/1.2/css/styles.min.css (added)
-
tags/1.2/disable-auto-updates.php (added)
-
tags/1.2/index.php (added)
-
tags/1.2/js (added)
-
tags/1.2/js/scripts.js (added)
-
tags/1.2/js/scripts.min.js (added)
-
tags/1.2/license.txt (added)
-
tags/1.2/readme.txt (added)
-
tags/1.2/uninstall.php (added)
-
tags/1.2/view (added)
-
tags/1.2/view/view.php (added)
-
trunk/css/styles.css (modified) (1 diff)
-
trunk/css/styles.less (modified) (1 diff)
-
trunk/css/styles.min.css (modified) (1 diff)
-
trunk/disable-auto-updates.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/view/view.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
disable-auto-updates/trunk/css/styles.css
r2573338 r2605151 32 32 margin-left: 379px; 33 33 } 34 input[name='disable-admin-notice'] { 35 margin-left: 404px; 36 } 34 37 #dau-button { 35 38 margin-top: 40px; -
disable-auto-updates/trunk/css/styles.less
r2573338 r2605151 41 41 } 42 42 43 input[name='disable-admin-notice'] { 44 margin-left: 404px; 45 } 46 43 47 #dau-button { 44 48 margin-top: 40px; -
disable-auto-updates/trunk/css/styles.min.css
r2573338 r2605151 1 #dau{margin:0;padding:0;font-weight:400;font-family:Poppins}#dau-title{margin-top:30px;margin-bottom:20px}#dau label{font-size:18px;cursor:text;line-height:30px}#dau-disable-checkbox{text-align:right}input[name=disable-all]{margin-left:180px}input[name=disable-plugin]{margin-left:389px}input[name=disable-theme]{margin-left:383px}input[name=disable-core]{margin-left:405px}input[name=hide-notification]{margin-left:379px} #dau-button{margin-top:40px;font-size:16px!important;height:40px;width:140px;cursor:pointer;background-color:#0d66c2;color:#fff;border:none;border-radius:20px}#dau-console{line-height:1.5;height:150px;width:97%;overflow:auto;background-color:gray;color:#fff;scrollbar-base-color:gold;font-family:sans-serif;padding:10px;margin-top:30px;border-radius:10px}/*# sourceMappingURL=styles.min.css.map */1 #dau{margin:0;padding:0;font-weight:400;font-family:Poppins}#dau-title{margin-top:30px;margin-bottom:20px}#dau label{font-size:18px;cursor:text;line-height:30px}#dau-disable-checkbox{text-align:right}input[name=disable-all]{margin-left:180px}input[name=disable-plugin]{margin-left:389px}input[name=disable-theme]{margin-left:383px}input[name=disable-core]{margin-left:405px}input[name=hide-notification]{margin-left:379px}input[name=disable-admin-notice]{margin-left:404px}#dau-button{margin-top:40px;font-size:16px!important;height:40px;width:140px;cursor:pointer;background-color:#0d66c2;color:#fff;border:none;border-radius:20px}#dau-console{line-height:1.5;height:150px;width:97%;overflow:auto;background-color:gray;color:#fff;scrollbar-base-color:gold;font-family:sans-serif;padding:10px;margin-top:30px;border-radius:10px}/*# sourceMappingURL=styles.min.css.map */ -
disable-auto-updates/trunk/disable-auto-updates.php
r2597348 r2605151 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. 17 Version: 1.2 8 8 Author: Imran Hossain Sagor 9 9 Author URI: https://imransagor.codes … … 31 31 add_filter("plugin_row_meta", [$this, "meta"], 10, 2); 32 32 add_filter( 'plugin_action_links', [$this, 'ads_action_links'], 10, 5 ); 33 // add_filter( 'plugin_auto_update_setting_html', [ $this, 'replace_auto_update_text' ], 10, 2 ); 33 34 } 34 35 … … 83 84 } 84 85 86 87 public function replace_auto_update_text() { 88 return "Auto update has been disabled by <a href='https://wordpress.org/plugins/disable-auto-updates'>Disable Auto Updates</a>"; 89 } 90 91 85 92 public function ads_action_links( $links, $plugin_file ) { 86 93 … … 109 116 110 117 111 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', 'hide-notification' ];118 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', 'hide-notification', 'disable-admin-notice']; 112 119 113 120 foreach ($dau_services as $service) { -
disable-auto-updates/trunk/readme.txt
r2597348 r2605151 4 4 Requires at least: 4.7 5 5 Tested up to: 5.8 6 Stable tag: 1. 16 Stable tag: 1.2 7 7 Requires PHP: 5.0 8 8 License: GPLv3 … … 16 16 This is a very simple plugin through which you can easily disable all kind of updates of your wordpress site. All you have to do is to choose what to disable. You can later enbale it easily if you need in any case. You can also hide update notifications also through this plugin. Number of updates appear with plugin (red colored) will disappear after you disable update notification. 17 17 18 You can also disable just plugin, theme or core update. You will also see a console where who has changed what will be logged along with your wordpress time.18 You can disable just plugin, theme or core update. You will also see a console where who has changed what will be logged along with your wordpress time. You can also disable irritating with just one click. 19 19 20 20 == Updates == 21 22 A new feature is added through which wordpress's site irritating **admin notices can be hidden just by one simple click**. 21 23 22 24 == Screenshots == … … 37 39 == Change Log == 38 40 39 = 1.0.0 = 41 = 1.2 = 42 43 Added new feature (disable admin notices) 44 Fixed minor JS issues 45 Fixed minor PHP issues 46 47 = 1.1 = 48 49 Fixed minor CSS issues 50 Fixed minor JS issues 51 52 = 1.0 = 53 40 54 First release 41 55 -
disable-auto-updates/trunk/view/view.php
r2573338 r2605151 26 26 27 27 global $dau_services; 28 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', 'hide-notification' ];28 $dau_services = ['disable-all', 'disable-plugin', 'disable-theme', 'disable-core', 'hide-notification', 'disable-admin-notice']; 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') { 91 $content = '<?php 92 93 defined("ABSPATH") or die("Unauthorized Access"); 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 />'; 90 106 } else { 91 107 $content = '<?php … … 124 140 } elseif($service === "disable-core") { 125 141 $log_content_delete = "Core auto update has been enabled - " . current_time('mysql') . " by $user<br />"; 142 }elseif($service === "'disable-admin-notice'") { 143 $log_content_delete = "Admin notice has been enabled - " . current_time('mysql') . " by $user<br />"; 126 144 } else { 127 145 $log_content_delete = "Update notifications have been enabled along with core, theme and plugin updates - " . current_time('mysql') . " by $user<br />"; … … 141 159 142 160 <div id="dau"> 143 <h1 id="dau-title">Disable Auto Updates <sub style="font-size: 12px">V 1. 0</sub></h1>161 <h1 id="dau-title">Disable Auto Updates <sub style="font-size: 12px">V 1.2</sub></h1> 144 162 <hr align="left" width="600"> 145 163 … … 164 182 Hide update notification 165 183 <input type="checkbox" name="hide-notification" id="dau-hide-notification" <?php dau_check_files('hide-notification'); ?>><br> 184 </label><br /> 185 <label for="dau-disable-admin-notice"> 186 Disable Admin Notice 187 <input type="checkbox" name="disable-admin-notice" id="dau-disable-admin-notice" <?php dau_check_files('disable-admin-notice'); ?>><br> 166 188 </label> 167 189 <button name="submit" id="dau-button">Save</button>
Note: See TracChangeset
for help on using the changeset viewer.