Plugin Directory

Changeset 3207597


Ignore:
Timestamp:
12/13/2024 12:20:28 PM (12 months ago)
Author:
ideastocode
Message:

Features added: Block specific plugin updates and Block WordPress or theme updates.

Location:
disable-email-notification-for-auto-updates
Files:
55 added
13 edited

Legend:

Unmodified
Added
Removed
  • disable-email-notification-for-auto-updates/trunk/README.txt

    r3206544 r3207597  
    1 === Disable email Notification for auto-updates ===
     1=== Disable Auto Update Emails and Block Updates for Plugins, WP Core, and Themes ===
    22Contributors: ideastocode
    33Donate link: https://ideastocode.com/
    4 Tags: Disable, auto-updates, themes, plugin, Wordpress, core, updates, stop, notification, emails, automatic
     4Tags: Disable update notification Emails, Block Specific Plugin updates, Block WordPress Core updates, Block Themes updates, Hide Updates from Dashboard
    55Requires at least: 5.5
    66Tested up to: 6.7
    7 Stable tag:   1.0.2
     7Stable tag:   1.0.3
    88Requires PHP: 7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 This plugin will disable email notifications that WordPress sends, after an auto-update of plugins, themes, or WordPress.
     12This plugin disables email notifications for auto-updates and blocks updates for specific plugins, WordPress core, and themes.
     13- Disable Email Notifications for Auto-Updates
     14- Block Specific Plugin Updates: You can choose plugins to block
     15- Block WordPress Core and Theme Updates
     16- Remove Update Buttons from Admin Panel (under Dashboard menu)
    1317
    1418== Description ==
    1519
    16 As WordPress 5.5 introduced the feature of Enable auto-updates, it as well started sending emails for every update that was made. These email notifications may not actually be useful, rather just pile up in our inbox and if you have dozens of plugins or manage multiple websites, all these emails create an unnecessary mess.  Thus, this FREE PLUGIN, will stop or disable sending auto-updates email notifications that you receive after plugins, themes, or WordPress core are updated. However, please note that this plugin WILL NOT affect the AUTO-UPDATE feature of WordPress if it is enabled.
     20**Disable Email Notifications for Auto-Updates:**
     21With the introduction of WordPress 5.5, the auto-update feature was enabled, and email notifications started being sent for every update made. By simply installing this plugin, you can stop receiving these annoying notifications for every auto-update made to plugins, themes, or even the WordPress core. Please note that this plugin will not affect the auto-update feature of WordPress if it is enabled.
    1722
    18 Anyway, simply install this plugin and you will stop getting all the annoying notifications for each and every auto-update that has been made to the plugins, themes, or even WordPress core. You will also have an option to disable some or all notifications as required.
     23**Block Specific Plugin Updates:**
     24In the "Block Plugin Updates" tab, the plugin will list all installed plugins on your website. If there are specific plugins you do not want to update, you can disable updates for those particular plugins.
     25
     26**Block WordPress Core and Theme Updates:**
     27You also have the option to block updates for the WordPress core and themes. However, this is not recommended for security reasons.
     28
     29**Remove Update Buttons from Admin Panel:**
     30If you do not want to see the "Updates" menu under the Dashboard, you can easily hide it from the admin panel menu.
     31
     32**Default Settings:**
     33By default, only the email notification feature is turned on; other settings must be configured manually.
    1934
    2035**Tutorial video**
     
    30451. Log in to your site's dashboard i.e. /wp-admin
    31462. Then Go to Plugins → Add New
    32 3. Search for Disable Email Notification for auto-updates
    33 4. Locate the plugin Disable Email Notification for auto-updates & click on Install Now
     473. Search for ideasToCode
     484. Locate the plugin Disable Auto Update Emails and Block Updates for Plugins, WP Core, and Themes & click on Install Now
    34495. Activate the plugin → Navigate to Settings.
    3550
    3651== Frequently Asked Questions ==
     52
     53= New Features: Block updates for specific plugins =
     54
     55You can now choose to block updates for specific plugins in the "Block Plugin Updates" tab. This tab will list all the installed plugins, and you can select the plugins for which you do not want updates or update notifications.
     56
     57= New Features: Block WordPress core and theme updates =
     58
     59We have added the feature to block WordPress core and theme updates. However, it is highly recommended to keep your site up-to-date for security reasons.
    3760
    3861= Can Disable email Notification for auto-updates plugin be used with all the themes? =
     
    48711. Backend settings
    49722. Disable this kind of notification emails
     733. Block Specific Plugin Updates
     744. Block WP Core Updates
     755. Block Theme Updates
    5076
    5177== Changelog ==
     78
     79= 1.0.3 =
     80* Features added: Block specific plugin updates and Block WordPress or theme updates.
    5281
    5382= 1.0.2 =
  • disable-email-notification-for-auto-updates/trunk/admin/class-admin.php

    r3190499 r3207597  
    44}
    55
    6 class ITC_Disable_Update_Notifications_Admin extends ITC_Disable_Update_Notifications_BaseController{
     6class ITC_Disable_Update_Notifications_Admin extends ITC_Disable_Update_Notifications_BaseController {
    77
    88    public function __construct() {
    99        parent::__construct();
    10        
     10
    1111        add_action( 'admin_notices', array( $this, 'general_admin_notice' ) );
     12        add_action( 'admin_init', array( $this, 'handle_dismiss_notice' ) );
    1213    }
    1314
    14     public function enqueue_styles() {
    15         wp_enqueue_style( 'itc-disable_update_notifications-admin-css', plugin_dir_url( __FILE__ ) . 'css/itc-admin.css', array(), $this->get_version(), 'all' );
    16     }
     15    public function enqueue_styles() {
     16        wp_enqueue_style( 'itc-disable_update_notifications-admin-css', plugin_dir_url( __FILE__ ) . 'css/itc-admin.css', array(), $this->get_version(), 'all' );
     17    }
    1718
    18     public function enqueue_scripts() {
    19         wp_register_script( 'itc-disable_update_notifications-admin-js', plugin_dir_url( __FILE__ ) . 'js/itc-admin.js',array('jquery'),$this->get_version(), false );
     19    public function enqueue_scripts() {
     20        wp_register_script( 'itc-disable_update_notifications-admin-js', plugin_dir_url( __FILE__ ) . 'js/itc-admin.js', array( 'jquery' ), $this->get_version(), false );
    2021        wp_localize_script( 'itc-disable_update_notifications-admin-js', 'ITC_Disable_Update_Notifications_Admin', array(
    21             'ajaxurl' => get_admin_url() . 'admin-ajax.php', 
     22            'ajaxurl' => get_admin_url() . 'admin-ajax.php',
    2223        ));
    23         wp_enqueue_script( 'itc-disable_update_notifications-admin-js' );
    24     }
     24        wp_enqueue_script( 'itc-disable_update_notifications-admin-js' );
     25    }
    2526
    26     public function itc_disable_update_notifications_action_links( $links ) {
    27         $plugin_slug_name = $this->get_plugin_slug();
    28         $subpage="";
    29         $links2 = '<a href="'. menu_page_url( $plugin_slug_name, false ).$subpage .'">Settings</a>';
    30         array_unshift($links, $links2);
    31         return $links;
    32     }
     27    public function itc_disable_update_notifications_action_links( $links ) {
     28        $plugin_slug_name = $this->get_plugin_slug();
     29        $links1 = '<a href="https://buymeacoffee.com/ideastocode" target="_blank" style="font-weight:bold;">' . esc_html__( 'Donate', 'wp-custom-search-box-itc' ) . '</a>';
     30        $links2 = '<a href="' . esc_url( menu_page_url( $plugin_slug_name, false ) ) . '">' . esc_html__( 'Settings', 'wp-custom-search-box-itc' ) . '</a>';
     31        array_unshift( $links, $links1, $links2 );
     32        return $links;
     33    }
    3334
    34     public function add_options_page() {
     35    public function add_options_page() {
    3536        global $admin_page_hooks;
    3637        $plugin_slug_name = $this->get_plugin_slug();
     
    3839
    3940        if ( ! isset( $admin_page_hooks[$plugin_slug_name] ) ) {
    40             // Add the options page
    4141            add_options_page(
    42                 $plugin_title, 
    43                 $plugin_title, 
    44                 'manage_options',                       
    45                 $plugin_slug_name,                     
    46                 array( $this, 'itc_disable_update_notifications_option_page' ) 
     42                $plugin_title,
     43                $plugin_title,
     44                'manage_options',
     45                $plugin_slug_name,
     46                array( $this, 'itc_disable_update_notifications_option_page' )
    4747            );
    4848        }
    4949    }
    5050
    51     public function itc_disable_update_notifications_option_page() {
    52         include_once 'partials/admin-display.php';
    53     }
    54 
    55     public function register_setting() {
    56         $setting_slug = $this->get_settings();
    57         register_setting( $setting_slug . "_option_group",  $setting_slug,
    58             array(
    59                 'sanitize_callback' => array( $this, 'form_submit_sanitize' )
    60             )
    61         );
     51    public function itc_disable_update_notifications_option_page() {
     52        include_once 'partials/admin-display.php';
    6253    }
    6354
    64     public function form_submit_sanitize( $settings ) {
    65         $finalSettings = $this->get_option_default();
    66         $finalSettings['plugin'] = $this->form_submit_sanitize_bool($settings, 'plugin');
    67         $finalSettings['themes'] = $this->form_submit_sanitize_bool($settings, 'themes');
    68         $finalSettings['wordpress'] = $this->form_submit_sanitize_bool($settings, 'wordpress');
     55    public function register_setting() {
     56        $setting_slug = $this->get_settings();
    6957
    70         $setting_slug = $this->get_settings();
    71         // Only add the settings error if it hasn't been added already
     58        register_setting( $setting_slug . "_option_group", $setting_slug, array(
     59            'sanitize_callback' => array( $this, 'form_submit_sanitize' )
     60        ));
     61
     62        // Register settings for blocking plugin updates
     63        $disable_plugin_updates_slug = $setting_slug . '_disable_plugin_updates';
     64        register_setting( $disable_plugin_updates_slug . "_option_group", $disable_plugin_updates_slug, array(
     65            'sanitize_callback' => array( $this, 'form_submit_sanitize_disable_plugin_updates' )
     66        ));
     67    }
     68
     69    public function form_submit_sanitize( $settings ) {
     70        $finalSettings = $this->get_option_default();
     71        $finalSettings['plugin'] = $this->form_submit_sanitize_bool($settings, 'plugin');
     72        $finalSettings['themes'] = $this->form_submit_sanitize_bool($settings, 'themes');
     73        $finalSettings['wordpress'] = $this->form_submit_sanitize_bool($settings, 'wordpress');
     74        $finalSettings['wp_update_button'] = $this->form_submit_sanitize_bool($settings, 'wp_update_button');
     75        $finalSettings['wp_core'] = $this->form_submit_sanitize_bool($settings, 'wp_core');
     76        $finalSettings['wp_themes'] = $this->form_submit_sanitize_bool($settings, 'wp_themes');
     77
     78        $setting_slug = $this->get_settings();
    7279        if ( ! get_option( $setting_slug ) ) {
    7380            add_settings_error(
     
    8289    }
    8390
     91    public function form_submit_sanitize_disable_plugin_updates( $settings ) {
     92        $finalSettings = [];
     93        if ( is_array( $settings ) ) {
     94            foreach ( $settings as $key => $value ) {
     95                $finalSettings[$key] = $this->form_submit_sanitize_bool( $settings, $key );
     96            }
     97        }
     98        return $finalSettings;
     99    }
     100
    84101    private function form_submit_sanitize_bool( $settings, $key ) {
    85102        return isset( $settings[$key] ) && $settings[$key] == "1" ? 1 : 0;
    86     }   
     103    }
    87104
    88105    public function general_admin_notice() {
    89         // Removed the notice
    90     }   
    91 }
     106        $plugin_slug_name = $this->get_plugin_slug();
     107
     108        // Check if the user has dismissed the notice
     109        $notice_dismissed = get_option( 'itc-disable_update_notifications_notice_dismissed', false );
     110
     111        if ( $notice_dismissed ) {
     112            return; // Don't show the notice if dismissed
     113        }
     114
     115        // Show the notice
     116        ?>
     117        <div class="notice notice-info itc-svg-upload-notice">
     118            <div class="notice-content">
     119                <p class="notice-text">
     120                    <strong><?php esc_html_e( 'New Features Added: ', 'wp-custom-search-box-itc' ); ?></strong>
     121                    <?php esc_html_e( ' Block specific plugin updates, block WordPress core and theme updates, or remove the update button under the Dashboard menu.', 'wp-custom-search-box-itc' ); ?>
     122                </p>
     123                <div class="notice-buttons">
     124                    <a href="<?php echo esc_url( menu_page_url( $plugin_slug_name, false ) ); ?>" class="button button-primary">
     125                        <?php esc_html_e( 'Check Features', 'wp-custom-search-box-itc' ); ?>
     126                    </a>
     127                    <a href="<?php echo esc_url( add_query_arg( 'dismiss_notice', 'true' ) ); ?>" class="button button-secondary">
     128                        <?php esc_html_e( 'Dismiss Notice', 'wp-custom-search-box-itc' ); ?>
     129                    </a>
     130                </div>
     131            </div>
     132        </div>
     133        <style>
     134            .itc-svg-upload-notice .notice-dismiss {
     135                display: none !important;
     136            }
     137            .itc-svg-upload-notice .notice-content {
     138                display: flex;
     139                justify-content: center;
     140                align-items: center;
     141                width: 100%;
     142                padding: 5px;
     143            }
     144            .itc-svg-upload-notice .notice-text {
     145                margin-right: 10px;
     146                flex-grow: 1;
     147            }
     148            .itc-svg-upload-notice .notice-buttons {
     149                display: flex;
     150                justify-content: flex-end;
     151            }
     152            .itc-svg-upload-notice .button {
     153                margin-left: 10px;
     154            }
     155        </style>
     156        <?php
     157    }
     158
     159    public function handle_dismiss_notice() {
     160        if ( isset( $_GET['dismiss_notice'] ) && $_GET['dismiss_notice'] === 'true' ) {
     161            update_option( 'itc-disable_update_notifications_notice_dismissed', true );
     162        }
     163    }
     164}
     165
  • disable-email-notification-for-auto-updates/trunk/admin/partials/_about.php

    r2583915 r3207597  
    1 <h2 class="itc_title"> Brief Info </h2>
     1<h2 class="itc_title"><?php esc_html_e( 'Brief Info', 'disable-email-notification-for-auto-updates' ); ?></h2>
    22<div class="itc_bg itc_width_md">
    3     <p><b>Disable Email Notification for auto-updates</b> plugin  will disable all the email notifications that you receive after an auto-updates of plugins, themes, or WordPress core. However, please note that this plugin will not affect the auto-update feature of WordPress, if it is enabled.</p>
    4     <p>- For any queries, please write to us at <a href="mailto:[email protected]">[email protected]</a>.
    5     <br/>- To learn more about the plugin, tutorial, and other details: <a href="https://ideastocode.com/plugins/disable-automatic-update-email-notification-in-wordpress/" target="_blank">Click here</a>.</p>
     3    <p>
     4        <?php esc_html_e( 'This plugin allows you to disable email notifications when plugins, themes, or WordPress are updated. Additionally, you can choose specific plugins to hide update notifications or completely block WordPress core and theme updates.', 'disable-email-notification-for-auto-updates' ); ?>
     5    </p>
     6    <p>
     7        - <?php esc_html_e( 'For any queries, please write to us at', 'disable-email-notification-for-auto-updates' ); ?>
     8        <a href="mailto:[email protected]"><?php esc_html_e( '[email protected]', 'disable-email-notification-for-auto-updates' ); ?></a>.
     9        <br/>
     10        - <?php esc_html_e( 'To learn more about the plugin, tutorial, and other details:', 'disable-email-notification-for-auto-updates' ); ?>
     11        <a href="<?php echo esc_url( 'https://ideastocode.com/plugins/disable-email-notification-for-auto-updates' ); ?>" target="_blank">
     12            <?php esc_html_e( 'Click here', 'disable-email-notification-for-auto-updates' ); ?>
     13        </a>.
     14    </p>
    615</div>
    7 <a href="https://ideastocode.com" target="_blank">
    8     <img src="<?php echo ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL;?>/admin/img/ideasToCode.png" alt="ideasToCode" title="ideas To Code" class="itc_bottom_logo"/>
     16<a href="<?php echo esc_url( 'https://ideastocode.com' ); ?>" target="_blank">
     17    <img src="<?php echo esc_url( ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL . '/admin/img/ideasToCode.png' ); ?>"
     18         alt="<?php esc_attr_e( 'ideasToCode', 'disable-email-notification-for-auto-updates' ); ?>"
     19         title="<?php esc_attr_e( 'Ideas To Code', 'disable-email-notification-for-auto-updates' ); ?>"
     20         class="itc_bottom_logo"/>
    921</a>
  • disable-email-notification-for-auto-updates/trunk/admin/partials/_other_plugins.php

    r2583915 r3207597  
    1 <span class="itc_title_bold"> Here are some useful plugins from us; more to follow. </span>
     1<span class="itc_title_bold">
     2    <?php esc_html_e('Here are some useful plugins from us; more to follow.', 'disable-email-notification-for-auto-updates'); ?>
     3</span>
    24<ul class="itc_other_plugin_list clearfix">
    3     <li  class="itc_other_plugin_list_item">
     5    <li class="itc_other_plugin_list_item">
    46        <div>
    5         <a href="https://ideastocode.com/plugins/enable-svg-webp-ico-upload/" class="itc_other_plugin_title" target="_blank">
    6             <img src="<?php echo ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL;?>/admin/img/Enable-SVG-webP-and-ico.png" alt="enable-svg-webp-ico-upload" title="enable-svg-webp-ico-upload" class="itc_other_plugin_logo"/>
    7             <span >Easy SVG, WebP & ICO Upload</span>
    8         </a>
    9             <p>By default, WordPress does not allow uploading SVG, WebP & ICO (in some cases) images. This plugin will quickly enable you to upload all these images.</p>
    10             <a href="https://ideastocode.com/plugins/enable-svg-webp-ico-upload/" class="button button-primary itc_other_plugin_btn" target="_blank">Learn More</a>
     7            <a href="https://ideastocode.com/plugins/enable-svg-webp-ico-upload/" class="itc_other_plugin_title" target="_blank">
     8                <img
     9                    src="<?php echo esc_url( ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL ); ?>/admin/img/Enable-SVG-webP-and-ico.png"
     10                    alt="<?php esc_attr_e('enable-svg-webp-ico-upload', 'disable-email-notification-for-auto-updates'); ?>"
     11                    title="<?php esc_attr_e('enable-svg-webp-ico-upload', 'disable-email-notification-for-auto-updates'); ?>"
     12                    class="itc_other_plugin_logo"
     13                />
     14                <span><?php esc_html_e('Easy SVG, WebP & ICO Upload', 'disable-email-notification-for-auto-updates'); ?></span>
     15            </a>
     16            <p>
     17                <?php esc_html_e('By default, WordPress does not allow uploading SVG, WebP, & ICO (in some cases) images. This plugin will quickly enable you to upload all these images.', 'disable-email-notification-for-auto-updates'); ?>
     18            </p>
     19            <a href="https://ideastocode.com/plugins/enable-svg-webp-ico-upload/" class="button button-primary itc_other_plugin_btn" target="_blank">
     20                <?php esc_html_e('Learn More', 'disable-email-notification-for-auto-updates'); ?>
     21            </a>
    1122        </div>
    1223    </li>
  • disable-email-notification-for-auto-updates/trunk/admin/partials/_settings.php

    r2583915 r3207597  
    11<?php
    22$settings_slug_sanitized = $this->get_settings();
    3 $settings =  $this->get_option();
     3$settings = $this->get_option();
    44$default_setting_sanitized_plugin = esc_attr($settings['plugin']);
    55$default_setting_sanitized_themes = esc_attr($settings['themes']);
    66$default_setting_sanitized_wordpress = esc_attr($settings['wordpress']);
    7 
     7$default_setting_sanitized_wp_update_button = esc_attr($settings['wp_update_button']);
     8$default_setting_sanitized_wp_core = esc_attr($settings['wp_core']);
     9$default_setting_sanitized_wp_themes = esc_attr($settings['wp_themes']);
    810?>
    911
    1012<form action="options.php" method="post" class="options_form">
    11     <?php settings_errors( esc_attr($settings_slug_sanitized)."_option_group" );?>
    12     <?php settings_fields( esc_attr($settings_slug_sanitized) ."_option_group" );?>
    13     <div class="itc_bg itc_width_xs margin-t30">
    14         <table class="form-table itc_table">
    15         <tr valign="top">
    16                 <th scop="row" class="menu_tbl_heading">
    17                         <label for="<?php echo esc_attr($settings_slug_sanitized);?>[plugin]">
    18                             <span><?php _e( 'Disable Email Notification (Plugins)' ); ?></span>
    19                         </label>
    20                 </th>
    21                 <td>
    22                     <label class="form-switch">
    23                         <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized);?>[plugin]" name="<?php echo esc_attr($settings_slug_sanitized);?>[plugin]" value="1" <?php checked( 1, isset( $default_setting_sanitized_plugin ) && $default_setting_sanitized_plugin =="1"); ?>/>
    24                         <i></i>
    25                     </label>
    26                 </td>
    27             </tr>
    28             <tr valign="top">
    29                 <th scop="row" class="menu_tbl_heading">
    30                         <label for="<?php echo esc_attr($settings_slug_sanitized);?>[themes]">
    31                             <span><?php _e( 'Disable Email Notification (Themes)' ); ?></span>
    32                         </label>
    33                 </th>
    34                 <td>
    35                     <label class="form-switch">
    36                         <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized);?>[themes]" name="<?php echo esc_attr($settings_slug_sanitized);?>[themes]" value="1" <?php checked( 1, isset( $default_setting_sanitized_themes ) && $default_setting_sanitized_themes =="1"); ?>/>
    37                         <i></i>
    38                     </label>
    39                 </td>
    40             </tr>
    41             <tr valign="top">
    42                 <th scop="row" class="menu_tbl_heading">
    43                         <label for="<?php echo esc_attr($settings_slug_sanitized);?>[wordpress]">
    44                             <span><?php _e( 'Disable Email Notification (WordPress)' ); ?></span>
    45                         </label>
    46                 </th>
    47                 <td>
    48                     <label class="form-switch">
    49                         <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized);?>[wordpress]" name="<?php echo esc_attr($settings_slug_sanitized);?>[wordpress]" value="1" <?php checked( 1, isset( $default_setting_sanitized_wordpress ) && $default_setting_sanitized_wordpress =="1"); ?>/>
    50                         <i></i>
    51                     </label>
    52                 </td>
    53             </tr>
    54         </table>
    55     </div>
    56     <?php
    57     submit_button ( 'Save Changes', 'primary itc_btn_sm');
    58     ?>
     13    <?php settings_errors( esc_attr($settings_slug_sanitized) . "_option_group" ); ?>
     14    <?php settings_fields( esc_attr($settings_slug_sanitized) . "_option_group" ); ?>
     15    <div class="itc_bg itc_width_xs margin-t30">
     16        <table class="form-table itc_table">
     17            <tr valign="top">
     18                <th scope="row" class="menu_tbl_heading">
     19                    <label for="<?php echo esc_attr($settings_slug_sanitized); ?>[plugin]">
     20                        <span><?php esc_html_e('Disable Email Notification (Plugins)', 'disable-email-notification-for-auto-updates'); ?></span>
     21                    </label>
     22                </th>
     23                <td>
     24                    <label class="form-switch">
     25                        <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized); ?>[plugin]" name="<?php echo esc_attr($settings_slug_sanitized); ?>[plugin]" value="1" <?php checked( 1, isset($default_setting_sanitized_plugin) && $default_setting_sanitized_plugin == "1"); ?> />
     26                        <i></i>
     27                    </label>
     28                </td>
     29            </tr>
     30            <tr valign="top">
     31                <th scope="row" class="menu_tbl_heading">
     32                    <label for="<?php echo esc_attr($settings_slug_sanitized); ?>[themes]">
     33                        <span><?php esc_html_e('Disable Email Notification (Themes)', 'disable-email-notification-for-auto-updates'); ?></span>
     34                    </label>
     35                </th>
     36                <td>
     37                    <label class="form-switch">
     38                        <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized); ?>[themes]" name="<?php echo esc_attr($settings_slug_sanitized); ?>[themes]" value="1" <?php checked( 1, isset($default_setting_sanitized_themes) && $default_setting_sanitized_themes == "1"); ?> />
     39                        <i></i>
     40                    </label>
     41                </td>
     42            </tr>
     43            <tr valign="top">
     44                <th scope="row" class="menu_tbl_heading">
     45                    <label for="<?php echo esc_attr($settings_slug_sanitized); ?>[wordpress]">
     46                        <span><?php esc_html_e('Disable Email Notification (WordPress)', 'disable-email-notification-for-auto-updates'); ?></span>
     47                    </label>
     48                </th>
     49                <td>
     50                    <label class="form-switch">
     51                        <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized); ?>[wordpress]" name="<?php echo esc_attr($settings_slug_sanitized); ?>[wordpress]" value="1" <?php checked( 1, isset($default_setting_sanitized_wordpress) && $default_setting_sanitized_wordpress == "1"); ?> />
     52                        <i></i>
     53                    </label>
     54                </td>
     55            </tr>
     56        </table>
     57    </div>
     58    <div class="itc_bg itc_width_xs margin-t30">
     59        <table class="form-table itc_table">
     60            <tr valign="top">
     61                <th scope="row" class="menu_tbl_heading">
     62                    <label for="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_update_button]">
     63                        <span><?php esc_html_e('Remove Update Button (Dashboard)', 'disable-email-notification-for-auto-updates'); ?></span>
     64                    </label>
     65                </th>
     66                <td>
     67                    <label class="form-switch">
     68                        <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_update_button]" name="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_update_button]" value="1" <?php checked( 1, isset($default_setting_sanitized_wp_update_button) && $default_setting_sanitized_wp_update_button == "1"); ?> />
     69                        <i></i>
     70                    </label>
     71                </td>
     72            </tr>
     73            <tr valign="top">
     74                <th scope="row" class="menu_tbl_heading">
     75                    <label for="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_core]">
     76                        <span><?php esc_html_e('Block WordPress Core updates', 'disable-email-notification-for-auto-updates'); ?></span>
     77                    </label>
     78                </th>
     79                <td>
     80                    <label class="form-switch">
     81                        <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_core]" name="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_core]" value="1" <?php checked( 1, isset($default_setting_sanitized_wp_core) && $default_setting_sanitized_wp_core == "1"); ?> />
     82                        <i></i>
     83                    </label>
     84                </td>
     85            </tr>
     86            <tr valign="top">
     87                <th scope="row" class="menu_tbl_heading">
     88                    <label for="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_themes]">
     89                        <span><?php esc_html_e('Block WordPress Theme updates', 'disable-email-notification-for-auto-updates'); ?></span>
     90                    </label>
     91                </th>
     92                <td>
     93                    <label class="form-switch">
     94                        <input class="checkbox" type="checkbox" id="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_themes]" name="<?php echo esc_attr($settings_slug_sanitized); ?>[wp_themes]" value="1" <?php checked( 1, isset($default_setting_sanitized_wp_themes) && $default_setting_sanitized_wp_themes == "1"); ?> />
     95                        <i></i>
     96                    </label>
     97                </td>
     98            </tr>
     99        </table>
     100    </div>
     101    <?php
     102    submit_button( esc_html__('Save Changes', 'disable-email-notification-for-auto-updates'), 'primary itc_btn_sm' );
     103    ?>
    59104</form>
  • disable-email-notification-for-auto-updates/trunk/admin/partials/_youtube.php

    r3190499 r3207597  
    1 <span class="itc_title_bold"> Check out our YouTube Channel </span>
     1<span class="itc_title_bold"><?php esc_html_e('Check out our YouTube Channel', 'disable-email-notification-for-auto-updates'); ?></span>
    22<ul class="itc_other_plugin_list clearfix">
    3     <li  class="itc_other_plugin_list_item">
     3    <li class="itc_other_plugin_list_item">
    44        <div>
    5         <a href="https://www.youtube.com/channel/UC4yy1fz8qeEIy1ZiSqCTQ_A?sub_confirmation=1" class="itc_other_plugin_title" target="_blank">
    6             <img src="<?php echo ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL;?>/admin/img/youtube-plugin-logo.png" alt="LetsLearnWordPress YouTube" title="enable-svg-webp-ico-upload" class="itc_other_plugin_logo"/>
    7             <span >Let&#39;s Learn WordPress</span>
    8         </a>
    9             <p>Join Let&#39;s Learn WordPress to find valuable information, tips, and tricks on WordPress that can improve your website for free.</p>
    10             <a href="https://www.youtube.com/channel/UC4yy1fz8qeEIy1ZiSqCTQ_A?sub_confirmation=1" class="button button-primary itc_other_plugin_btn" target="_blank">Check Youtube</a>
     5            <a href="https://www.youtube.com/channel/UC4yy1fz8qeEIy1ZiSqCTQ_A?sub_confirmation=1" class="itc_other_plugin_title" target="_blank">
     6                <img src="<?php echo esc_url(ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL); ?>/admin/img/youtube-plugin-logo.png"
     7                     alt="<?php esc_attr_e('LetsLearnWordPress YouTube', 'disable-email-notification-for-auto-updates'); ?>"
     8                     title="<?php esc_attr_e('LetsLearnWordPress YouTube Channel', 'disable-email-notification-for-auto-updates'); ?>"
     9                     class="itc_other_plugin_logo"/>
     10                <span><?php esc_html_e("Let's Learn WordPress", 'disable-email-notification-for-auto-updates'); ?></span>
     11            </a>
     12            <p><?php esc_html_e("Join Let's Learn WordPress to find valuable information, tips, and tricks on WordPress that can improve your website for free.", 'disable-email-notification-for-auto-updates'); ?></p>
     13            <a href="https://www.youtube.com/channel/UC4yy1fz8qeEIy1ZiSqCTQ_A?sub_confirmation=1" class="button button-primary itc_other_plugin_btn" target="_blank"><?php esc_html_e('Check YouTube', 'disable-email-notification-for-auto-updates'); ?></a>
    1114        </div>
    1215    </li>
  • disable-email-notification-for-auto-updates/trunk/admin/partials/admin-display.php

    r3190499 r3207597  
    11<?php
    22$availableTabs = array(
    3     'settings' => 'Settings',
    4     'youtube' => 'YouTube',
    5     'other_plugins' => 'Other Plugins',
    6     'about' => 'About',
     3    'settings' => __('Settings', 'disable-email-notification-for-auto-updates'),
     4    'disable_plugin_updates' => __('Block Plugin Updates', 'disable-email-notification-for-auto-updates'),
     5    'youtube' => __('YouTube', 'disable-email-notification-for-auto-updates'),
     6    'other_plugins' => __('Other Plugins', 'disable-email-notification-for-auto-updates'),
     7    'about' => __('About', 'disable-email-notification-for-auto-updates'),
    78);
    8 $active_tab = "settings"; //default tab
     9$active_tab = __( 'settings', 'disable-email-notification-for-auto-updates' ); // default tab
    910$plugin_slug_name = $this->get_plugin_slug();
    1011
    11 if(isset($_GET['tab'])){
    12     $input_tab = sanitize_key($_GET['tab']);
    13     if(isset($input_tab) && in_array($input_tab, array_keys($availableTabs))) {
    14         $active_tab = $input_tab;
    15     }
     12if (isset($_GET['tab'])) {
     13    // Ensure the nonce is unslashed, sanitized and verified before processing the tab
     14    if (isset($_GET['_wpnonce'])) {
     15        $nonce = sanitize_text_field(wp_unslash($_GET['_wpnonce'])); // Unsashing and sanitizing the nonce
     16        if (wp_verify_nonce($nonce, 'nonce_idc_action')) {
     17            // Sanitize the 'tab' input
     18            $input_tab = sanitize_key($_GET['tab']);
     19            if (!empty($input_tab) && in_array($input_tab, array_keys($availableTabs))) {
     20                $active_tab = $input_tab;
     21            }
     22        } else {
     23            // Nonce is invalid, handle the error
     24            die('Nonce verification failed.');
     25        }
     26    }
    1627}
    1728?>
     
    1930<div class="wrap">
    2031
    21 <h1 id="itc_disable_update_notifications_title" data-purl="<?php echo ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL;?>"><?php echo esc_html( get_admin_page_title() ); ?>
    22 </h1>
     32<h1 id="wp_security_plugin_itc_title" data-purl="<?php echo esc_url( ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL ); ?>"><?php echo esc_html( get_admin_page_title() ); ?></h1>
    2333
    2434<nav class="nav-tab-wrapper wp-clearfix">
    25     <?php
    26     foreach ($availableTabs as $tabIndex => $tab) {?>
    27         <a href="?page=<?php echo esc_attr($plugin_slug_name);?>&tab=<?php echo $tabIndex;?>" class="nav-tab <?php echo $active_tab == $tabIndex ? 'nav-tab-active' : ''; ?>" title="<?php echo esc_attr($tab);?>"><?php echo esc_html($tab);?></a>
    28     <?php }?>
     35    <?php
     36    foreach ($availableTabs as $tabIndex => $tab) {
     37        // Escaping the $tabIndex when used in HTML attributes (like href and class)
     38    ?>
     39        <a href="?page=<?php echo esc_attr($plugin_slug_name); ?>&tab=<?php echo esc_attr($tabIndex); ?>&_wpnonce=<?php echo esc_attr(wp_create_nonce('nonce_idc_action')); ?>" class="nav-tab <?php echo esc_attr($active_tab == $tabIndex ? 'nav-tab-active' : ''); ?>" title="<?php echo esc_attr($tab); ?>"><?php echo esc_html($tab); ?></a>
     40    <?php } ?>
    2941</nav>
    3042
    3143<?php
    3244foreach ($availableTabs as $tabIndex => $tab) {
    33     if( $active_tab === $tabIndex ) {
    34         include_once '_'.$tabIndex.'.php';
    35     }
     45    if ($active_tab === $tabIndex) {
     46        include_once '_'.esc_attr($tabIndex).'.php';  // Ensure $tabIndex is escaped here as well
     47    }
    3648}
     49?>
     50</div>
  • disable-email-notification-for-auto-updates/trunk/includes/BaseController.php

    r3124796 r3207597  
    66
    77        function __construct() {
    8 
    98            $this->plugin_detail = array(
    10                 'name'      =>'itc_disable_update_notifications',
    11                 'title'     =>'Disable update Notifications',
    12                 'slug'      =>'itc-disable_update_notifications',
    13                 'version'   => ( defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION' ) ) ? ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION: '1.0.1',
    14                 'settings'  =>'itc_disable_update_notifications_settings',
     9                'name'      => 'itc_disable_update_notifications',
     10                'title'     => __( 'Disable Email Notifications and Block Plugin, WP Core, and Theme Updates', 'disable-email-notification-for-auto-updates' ),
     11                'slug'      => 'itc-disable_update_notifications',
     12                'version'   => ( defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION' ) ) ? ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION : '1.0.3',
     13                'settings'  => 'itc_disable_update_notifications_settings',
    1514            );
    1615        }
    1716
    1817        public function register_Module($plugin_name, $plugin_details){
    19             $plugins = get_option($this->plugin_name_parent);
     18            $plugins = get_option($this->plugin_name_parent, []);  // Default to an empty array if not set
    2019
    21             if($plugin_name!== "" && isset($plugins[$plugin_name])){
    22                 $finalModuleDetails = array_merge($plugins[$plugin_name], $plugin_details);
    23             }else{
    24                 $finalModuleDetails = $plugin_details;
    25             }
    26             $plugins[$plugin_name] = $finalModuleDetails;
    27             update_option($this->plugin_name_parent, $plugins);
    28         }
    29        
    30         public function unregister_Module($plugin_name){
    31             $plugins = get_option($this->plugin_name_parent);
    32             if($plugin_name!== "" && isset($plugins[$plugin_name])){
    33                 unset($plugins[$plugin_name]);
    34                 update_option($this->plugin_name_parent, $plugins);
    35             }
    36         }
    37        
    38         public function uninstall_Module($plugin_name){
    39             $this->unregister_Module($plugin_name);
    40             //ALSO IF WE WANT TO DEL ANY MODULE SETTINGS ADD HERE.
    41         }
    42        
    43         public function get_Module($plugin_name = ""){
    44             $plugins = get_option($this->plugin_name_parent);
    45             if($plugin_name!== "" && isset($plugins[$plugin_name])){
    46                 return $plugins[$plugin_name];
    47             }
    48             return [];
    49         }
     20            if($plugin_name !== "" && isset($plugins[$plugin_name])){
     21                $finalModuleDetails = array_merge($plugins[$plugin_name], $plugin_details);
     22            } else {
     23                $finalModuleDetails = $plugin_details;
     24            }
     25            $plugins[$plugin_name] = $finalModuleDetails;
     26            update_option($this->plugin_name_parent, $plugins);
     27        }
     28
     29        public function unregister_Module($plugin_name){
     30            $plugins = get_option($this->plugin_name_parent, []);  // Default to an empty array if not set
     31            if($plugin_name !== "" && isset($plugins[$plugin_name])){
     32                unset($plugins[$plugin_name]);
     33                update_option($this->plugin_name_parent, $plugins);
     34            }
     35        }
     36
     37        public function uninstall_Module($plugin_name){
     38            $this->unregister_Module($plugin_name);
     39            // Also, if we want to delete any module settings, add them here.
     40        }
     41
     42        public function get_Module($plugin_name = ""){
     43            $plugins = get_option($this->plugin_name_parent, []);  // Default to an empty array if not set
     44            if($plugin_name !== "" && isset($plugins[$plugin_name])){
     45                return $plugins[$plugin_name];
     46            }
     47            return [];
     48        }
    5049
    5150        public function get_plugin_detail() {
     
    7877        }
    7978
    80 
    8179        public function get_option_default($key=""){
    8280            $default = array(
    83                 "plugin"=>1,
    84                 "themes"=>1,
    85                 "wordpress"=>1,
     81                "plugin" => 1,
     82                "themes" => 1,
     83                "wordpress" => 1,
     84                "wp_update_button" => 0,
     85                "wp_core" => 0,
     86                "wp_themes" => 0,
    8687            );
    87             if($key!=="" && isset($default[$key])){
     88            if($key !== "" && isset($default[$key])){
    8889                $result = ($default[$key] == "1") ? 1 : 0;
    8990                return $result;
     
    9495        public function get_option($key=""){
    9596            $defaultSettings = $this->get_option_default();
    96             $settings = get_option($this->get_settings(), $defaultSettings);
     97            $settings = get_option($this->get_settings(), $defaultSettings);  // Ensure it's always an array
    9798            if(isset($settings[$key])){
    9899                return $settings[$key];
     
    100101            return $settings;
    101102        }
    102        
    103         //This is to display msg after plugin activation.
     103
     104        // This is to display a message after plugin activation.
    104105        public function set_transient(){
    105             $notice_dismiss_index = $this->get_settings()."_notice_dismiss";
    106             set_transient( $notice_dismiss_index, true, 5 ); //This is for notice to show only once the plugin is activated.
     106            $notice_dismiss_index = $this->get_settings() . "_notice_dismiss";
     107            set_transient( $notice_dismiss_index, true, 5 ); // Notice will show only once after plugin activation.
    107108        }
     109
    108110        public function get_transient(){
    109             $notice_dismiss_index = $this->get_settings()."_notice_dismiss";
     111            $notice_dismiss_index = $this->get_settings() . "_notice_dismiss";
    110112            return get_transient( $notice_dismiss_index );
    111113        }
     114
    112115        public function remove_transient(){
    113             $notice_dismiss_index = $this->get_settings()."_notice_dismiss";
     116            $notice_dismiss_index = $this->get_settings() . "_notice_dismiss";
    114117            delete_transient( $notice_dismiss_index );
    115118        }
  • disable-email-notification-for-auto-updates/trunk/includes/class-itc.php

    r2583915 r3207597  
    5252    private function define_common_hooks() {
    5353        $settings = $this->get_option();
    54         // for plugin
    55         if(isset($settings['plugin']) && $settings['plugin'] === 1){
    56             /*Disable plugin udpates notification */
    57             add_filter('auto_plugin_update_send_email', '__return_false');
    58         }
    59        
    60         // for themes
    61         if(isset($settings['themes']) && $settings['themes'] === 1){
    62             /*Disable theme udpates notification */
    63             add_filter('auto_theme_update_send_email', '__return_false');
     54
     55        if ( isset( $settings['plugin'] ) && $settings['plugin'] === 1 ) {
     56            add_filter( 'auto_plugin_update_send_email', '__return_false' );
    6457        }
    6558
    66         // for ico
    67         if(isset($settings['wordpress']) && $settings['wordpress'] === 1){
     59        if ( isset( $settings['themes'] ) && $settings['themes'] === 1 ) {
     60            add_filter( 'auto_theme_update_send_email', '__return_false' );
     61        }
     62
     63        if ( isset( $settings['wordpress'] ) && $settings['wordpress'] === 1 ) {
    6864            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordpress.php';
    6965            $plugin_obj = new ITC_Disable_Update_Notifications_Wordpress();
    7066            $this->loader->add_filter( 'auto_core_update_send_email', $plugin_obj, 'wp_updates_email', 10, 4 );
     67        }
     68               
     69         // Remove updates button
     70        if ( isset( $settings['wp_update_button'] ) && $settings['wp_update_button'] === 1 ) {
     71            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-remove-updates-button.php';
     72            $plugin_wp_update_button = new ITC_Disable_Update_Notifications_WP_Update_Button();
     73            $this->loader->add_action( 'admin_menu', $plugin_wp_update_button, 'remove_update_menu_itc', 102 );
     74        }
     75
     76        // Remove WordPress Core Updates
     77        if ( isset( $settings['wp_core'] ) && $settings['wp_core'] === 1 ) {
     78            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-disable-wp-core-updates.php';
     79            $plugin_wp_core = new ITC_Disable_Update_Notifications_WP_Core();
     80            $this->loader->add_action( 'init', $plugin_wp_core, 'wp_core_updates_itc', 1 );
     81            $this->loader->add_filter( 'pre_site_transient_update_core', $plugin_wp_core, 'disable_wp_core_last_checked_itc' );
     82            $this->loader->add_filter( 'site_status_tests', $plugin_wp_core, 'wp_health_check_tests_itc' );
     83}
     84
     85        // Remove WordPress theme Updates
     86        if ( isset( $settings['wp_themes'] ) && $settings['wp_themes'] === 1 ) {
     87            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-disable-theme-updates.php';
     88            $plugin_wp_themes = new ITC_Disable_Update_Notifications_WP_Themes();
     89            $this->loader->add_filter( 'pre_site_transient_update_themes', $plugin_wp_themes, 'disable_theme_last_checked_itc' );
     90            $this->loader->add_filter( 'site_status_tests', $plugin_wp_themes, 'theme_health_check_tests_itc' );
     91            $this->loader->add_action( 'init', $plugin_wp_themes, 'wp_theme_updates_itc', 1 );
     92        }
     93       
     94        // for block plugin updates
     95        $disable_plugin_updates_settings = get_option( $this->get_settings() . '_disable_plugin_updates' );
     96        if ( ! empty( $disable_plugin_updates_settings ) ) {
     97            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-disable-plugin-updates.php';
     98            $plugin_update_manager = new ITC_Disable_Update_Notifications_Wordpress_Plugin( $disable_plugin_updates_settings );
     99            add_filter( 'site_transient_update_plugins', [ $plugin_update_manager, 'disable_plugin_updates_itc' ] );
     100            add_filter( 'auto_update_plugin', [ $plugin_update_manager, 'filter_plugin_auto_update_itc' ], 10, 2 );
    71101        }
    72102    }
  • disable-email-notification-for-auto-updates/trunk/itc-disable-email-notification.php

    r3190499 r3207597  
    44 * @link              https://ideastocode.com
    55 * @since             1.0.1
    6  * @package           Disable Email Notification for auto-updates
     6 * @package           Disable Auto Update Emails and Block Updates for Plugins, WP Core, and Themes
    77 *
    88 * @wordpress-plugin
    9  * Plugin Name:       Disable Email Notification for auto-updates
     9 * Plugin Name:       Disable Auto Update Emails and Block Updates for Plugins, WP Core, and Themes
    1010 * Plugin URI:        https://ideastocode.com/plugins/disable-automatic-update-email-notification-in-wordpress/
    11  * Description:       This plugin will disable email notifications that WordPress sends, after an auto-update of plugins, themes, or WordPress.
    12  * Version:           1.0.2
     11 * Description:       Key Features: Disable Auto-Update Emails, Block Specific Plugins, Core, or Theme Updates.
     12 * Version:           1.0.3
    1313 * Author:            ideasToCode
    1414 * Author URI:        http://ideastocode.com/
    1515 * License:           GPL-2.0+
    1616 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    17  * Text Domain:       disable-automatic-update-email-notification-in-wordpress
     17 * Text Domain:       disable-email-notification-for-auto-updates
    1818 * Domain Path:       /languages
    1919 */
     
    2424}
    2525
    26 define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION', '1.0.2' );
     26define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION', '1.0.3' );
    2727if ( ! defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_BASENAME' ) ) {
    2828    define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_BASENAME', plugin_basename( __FILE__ ) );
     
    3636
    3737require_once ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_PATH . 'includes/BaseController.php';
     38
     39function disable_email_notification_for_auto_updates_itc() {
     40    load_plugin_textdomain( 'disable-email-notification-for-auto-updates', false, plugin_dir_path( __FILE__ ) . 'languages' );
     41}
     42add_action( 'plugins_loaded', 'disable_email_notification_for_auto_updates_itc' );
     43
    3844
    3945function activate_itc_disable_update_notifications() {
Note: See TracChangeset for help on using the changeset viewer.