Changeset 3347666
- Timestamp:
- 08/20/2025 04:43:09 PM (4 months ago)
- Location:
- really-simple-disable-comments
- Files:
-
- 6 edited
- 1 copied
-
tags/0.2.0 (copied) (copied from really-simple-disable-comments/trunk)
-
tags/0.2.0/README.md (modified) (2 diffs)
-
tags/0.2.0/readme.txt (modified) (4 diffs)
-
tags/0.2.0/really-simple-disable-comments.php (modified) (4 diffs)
-
trunk/README.md (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/really-simple-disable-comments.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
really-simple-disable-comments/tags/0.2.0/README.md
r3221758 r3347666 17 17 * Disables trackbacks and pingbacks 18 18 * Removes comment-related admin menu items and dashboard widgets 19 * Hides comment counts from dashboard "At a Glance" widget 20 * Hides "Recent Comments" section from dashboard Activity widget 19 21 * Disables all comment-related Gutenberg blocks 20 22 * Clean and efficient code with no settings required … … 61 63 ## Changelog 62 64 63 ### 0.1.0 64 * Initial release 65 See [CHANGELOG.md](CHANGELOG.md) for detailed version history and release notes. 65 66 66 67 ## License -
really-simple-disable-comments/tags/0.2.0/readme.txt
r3323837 r3347666 3 3 Tags: comments, disable comments, disable trackbacks, disable pingbacks 4 4 Tested up to: 6.8 5 Stable tag: 0. 1.05 Stable tag: 0.2.0 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 19 19 * Disables trackbacks and pingbacks 20 20 * Removes comment-related admin menu items and dashboard widgets 21 * Hides comment counts from dashboard "At a Glance" widget 22 * Hides "Recent Comments" section from dashboard Activity widget 21 23 * Disables all comment-related Gutenberg blocks 22 24 * Clean and efficient code with no settings required … … 63 65 == Changelog == 64 66 67 = 0.2.0 = 68 * Added hiding of comment counts from "At a Glance" dashboard widget 69 * Added hiding of "Recent Comments" section from Activity dashboard widget 70 65 71 = 0.1.0 = 66 72 * Initial release … … 68 74 == Upgrade Notice == 69 75 76 = 0.2.0 = 77 Enhanced dashboard functionality - now hides comment counts and recent comments from dashboard widgets. 78 70 79 = 0.1.0 = 71 80 Initial release of Really Simple Disable Comments -
really-simple-disable-comments/tags/0.2.0/really-simple-disable-comments.php
r3323837 r3347666 4 4 * Plugin URI: https://github.com/nextfly/really-simple-disable-comments 5 5 * Description: Effortlessly disable all comments and trackback functionality across your entire WordPress site by activating this plugin. 6 * Version: 0. 1.06 * Version: 0.2.0 7 7 * Author: NEXTFLY® Web Design 8 8 * Author URI: https://www.nextflywebdesign.com/ … … 29 29 // Define the plugin version. 30 30 if (!defined('RSDC_VERSION')) { 31 define('RSDC_VERSION', '0. 1.0');31 define('RSDC_VERSION', '0.2.0'); 32 32 } 33 33 … … 98 98 add_action('admin_init', array( $this, 'disable_comments_dashboard' )); 99 99 add_action('wp_before_admin_bar_render', array( $this, 'disable_comments_admin_bar' )); 100 add_action('admin_head', array( $this, 'disable_comments_dashboard_css' )); 101 add_filter('the_comments', array( $this, 'disable_dashboard_recent_comments' ), 10, 2); 100 102 101 103 // Frontend UI. … … 198 200 global $wp_admin_bar; 199 201 $wp_admin_bar->remove_menu('comments'); 202 } 203 204 /** 205 * Hide comment counts from dashboard using CSS 206 * 207 * @return void 208 * @since 0.2.0 209 */ 210 public function disable_comments_dashboard_css() 211 { 212 echo '<style> 213 /* Hide comment counts from At a Glance widget */ 214 .comment-count, 215 .comment-mod-count { 216 display: none !important; 217 } 218 </style>'; 219 } 220 221 222 /** 223 * Disable recent comments from dashboard Activity widget 224 * 225 * @param array $comments Array of comment objects. 226 * @param WP_Comment_Query $query Comment query object. 227 * @return array Empty array if dashboard context, original comments otherwise 228 * @since 0.2.0 229 */ 230 public function disable_dashboard_recent_comments($comments, $query) 231 { 232 // First check if we're on the dashboard screen 233 if (is_admin() && function_exists('get_current_screen')) { 234 $screen = get_current_screen(); 235 if ($screen && $screen->id === 'dashboard') { 236 return array(); 237 } 238 } 239 return $comments; 200 240 } 201 241 -
really-simple-disable-comments/trunk/README.md
r3221758 r3347666 17 17 * Disables trackbacks and pingbacks 18 18 * Removes comment-related admin menu items and dashboard widgets 19 * Hides comment counts from dashboard "At a Glance" widget 20 * Hides "Recent Comments" section from dashboard Activity widget 19 21 * Disables all comment-related Gutenberg blocks 20 22 * Clean and efficient code with no settings required … … 61 63 ## Changelog 62 64 63 ### 0.1.0 64 * Initial release 65 See [CHANGELOG.md](CHANGELOG.md) for detailed version history and release notes. 65 66 66 67 ## License -
really-simple-disable-comments/trunk/readme.txt
r3323837 r3347666 3 3 Tags: comments, disable comments, disable trackbacks, disable pingbacks 4 4 Tested up to: 6.8 5 Stable tag: 0. 1.05 Stable tag: 0.2.0 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 19 19 * Disables trackbacks and pingbacks 20 20 * Removes comment-related admin menu items and dashboard widgets 21 * Hides comment counts from dashboard "At a Glance" widget 22 * Hides "Recent Comments" section from dashboard Activity widget 21 23 * Disables all comment-related Gutenberg blocks 22 24 * Clean and efficient code with no settings required … … 63 65 == Changelog == 64 66 67 = 0.2.0 = 68 * Added hiding of comment counts from "At a Glance" dashboard widget 69 * Added hiding of "Recent Comments" section from Activity dashboard widget 70 65 71 = 0.1.0 = 66 72 * Initial release … … 68 74 == Upgrade Notice == 69 75 76 = 0.2.0 = 77 Enhanced dashboard functionality - now hides comment counts and recent comments from dashboard widgets. 78 70 79 = 0.1.0 = 71 80 Initial release of Really Simple Disable Comments -
really-simple-disable-comments/trunk/really-simple-disable-comments.php
r3323837 r3347666 4 4 * Plugin URI: https://github.com/nextfly/really-simple-disable-comments 5 5 * Description: Effortlessly disable all comments and trackback functionality across your entire WordPress site by activating this plugin. 6 * Version: 0. 1.06 * Version: 0.2.0 7 7 * Author: NEXTFLY® Web Design 8 8 * Author URI: https://www.nextflywebdesign.com/ … … 29 29 // Define the plugin version. 30 30 if (!defined('RSDC_VERSION')) { 31 define('RSDC_VERSION', '0. 1.0');31 define('RSDC_VERSION', '0.2.0'); 32 32 } 33 33 … … 98 98 add_action('admin_init', array( $this, 'disable_comments_dashboard' )); 99 99 add_action('wp_before_admin_bar_render', array( $this, 'disable_comments_admin_bar' )); 100 add_action('admin_head', array( $this, 'disable_comments_dashboard_css' )); 101 add_filter('the_comments', array( $this, 'disable_dashboard_recent_comments' ), 10, 2); 100 102 101 103 // Frontend UI. … … 198 200 global $wp_admin_bar; 199 201 $wp_admin_bar->remove_menu('comments'); 202 } 203 204 /** 205 * Hide comment counts from dashboard using CSS 206 * 207 * @return void 208 * @since 0.2.0 209 */ 210 public function disable_comments_dashboard_css() 211 { 212 echo '<style> 213 /* Hide comment counts from At a Glance widget */ 214 .comment-count, 215 .comment-mod-count { 216 display: none !important; 217 } 218 </style>'; 219 } 220 221 222 /** 223 * Disable recent comments from dashboard Activity widget 224 * 225 * @param array $comments Array of comment objects. 226 * @param WP_Comment_Query $query Comment query object. 227 * @return array Empty array if dashboard context, original comments otherwise 228 * @since 0.2.0 229 */ 230 public function disable_dashboard_recent_comments($comments, $query) 231 { 232 // First check if we're on the dashboard screen 233 if (is_admin() && function_exists('get_current_screen')) { 234 $screen = get_current_screen(); 235 if ($screen && $screen->id === 'dashboard') { 236 return array(); 237 } 238 } 239 return $comments; 200 240 } 201 241
Note: See TracChangeset
for help on using the changeset viewer.