Plugin Directory

Changeset 3207812


Ignore:
Timestamp:
12/13/2024 10:21:07 PM (12 months ago)
Author:
ideastocode
Message:

Minor Updates

Location:
disable-email-notification-for-auto-updates
Files:
43 added
10 edited

Legend:

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

    r3207597 r3207812  
    55Requires at least: 5.5
    66Tested up to: 6.7
    7 Stable tag:   1.0.3
     7Stable tag:   1.0.4
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    1111
    1212This plugin disables email notifications for auto-updates and blocks updates for specific plugins, WordPress core, and themes.
     13
     14== Description ==
     15
     16Key Features:
    1317- Disable Email Notifications for Auto-Updates
    1418- Block Specific Plugin Updates: You can choose plugins to block
    1519- Block WordPress Core and Theme Updates
    1620- Remove Update Buttons from Admin Panel (under Dashboard menu)
    17 
    18 == Description ==
    1921
    2022**Disable Email Notifications for Auto-Updates:**
     
    3335By default, only the email notification feature is turned on; other settings must be configured manually.
    3436
    35 **Tutorial video**
     37**Tutorial video (Old Features, New Video Coming Soon)**
    3638
    3739https://www.youtube.com/watch?v=lno6bmiWbFs
     
    6365Yes, you can use this plugin with any theme. We have tried with popular themes such as Enfold, Avada, Elementor page builders, Astra, Divi, etc and it works perfectly great.
    6466
     67= Why are some plugin updates not hidden? =
     68
     69This plugin uses the default WordPress filter to block plugin updates. However, some premium plugins use their own APIs, which may bypass the default WordPress mechanisms. As a result, the code only blocks updates for plugins that follow the default WordPress update system. To mitigate this, we've added CSS and fallback JavaScript to hide the update notifications as much as possible. However, you may still notice some extra space due to these hidden notifications.
     70
    6571= Will Disable email Notification for auto-updates plugin stops plugin, themes or WordPress updates?   =
    6672
     
    7783== Changelog ==
    7884
     85= 1.0.4 =
     86* Minor updates and added FAQs
     87
    7988= 1.0.3 =
    8089* Features added: Block specific plugin updates and Block WordPress or theme updates.
     
    9099
    91100== Upgrade Notice ==
    92 Please update to the latest version 1.0.2
     101Please update to the latest version 1.0.4
  • disable-email-notification-for-auto-updates/trunk/admin/class-admin.php

    r3207597 r3207812  
    2727    public function itc_disable_update_notifications_action_links( $links ) {
    2828        $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>';
     29        $links1 = '<a href="https://buymeacoffee.com/ideastocode" target="_blank" style="font-weight:bold;">' . esc_html__( 'Donate', 'disable-email-notification-for-auto-updates' ) . '</a>';
     30        $links2 = '<a href="' . esc_url( menu_page_url( $plugin_slug_name, false ) ) . '">' . esc_html__( 'Settings', 'disable-email-notification-for-auto-updates' ) . '</a>';
    3131        array_unshift( $links, $links1, $links2 );
    3232        return $links;
     
    118118            <div class="notice-content">
    119119                <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' ); ?>
     120                    <strong><?php esc_html_e( 'New Features Added: ', 'disable-email-notification-for-auto-updates' ); ?></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.', 'disable-email-notification-for-auto-updates' ); ?>
    122122                </p>
    123123                <div class="notice-buttons">
    124124                    <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' ); ?>
     125                        <?php esc_html_e( 'Check Features', 'disable-email-notification-for-auto-updates' ); ?>
    126126                    </a>
    127127                    <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' ); ?>
     128                        <?php esc_html_e( 'Dismiss Notice', 'disable-email-notification-for-auto-updates' ); ?>
    129129                    </a>
    130130                </div>
  • disable-email-notification-for-auto-updates/trunk/admin/partials/_disable_plugin_updates.php

    r3207597 r3207812  
    1414                <?php
    1515                $plugin_key = $plugin_file; // Use plugin file as key
     16                $plugin_slug = dirname( $plugin_file ); // Get plugin slug
     17                $plugin_id = $plugin_slug; 
    1618                ?>
    17                 <tr valign="top">
     19                <tr valign="top" id="<?php echo esc_attr( $plugin_id ); ?>">
    1820                    <th scope="row" class="menu_tbl_heading">
    1921                        <label for="<?php echo esc_attr( $settings_slug_sanitized . "[" . $plugin_key . "]" ); ?>">
     
    2729                        </label>
    2830                    </td>
     31                    <td>
     32                     </td>
    2933                </tr>
    3034            <?php endforeach; ?>
  • disable-email-notification-for-auto-updates/trunk/admin/partials/_settings.php

    r3207597 r3207812  
    103103    ?>
    104104</form>
     105
     106<tr valign="top">
     107    <th scope="row" class="menu_tbl_heading">
     108        <span class="itc_title_bold"><?php esc_html_e('IMPORTANT!', 'disable-email-notification-for-auto-updates'); ?></span>
     109        <span><?php esc_html_e('- IT IS NOT RECOMMENDED TO DISABLE WORDPRESS CORE UPDATES, OR EVEN THEME AND PLUGIN UPDATES. ALWAYS KEEP THEM UPDATED FOR SECURITY REASONS.', 'disable-email-notification-for-auto-updates'); ?></span>
     110        <br><span><?php esc_html_e('- ALWAYS KEEP THEM UPDATED FOR SECURITY REASONS.', 'disable-email-notification-for-auto-updates'); ?></span>
     111    </th>
     112</tr>
  • disable-email-notification-for-auto-updates/trunk/includes/BaseController.php

    r3207597 r3207812  
    1010                'title'     => __( 'Disable Email Notifications and Block Plugin, WP Core, and Theme Updates', 'disable-email-notification-for-auto-updates' ),
    1111                'slug'      => 'itc-disable_update_notifications',
    12                 'version'   => ( defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION' ) ) ? ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION : '1.0.3',
     12                'version'   => ( defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION' ) ) ? ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION : '1.0.4',
    1313                'settings'  => 'itc_disable_update_notifications_settings',
    1414            );
  • disable-email-notification-for-auto-updates/trunk/includes/class-disable-plugin-updates.php

    r3207597 r3207812  
    55    public function __construct( $settings ) {
    66        $this->settings = $settings;
     7
    78    }
    89
     10 // Add custom CSS and JS
     11public function add_custom_css_js_hide_plugins_itc() {
     12    if ( ! empty( $this->settings ) ) {
     13        echo '<style>';
     14        foreach ( $this->settings as $plugin_key => $enabled ) {
     15            if ( $enabled ) { // Only inject CSS if the plugin is enabled
     16               
     17                $plugin_slug = dirname( $plugin_key );
     18
     19                // Output CSS
     20               echo '#' . esc_attr( $plugin_slug ) . '-update .update-message.notice.inline.notice-warning.notice-alt { visibility: hidden!important; }';
     21
     22            }
     23        }
     24        echo '</style>';
     25
     26        // Add JavaScript fallback
     27        echo '<script>
     28            document.addEventListener("DOMContentLoaded", function() {';
     29        foreach ( $this->settings as $plugin_key => $enabled ) {
     30            if ( $enabled ) {
     31                // Generate the plugin ID
     32                $plugin_slug = dirname( $plugin_key );
     33
     34                // Output JavaScript to hide the notice for this plugin
     35                echo '
     36                var notice = document.querySelector("#' . esc_js( $plugin_slug ) . '-update .update-message.notice.inline.notice-warning.notice-alt");
     37                if (notice) {
     38                    notice.style.visibility = "hidden";
     39                }';
     40            }
     41        }
     42        echo '});
     43        </script>';
     44    }
     45}
     46
     47    // Disable plugin updates by removing the response for the selected plugins
    948    public function disable_plugin_updates_itc( $value ) {
    1049        if ( $this->settings ) {
     
    1857    }
    1958
     59    // Disable auto-updates for the selected plugins
    2060    public function filter_plugin_auto_update_itc( $update, $item ) {
    2161        $plugin_key = $item->plugin;
  • disable-email-notification-for-auto-updates/trunk/includes/class-itc.php

    r3207597 r3207812  
    9999            add_filter( 'site_transient_update_plugins', [ $plugin_update_manager, 'disable_plugin_updates_itc' ] );
    100100            add_filter( 'auto_update_plugin', [ $plugin_update_manager, 'filter_plugin_auto_update_itc' ], 10, 2 );
     101            add_action( 'admin_head', [ $plugin_update_manager, 'add_custom_css_js_hide_plugins_itc' ] );
     102   
    101103        }
    102104    }
  • disable-email-notification-for-auto-updates/trunk/itc-disable-email-notification.php

    r3207597 r3207812  
    1010 * Plugin URI:        https://ideastocode.com/plugins/disable-automatic-update-email-notification-in-wordpress/
    1111 * Description:       Key Features: Disable Auto-Update Emails, Block Specific Plugins, Core, or Theme Updates.
    12  * Version:           1.0.3
     12 * Version:           1.0.4
    1313 * Author:            ideasToCode
    1414 * Author URI:        http://ideastocode.com/
     
    2424}
    2525
    26 define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION', '1.0.3' );
     26define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION', '1.0.4' );
    2727if ( ! defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_BASENAME' ) ) {
    2828    define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_BASENAME', plugin_basename( __FILE__ ) );
  • disable-email-notification-for-auto-updates/trunk/languages/disable-email-notification-for-auto-updates-en_US.po

    r3207597 r3207812  
    22msgstr ""
    33"Project-Id-Version: disable-email-notification-for-auto-updates-v1.0.3\n"
    4 "POT-Creation-Date: 2024-12-13 17:35+0545\n"
    5 "PO-Revision-Date: 2024-12-13 17:36+0545\n"
     4"POT-Creation-Date: 2024-12-14 03:56+0545\n"
     5"PO-Revision-Date: 2024-12-14 03:57+0545\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    2424msgstr ""
    2525
    26 #: admin/class-admin.php:118
     26#: admin/class-admin.php:120
    2727msgid "New Features Added: "
    2828msgstr ""
    2929
    30 #: admin/class-admin.php:119
     30#: admin/class-admin.php:121
    3131msgid ""
    3232" Block specific plugin updates, block WordPress core and theme updates, or "
     
    3434msgstr ""
    3535
    36 #: admin/class-admin.php:123
     36#: admin/class-admin.php:125
    3737msgid "Check Features"
    3838msgstr ""
    3939
    40 #: admin/class-admin.php:126
     40#: admin/class-admin.php:128
    4141msgid "Dismiss Notice"
    4242msgstr ""
     
    7878msgstr ""
    7979
    80 #: admin/partials/_disable_plugin_updates.php:19
    81 #: admin/partials/_disable_plugin_updates.php:25
     80#: admin/partials/_disable_plugin_updates.php:21
     81#: admin/partials/_disable_plugin_updates.php:27
    8282msgid "["
    8383msgstr ""
    8484
    85 #: admin/partials/_disable_plugin_updates.php:34
     85#: admin/partials/_disable_plugin_updates.php:38
    8686#: admin/partials/_settings.php:102
    8787msgid "Save Changes"
     
    135135msgstr ""
    136136
     137#: admin/partials/_settings.php:108
     138msgid "IMPORTANT!"
     139msgstr ""
     140
     141#: admin/partials/_settings.php:109
     142msgid ""
     143"- IT IS NOT RECOMMENDED TO DISABLE WORDPRESS CORE UPDATES, OR EVEN THEME AND "
     144"PLUGIN UPDATES. ALWAYS KEEP THEM UPDATED FOR SECURITY REASONS."
     145msgstr ""
     146
     147#: admin/partials/_settings.php:110
     148msgid "- ALWAYS KEEP THEM UPDATED FOR SECURITY REASONS."
     149msgstr ""
     150
    137151#: admin/partials/_youtube.php:1
    138152msgid "Check out our YouTube Channel"
     
    185199msgstr ""
    186200
    187 #: includes/BaseController.php:11
     201#: includes/BaseController.php:10
    188202msgid ""
    189203"Disable Email Notifications and Block Plugin, WP Core, and Theme Updates"
Note: See TracChangeset for help on using the changeset viewer.