Plugin Directory

Changeset 2605151


Ignore:
Timestamp:
09/26/2021 08:21:39 PM (4 years ago)
Author:
s4gor
Message:

version 1.2

Location:
disable-auto-updates
Files:
16 added
6 edited

Legend:

Unmodified
Added
Removed
  • disable-auto-updates/trunk/css/styles.css

    r2573338 r2605151  
    3232  margin-left: 379px;
    3333}
     34input[name='disable-admin-notice'] {
     35  margin-left: 404px;
     36}
    3437#dau-button {
    3538  margin-top: 40px;
  • disable-auto-updates/trunk/css/styles.less

    r2573338 r2605151  
    4141}
    4242
     43input[name='disable-admin-notice'] {
     44  margin-left: 404px;
     45}
     46
    4347#dau-button {
    4448  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  
    55Plugin URI: https://wordpress.org/plugins/disable-auto-updates
    66Description: A simple plugin to disable plugin, theme or core auto updates
    7 Version: 1.1
     7Version: 1.2
    88Author: Imran Hossain Sagor
    99Author URI: https://imransagor.codes
     
    3131            add_filter("plugin_row_meta", [$this, "meta"], 10, 2);
    3232            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 );
    3334        }
    3435
     
    8384        }
    8485
     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
    8592        public function ads_action_links( $links, $plugin_file ) {
    8693
     
    109116
    110117
    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'];
    112119
    113120    foreach ($dau_services as $service) {
  • disable-auto-updates/trunk/readme.txt

    r2597348 r2605151  
    44Requires at least: 4.7
    55Tested up to: 5.8
    6 Stable tag: 1.1
     6Stable tag: 1.2
    77Requires PHP: 5.0
    88License: GPLv3
     
    1616This 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.
    1717
    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.
     18You 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.
    1919
    2020== Updates ==
     21
     22A new feature is added through which wordpress's site irritating **admin notices can be hidden just by one simple click**.
    2123
    2224== Screenshots ==
     
    3739== Change Log ==
    3840
    39 = 1.0.0 =
     41= 1.2 =
     42
     43Added new feature (disable admin notices)
     44Fixed minor JS issues
     45Fixed minor PHP issues
     46
     47= 1.1 =
     48
     49Fixed minor CSS issues
     50Fixed minor JS issues
     51
     52= 1.0 =
     53
    4054First release
    4155
  • disable-auto-updates/trunk/view/view.php

    r2573338 r2605151  
    2626
    2727global $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'];
    2929$submitted = [];
    3030
     
    8888                    $log_content = "Core auto update has been disabled - " . current_time('mysql') . " by $user<br />";
    8989                }
     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 />';
    90106            } else {
    91107                $content = '<?php
     
    124140                } elseif($service === "disable-core") {
    125141                    $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 />";
    126144                } else {
    127145                    $log_content_delete = "Update notifications have been enabled along with core, theme and plugin updates - " . current_time('mysql') . " by $user<br />";
     
    141159
    142160<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>
    144162    <hr align="left" width="600">
    145163
     
    164182            Hide update notification
    165183            <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>
    166188        </label>
    167189        <button name="submit" id="dau-button">Save</button>
Note: See TracChangeset for help on using the changeset viewer.