Changeset 3207812
- Timestamp:
- 12/13/2024 10:21:07 PM (12 months ago)
- Location:
- disable-email-notification-for-auto-updates
- Files:
-
- 43 added
- 10 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/LICENSE.txt (added)
-
tags/1.0.4/README.txt (added)
-
tags/1.0.4/admin (added)
-
tags/1.0.4/admin/class-admin.php (added)
-
tags/1.0.4/admin/css (added)
-
tags/1.0.4/admin/css/itc-admin.css (added)
-
tags/1.0.4/admin/img (added)
-
tags/1.0.4/admin/img/Enable-SVG-webP-and-ico.png (added)
-
tags/1.0.4/admin/img/ideasToCode.png (added)
-
tags/1.0.4/admin/img/youtube-plugin-logo.png (added)
-
tags/1.0.4/admin/index.php (added)
-
tags/1.0.4/admin/js (added)
-
tags/1.0.4/admin/js/itc-admin.js (added)
-
tags/1.0.4/admin/partials (added)
-
tags/1.0.4/admin/partials/_about.php (added)
-
tags/1.0.4/admin/partials/_disable_plugin_updates.php (added)
-
tags/1.0.4/admin/partials/_other_plugins.php (added)
-
tags/1.0.4/admin/partials/_settings.php (added)
-
tags/1.0.4/admin/partials/_youtube.php (added)
-
tags/1.0.4/admin/partials/admin-display.php (added)
-
tags/1.0.4/includes (added)
-
tags/1.0.4/includes/BaseController.php (added)
-
tags/1.0.4/includes/class-activator.php (added)
-
tags/1.0.4/includes/class-deactivator.php (added)
-
tags/1.0.4/includes/class-disable-plugin-updates.php (added)
-
tags/1.0.4/includes/class-disable-theme-updates.php (added)
-
tags/1.0.4/includes/class-disable-wp-core-updates.php (added)
-
tags/1.0.4/includes/class-i18n.php (added)
-
tags/1.0.4/includes/class-itc.php (added)
-
tags/1.0.4/includes/class-loader.php (added)
-
tags/1.0.4/includes/class-remove-updates-button.php (added)
-
tags/1.0.4/includes/class-wordpress.php (added)
-
tags/1.0.4/includes/index.php (added)
-
tags/1.0.4/index.php (added)
-
tags/1.0.4/itc-disable-email-notification.php (added)
-
tags/1.0.4/languages (added)
-
tags/1.0.4/languages/disable-email-notification-for-auto-updates-en_US.mo (added)
-
tags/1.0.4/languages/disable-email-notification-for-auto-updates-en_US.po (added)
-
tags/1.0.4/public (added)
-
tags/1.0.4/public/class-public.php (added)
-
tags/1.0.4/public/index.php (added)
-
tags/1.0.4/uninstall.php (added)
-
trunk/README.txt (modified) (6 diffs)
-
trunk/admin/class-admin.php (modified) (2 diffs)
-
trunk/admin/partials/_disable_plugin_updates.php (modified) (2 diffs)
-
trunk/admin/partials/_settings.php (modified) (1 diff)
-
trunk/includes/BaseController.php (modified) (1 diff)
-
trunk/includes/class-disable-plugin-updates.php (modified) (2 diffs)
-
trunk/includes/class-itc.php (modified) (1 diff)
-
trunk/itc-disable-email-notification.php (modified) (2 diffs)
-
trunk/languages/disable-email-notification-for-auto-updates-en_US.mo (modified) (previous)
-
trunk/languages/disable-email-notification-for-auto-updates-en_US.po (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
disable-email-notification-for-auto-updates/trunk/README.txt
r3207597 r3207812 5 5 Requires at least: 5.5 6 6 Tested up to: 6.7 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 11 11 12 12 This plugin disables email notifications for auto-updates and blocks updates for specific plugins, WordPress core, and themes. 13 14 == Description == 15 16 Key Features: 13 17 - Disable Email Notifications for Auto-Updates 14 18 - Block Specific Plugin Updates: You can choose plugins to block 15 19 - Block WordPress Core and Theme Updates 16 20 - Remove Update Buttons from Admin Panel (under Dashboard menu) 17 18 == Description ==19 21 20 22 **Disable Email Notifications for Auto-Updates:** … … 33 35 By default, only the email notification feature is turned on; other settings must be configured manually. 34 36 35 **Tutorial video **37 **Tutorial video (Old Features, New Video Coming Soon)** 36 38 37 39 https://www.youtube.com/watch?v=lno6bmiWbFs … … 63 65 Yes, 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. 64 66 67 = Why are some plugin updates not hidden? = 68 69 This 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 65 71 = Will Disable email Notification for auto-updates plugin stops plugin, themes or WordPress updates? = 66 72 … … 77 83 == Changelog == 78 84 85 = 1.0.4 = 86 * Minor updates and added FAQs 87 79 88 = 1.0.3 = 80 89 * Features added: Block specific plugin updates and Block WordPress or theme updates. … … 90 99 91 100 == Upgrade Notice == 92 Please update to the latest version 1.0. 2101 Please update to the latest version 1.0.4 -
disable-email-notification-for-auto-updates/trunk/admin/class-admin.php
r3207597 r3207812 27 27 public function itc_disable_update_notifications_action_links( $links ) { 28 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>';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>'; 31 31 array_unshift( $links, $links1, $links2 ); 32 32 return $links; … … 118 118 <div class="notice-content"> 119 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' ); ?>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' ); ?> 122 122 </p> 123 123 <div class="notice-buttons"> 124 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' ); ?>125 <?php esc_html_e( 'Check Features', 'disable-email-notification-for-auto-updates' ); ?> 126 126 </a> 127 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' ); ?>128 <?php esc_html_e( 'Dismiss Notice', 'disable-email-notification-for-auto-updates' ); ?> 129 129 </a> 130 130 </div> -
disable-email-notification-for-auto-updates/trunk/admin/partials/_disable_plugin_updates.php
r3207597 r3207812 14 14 <?php 15 15 $plugin_key = $plugin_file; // Use plugin file as key 16 $plugin_slug = dirname( $plugin_file ); // Get plugin slug 17 $plugin_id = $plugin_slug; 16 18 ?> 17 <tr valign="top" >19 <tr valign="top" id="<?php echo esc_attr( $plugin_id ); ?>"> 18 20 <th scope="row" class="menu_tbl_heading"> 19 21 <label for="<?php echo esc_attr( $settings_slug_sanitized . "[" . $plugin_key . "]" ); ?>"> … … 27 29 </label> 28 30 </td> 31 <td> 32 </td> 29 33 </tr> 30 34 <?php endforeach; ?> -
disable-email-notification-for-auto-updates/trunk/admin/partials/_settings.php
r3207597 r3207812 103 103 ?> 104 104 </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 10 10 'title' => __( 'Disable Email Notifications and Block Plugin, WP Core, and Theme Updates', 'disable-email-notification-for-auto-updates' ), 11 11 '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', 13 13 'settings' => 'itc_disable_update_notifications_settings', 14 14 ); -
disable-email-notification-for-auto-updates/trunk/includes/class-disable-plugin-updates.php
r3207597 r3207812 5 5 public function __construct( $settings ) { 6 6 $this->settings = $settings; 7 7 8 } 8 9 10 // Add custom CSS and JS 11 public 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 9 48 public function disable_plugin_updates_itc( $value ) { 10 49 if ( $this->settings ) { … … 18 57 } 19 58 59 // Disable auto-updates for the selected plugins 20 60 public function filter_plugin_auto_update_itc( $update, $item ) { 21 61 $plugin_key = $item->plugin; -
disable-email-notification-for-auto-updates/trunk/includes/class-itc.php
r3207597 r3207812 99 99 add_filter( 'site_transient_update_plugins', [ $plugin_update_manager, 'disable_plugin_updates_itc' ] ); 100 100 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 101 103 } 102 104 } -
disable-email-notification-for-auto-updates/trunk/itc-disable-email-notification.php
r3207597 r3207812 10 10 * Plugin URI: https://ideastocode.com/plugins/disable-automatic-update-email-notification-in-wordpress/ 11 11 * Description: Key Features: Disable Auto-Update Emails, Block Specific Plugins, Core, or Theme Updates. 12 * Version: 1.0. 312 * Version: 1.0.4 13 13 * Author: ideasToCode 14 14 * Author URI: http://ideastocode.com/ … … 24 24 } 25 25 26 define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION', '1.0. 3' );26 define( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_VERSION', '1.0.4' ); 27 27 if ( ! defined( 'ITC_DISABLE_UPDATE_NOTIFICATIONS_BASENAME' ) ) { 28 28 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 2 2 msgstr "" 3 3 "Project-Id-Version: disable-email-notification-for-auto-updates-v1.0.3\n" 4 "POT-Creation-Date: 2024-12-1 3 17:35+0545\n"5 "PO-Revision-Date: 2024-12-1 3 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" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 24 24 msgstr "" 25 25 26 #: admin/class-admin.php:1 1826 #: admin/class-admin.php:120 27 27 msgid "New Features Added: " 28 28 msgstr "" 29 29 30 #: admin/class-admin.php:1 1930 #: admin/class-admin.php:121 31 31 msgid "" 32 32 " Block specific plugin updates, block WordPress core and theme updates, or " … … 34 34 msgstr "" 35 35 36 #: admin/class-admin.php:12 336 #: admin/class-admin.php:125 37 37 msgid "Check Features" 38 38 msgstr "" 39 39 40 #: admin/class-admin.php:12 640 #: admin/class-admin.php:128 41 41 msgid "Dismiss Notice" 42 42 msgstr "" … … 78 78 msgstr "" 79 79 80 #: admin/partials/_disable_plugin_updates.php: 1981 #: admin/partials/_disable_plugin_updates.php:2 580 #: admin/partials/_disable_plugin_updates.php:21 81 #: admin/partials/_disable_plugin_updates.php:27 82 82 msgid "[" 83 83 msgstr "" 84 84 85 #: admin/partials/_disable_plugin_updates.php:3 485 #: admin/partials/_disable_plugin_updates.php:38 86 86 #: admin/partials/_settings.php:102 87 87 msgid "Save Changes" … … 135 135 msgstr "" 136 136 137 #: admin/partials/_settings.php:108 138 msgid "IMPORTANT!" 139 msgstr "" 140 141 #: admin/partials/_settings.php:109 142 msgid "" 143 "- IT IS NOT RECOMMENDED TO DISABLE WORDPRESS CORE UPDATES, OR EVEN THEME AND " 144 "PLUGIN UPDATES. ALWAYS KEEP THEM UPDATED FOR SECURITY REASONS." 145 msgstr "" 146 147 #: admin/partials/_settings.php:110 148 msgid "- ALWAYS KEEP THEM UPDATED FOR SECURITY REASONS." 149 msgstr "" 150 137 151 #: admin/partials/_youtube.php:1 138 152 msgid "Check out our YouTube Channel" … … 185 199 msgstr "" 186 200 187 #: includes/BaseController.php:1 1201 #: includes/BaseController.php:10 188 202 msgid "" 189 203 "Disable Email Notifications and Block Plugin, WP Core, and Theme Updates"
Note: See TracChangeset
for help on using the changeset viewer.