Changeset 2295896
- Timestamp:
- 05/01/2020 07:02:39 AM (6 years ago)
- Location:
- disable-comments/trunk
- Files:
-
- 7 edited
-
disable-comments.php (modified) (24 diffs)
-
includes/comments-template.php (modified) (1 diff)
-
includes/settings-page.php (modified) (3 diffs)
-
includes/tools-page.php (modified) (3 diffs)
-
languages/disable-comments.pot (modified) (9 diffs)
-
readme.txt (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
disable-comments/trunk/disable-comments.php
r2126229 r2295896 1 1 <?php 2 /* 3 Plugin Name: Disable Comments 4 Plugin URI: https://wordpress.org/plugins/disable-comments/ 5 Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. 6 Version: 1.10.2 7 Author: Samir Shah 8 Author URI: http://www.rayofsolaris.net/ 9 License: GPL2 10 Text Domain: disable-comments 11 Domain Path: /languages/ 12 */ 2 /** 3 * Plugin Name: Disable Comments 4 * Plugin URI: https://wordpress.org/plugins/disable-comments/ 5 * Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. 6 * Version: 1.10.2 7 * Author: Samir Shah 8 * Author URI: http://www.rayofsolaris.net/ 9 * License: GPL2 10 * Text Domain: disable-comments 11 * Domain Path: /languages/ 12 * 13 * @package Disable_Comments 14 */ 13 15 14 16 if ( ! defined( 'ABSPATH' ) ) { … … 34 36 $this->networkactive = ( is_multisite() && array_key_exists( plugin_basename( __FILE__ ), (array) get_site_option( 'active_sitewide_plugins' ) ) ); 35 37 36 // Load options 38 // Load options. 37 39 if ( $this->networkactive ) { 38 40 $this->options = get_site_option( 'disable_comments_options', array() ); … … 41 43 } 42 44 43 // If it looks like first run, check compat 45 // If it looks like first run, check compat. 44 46 if ( empty( $this->options ) ) { 45 47 $this->check_compatibility(); 46 48 } 47 49 48 // Upgrade DB if necessary 50 // Upgrade DB if necessary. 49 51 $this->check_db_upgrades(); 50 52 … … 66 68 if ( $old_ver < self::DB_VERSION ) { 67 69 if ( $old_ver < 2 ) { 68 // upgrade options from version 0.2.1 or earlier to 0.3 70 // upgrade options from version 0.2.1 or earlier to 0.3. 69 71 $this->options['disabled_post_types'] = get_option( 'disable_comments_post_types', array() ); 70 72 delete_option( 'disable_comments_post_types' ); 71 73 } 72 74 if ( $old_ver < 5 ) { 73 // simple is beautiful - remove multiple settings in favour of one 75 // simple is beautiful - remove multiple settings in favour of one. 74 76 $this->options['remove_everywhere'] = isset( $this->options['remove_admin_menu_comments'] ) ? $this->options['remove_admin_menu_comments'] : false; 75 77 foreach ( array( 'remove_admin_menu_comments', 'remove_admin_bar_comments', 'remove_recent_comments', 'remove_discussion', 'remove_rc_widget' ) as $v ) { … … 97 99 } 98 100 99 /* 101 /** 100 102 * Get an array of disabled post type. 101 103 */ 102 104 private function get_disabled_post_types() { 103 105 $types = $this->options['disabled_post_types']; 104 // Not all extra_post_types might be registered on this particular site 106 // Not all extra_post_types might be registered on this particular site. 105 107 if ( $this->networkactive ) { 106 108 foreach ( (array) $this->options['extra_post_types'] as $extra ) { … … 113 115 } 114 116 115 /* 117 /** 116 118 * Check whether comments have been disabled on a given post type. 117 119 */ … … 121 123 122 124 private function init_filters() { 123 // These need to happen now 125 // These need to happen now. 124 126 if ( $this->options['remove_everywhere'] ) { 125 127 add_action( 'widgets_init', array( $this, 'disable_rc_widget' ) ); 126 128 add_filter( 'wp_headers', array( $this, 'filter_wp_headers' ) ); 127 add_action( 'template_redirect', array( $this, 'filter_query' ), 9 ); // before redirect_canonical 128 129 // Admin bar filtering has to happen here since WP 3.6 129 add_action( 'template_redirect', array( $this, 'filter_query' ), 9 ); // before redirect_canonical. 130 131 // Admin bar filtering has to happen here since WP 3.6. 130 132 add_action( 'template_redirect', array( $this, 'filter_admin_bar' ) ); 131 133 add_action( 'admin_init', array( $this, 'filter_admin_bar' ) ); 132 } 133 134 // These can happen later 134 135 // Disable Comments REST API Endpoint 136 add_filter( 'rest_endpoints', array( $this, 'filter_rest_endpoints' ) ); 137 } 138 139 // These can happen later. 135 140 add_action( 'plugins_loaded', array( $this, 'register_text_domain' ) ); 136 141 add_action( 'wp_loaded', array( $this, 'init_wploaded_filters' ) ); 137 138 // Disable "Latest comments" block in Gutenberg 142 // Disable "Latest comments" block in Gutenberg. 139 143 add_action( 'enqueue_block_editor_assets', array( $this, 'filter_gutenberg_blocks') ); 140 144 } … … 148 152 if ( ! empty( $disabled_post_types ) ) { 149 153 foreach ( $disabled_post_types as $type ) { 150 // we need to know what native support was for later 154 // we need to know what native support was for later. 151 155 if ( post_type_supports( $type, 'comments' ) ) { 152 156 $this->modified_types[] = $type; … … 160 164 add_filter( 'get_comments_number', array( $this, 'filter_comments_number' ), 20, 2 ); 161 165 } elseif ( is_admin() && ! $this->options['remove_everywhere'] ) { 162 // It is possible that $disabled_post_types is empty if other 163 // plugins have disabled comments. Hence we also check for 164 // remove_everywhere. If you still get a warning you probably 165 // shouldn't be using this plugin. 166 /** 167 * It is possible that $disabled_post_types is empty if other 168 * plugins have disabled comments. Hence we also check for 169 * remove_everywhere. If you still get a warning you probably 170 * shouldn't be using this plugin. 171 */ 166 172 add_action( 'all_admin_notices', array( $this, 'setup_notice' ) ); 167 173 } 168 174 169 // Filters for the admin only 175 // Filters for the admin only. 170 176 if ( is_admin() ) { 171 177 if ( $this->networkactive ) { … … 186 192 187 193 if ( $this->options['remove_everywhere'] ) { 188 add_action( 'admin_menu', array( $this, 'filter_admin_menu' ), 9999 ); // do this as late as possible 194 add_action( 'admin_menu', array( $this, 'filter_admin_menu' ), 9999 ); // do this as late as possible. 189 195 add_action( 'admin_print_styles-index.php', array( $this, 'admin_css' ) ); 190 196 add_action( 'admin_print_styles-profile.php', array( $this, 'admin_css' ) ); … … 193 199 } 194 200 } 195 // Filters for front end only 201 // Filters for front end only. 196 202 else { 197 203 add_action( 'template_redirect', array( $this, 'check_comment_template' ) ); … … 203 209 } 204 210 205 /* 211 /** 206 212 * Replace the theme's comment template with a blank one. 207 213 * To prevent this, define DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE … … 214 220 add_filter( 'comments_template', array( $this, 'dummy_comments_template' ), 20 ); 215 221 } 216 // Remove comment-reply script for themes that include it indiscriminately 222 // Remove comment-reply script for themes that include it indiscriminately. 217 223 wp_deregister_script( 'comment-reply' ); 218 // feed_links_extra inserts a comments RSS link 224 // feed_links_extra inserts a comments RSS link. 219 225 remove_action( 'wp_head', 'feed_links_extra', 3 ); 220 226 } … … 226 232 227 233 228 /* 234 /** 229 235 * Remove the X-Pingback HTTP header 230 236 */ … … 234 240 } 235 241 236 /* 242 /** 237 243 * Issue a 403 for all comment feed requests. 238 244 */ 239 245 public function filter_query() { 240 246 if ( is_comment_feed() ) { 241 wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );242 } 243 } 244 245 /* 247 wp_die( __( 'Comments are closed.', 'disable-comments' ), '', array( 'response' => 403 ) ); 248 } 249 } 250 251 /** 246 252 * Remove comment links from the admin bar. 247 253 */ 248 254 public function filter_admin_bar() { 249 255 if ( is_admin_bar_showing() ) { 250 // Remove comments links from admin bar 256 // Remove comments links from admin bar. 251 257 remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 ); 252 258 if ( is_multisite() ) { … … 257 263 258 264 /** 265 * Remove the comments endpoint for the REST API 266 */ 267 public function filter_rest_endpoints( $endpoints ) { 268 unset( $endpoints['comments'] ); 269 return $endpoints; 270 } 271 272 /** 259 273 * Determines if scripts should be enqueued 260 274 */ … … 272 286 public function disable_comments_script() { 273 287 wp_enqueue_script( 'disable-comments-gutenberg', plugin_dir_url( __FILE__ ) . 'assets/disable-comments.js', array(), false, true ); 274 wp_localize_script( 275 'disable-comments-gutenberg', 276 'disable_comments', 277 array( 278 'disabled_blocks' => array( 'core/latest-comments' ), 279 ) 280 ); 281 } 282 283 /* 288 } 289 290 /** 284 291 * Remove comment links from the admin bar in a multisite network. 285 292 */ … … 290 297 } 291 298 } else { 292 // We have no way to know whether the plugin is active on other sites, so only remove this one 299 // We have no way to know whether the plugin is active on other sites, so only remove this one. 293 300 $wp_admin_bar->remove_menu( 'blog-' . get_current_blog_id() . '-c' ); 294 301 } … … 303 310 } 304 311 305 echo '<div class="notice notice-warning"><p>' . sprintf( __( 'Note: The <em>Disable Comments</em> plugin is currently active, and comments are completely disabled on: %s. Many of the settings below will not be applicable for those post types.', 'disable-comments' ), implode( __( ', ' ), $names ) ) . '</p></div>';312 echo '<div class="notice notice-warning"><p>' . sprintf( __( 'Note: The <em>Disable Comments</em> plugin is currently active, and comments are completely disabled on: %s. Many of the settings below will not be applicable for those post types.', 'disable-comments' ), implode( __( ', ', 'disable-comments' ), $names ) ) . '</p></div>'; 306 313 } 307 314 } … … 337 344 338 345 if ( $pagenow == 'comment.php' || $pagenow == 'edit-comments.php' ) { 339 wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );346 wp_die( __( 'Comments are closed.', 'disable-comments' ), '', array( 'response' => 403 ) ); 340 347 } 341 348 … … 344 351 if ( ! $this->discussion_settings_allowed() ) { 345 352 if ( $pagenow == 'options-discussion.php' ) { 346 wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );353 wp_die( __( 'Comments are closed.', 'disable-comments' ), '', array( 'response' => 403 ) ); 347 354 } 348 355 … … 384 391 public function disable_rc_widget() { 385 392 unregister_widget( 'WP_Widget_Recent_Comments' ); 386 // The widget has added a style action when it was constructed - which will 387 // still fire even if we now unregister the widget... so filter that out 393 /** 394 * The widget has added a style action when it was constructed - which will 395 * still fire even if we now unregister the widget... so filter that out 396 */ 388 397 add_filter( 'show_recent_comments_widget_style', '__return_false' ); 389 398 } … … 407 416 array_unshift( 408 417 $links, 409 sprintf( '<a href="%s">%s</a>', esc_attr( $this->settings_page_url() ), __( 'Settings' ) ),410 sprintf( '<a href="%s">%s</a>', esc_attr( $this->tools_page_url() ), __( 'Tools' ) )418 sprintf( '<a href="%s">%s</a>', esc_attr( $this->settings_page_url() ), __( 'Settings', 'disable-comments' ) ), 419 sprintf( '<a href="%s">%s</a>', esc_attr( $this->tools_page_url() ), __( 'Tools', 'disable-comments' ) ) 411 420 ); 412 421 } … … 448 457 449 458 public function single_site_deactivate() { 450 // for single sites, delete the options upon deactivation, not uninstall 459 // for single sites, delete the options upon deactivation, not uninstall. 451 460 delete_option( 'disable_comments_options' ); 452 461 } -
disable-comments/trunk/includes/comments-template.php
r2125992 r2295896 1 1 <?php 2 /* 3 Dummy comments template file.2 /** 3 * Dummy comments template file. 4 4 * This replaces the theme's comment template when comments are disabled everywhere 5 * 6 * @package Disable_Comments 5 7 */ -
disable-comments/trunk/includes/settings-page.php
r2125992 r2295896 1 1 <?php 2 /** 3 * Setting page. 4 * 5 * @package Disable_Comments 6 */ 7 2 8 if ( ! defined( 'ABSPATH' ) ) { 3 9 exit; … … 6 12 $typeargs = array( 'public' => true ); 7 13 if ( $this->networkactive ) { 8 $typeargs['_builtin'] = true; // stick to known types for network 14 $typeargs['_builtin'] = true; // stick to known types for network. 9 15 } 10 16 $types = get_post_types( $typeargs, 'objects' ); 11 17 foreach ( array_keys( $types ) as $type ) { 12 if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) { // the type doesn't support comments anyway 18 if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) { // the type doesn't support comments anyway. 13 19 unset( $types[ $type ] ); 14 20 } … … 29 35 $this->options['disabled_post_types'] = $disabled_post_types; 30 36 31 // Extra custom post types 37 // Extra custom post types. 32 38 if ( $this->networkactive && ! empty( $_POST['extra_post_types'] ) ) { 33 39 $extra_post_types = array_filter( array_map( 'sanitize_key', explode( ',', $_POST['extra_post_types'] ) ) ); 34 $this->options['extra_post_types'] = array_diff( $extra_post_types, array_keys( $types ) ); // Make sure we don't double up builtins 40 $this->options['extra_post_types'] = array_diff( $extra_post_types, array_keys( $types ) ); // Make sure we don't double up builtins. 35 41 } 36 42 37 43 $this->update_options(); 38 $cache_message = WP_CACHE ? ' <strong>' . __( 'If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately.' ) . '</strong>' : '';44 $cache_message = WP_CACHE ? ' <strong>' . __( 'If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately.', 'disable-comments' ) . '</strong>' : ''; 39 45 echo '<div id="message" class="updated"><p>' . __( 'Options updated. Changes to the Admin Menu and Admin Bar will not appear until you leave or reload this page.', 'disable-comments' ) . $cache_message . '</p></div>'; 40 46 } -
disable-comments/trunk/includes/tools-page.php
r2125992 r2295896 1 1 <?php 2 /** 3 * Tools page. 4 * 5 * @package Disable_Comments 6 */ 7 2 8 if ( ! defined( 'ABSPATH' ) ) { 3 9 exit; … … 20 26 $typeargs = array( 'public' => true ); 21 27 if ( $this->networkactive ) { 22 $typeargs['_builtin'] = true; // stick to known types for network 28 $typeargs['_builtin'] = true; // stick to known types for network. 23 29 } 24 30 $types = get_post_types( $typeargs, 'objects' ); 25 31 foreach ( array_keys( $types ) as $type ) { 26 if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) { // the type doesn't support comments anyway 32 if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) { // the type doesn't support comments anyway. 27 33 unset( $types[ $type ] ); 28 34 } … … 49 55 $delete_post_types = array_intersect( $delete_post_types, array_keys( $types ) ); 50 56 51 // Extra custom post types 57 // Extra custom post types. 52 58 if ( $this->networkactive && ! empty( $_POST['delete_extra_post_types'] ) ) { 53 59 $delete_extra_post_types = array_filter( array_map( 'sanitize_key', explode( ',', $_POST['delete_extra_post_types'] ) ) ); 54 $delete_extra_post_types = array_diff( $delete_extra_post_types, array_keys( $types ) ); // Make sure we don't double up builtins 60 $delete_extra_post_types = array_diff( $delete_extra_post_types, array_keys( $types ) ); // Make sure we don't double up builtins. 55 61 $delete_post_types = array_merge( $delete_post_types, $delete_extra_post_types ); 56 62 } 57 63 58 64 if ( ! empty( $delete_post_types ) ) { 59 // Loop through post_types and remove comments/meta and set posts comment_count to 0 65 // Loop through post_types and remove comments/meta and set posts comment_count to 0. 60 66 foreach ( $delete_post_types as $delete_post_type ) { 61 67 $wpdb->query( "DELETE cmeta FROM $wpdb->commentmeta cmeta INNER JOIN $wpdb->comments comments ON cmeta.comment_id=comments.comment_ID INNER JOIN $wpdb->posts posts ON comments.comment_post_ID=posts.ID WHERE posts.post_type = '$delete_post_type'" ); -
disable-comments/trunk/languages/disable-comments.pot
r1693104 r2295896 1 # Copyright (C) 20 17 Disable Comments2 # This file is distributed under the same license as the Disable Comments package.3 msgid "" 4 msgstr "" 5 "Project-Id-Version: Disable Comments 1. 6\n"1 # Copyright (C) 2020 Samir Shah 2 # This file is distributed under the GPL2. 3 msgid "" 4 msgstr "" 5 "Project-Id-Version: Disable Comments 1.10.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n" 7 "POT-Creation-Date: 20 17-07-08 03:05:14+00:00\n"7 "POT-Creation-Date: 2020-05-01 06:45:42+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 "Content-Type: text/plain; charset= UTF-8\n"9 "Content-Type: text/plain; charset=utf-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 20 17-MO-DA HO:MI+ZONE\n"11 "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n" 12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 13 "Language-Team: LANGUAGE <[email protected]>\n" 14 15 #: disable-comments.php:59 14 "Language: en\n" 15 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 16 "X-Poedit-Country: United States\n" 17 "X-Poedit-SourceCharset: UTF-8\n" 18 "X-Poedit-KeywordsList: " 19 "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_" 20 "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n" 21 "X-Poedit-Basepath: ../\n" 22 "X-Poedit-SearchPath-0: .\n" 23 "X-Poedit-Bookmarks: \n" 24 "X-Textdomain-Support: yes\n" 25 "X-Generator: grunt-wp-i18n 1.0.3\n" 26 27 #: disable-comments.php:61 16 28 msgid "Disable Comments requires WordPress version %s or greater." 17 29 msgstr "" 18 30 19 #: disable-comments.php:24 0 disable-comments.php:32531 #: disable-comments.php:247 disable-comments.php:346 disable-comments.php:353 20 32 msgid "Comments are closed." 21 33 msgstr "" 22 34 23 #: disable-comments.php: 28924 msgid "" 25 "Note: The <em>Disable Comments</em> plugin is currently active, and comments"26 " are completely disabled on: %s. Many of the settings below will not be"27 " applicable for those post types."28 msgstr "" 29 30 #: disable-comments.php: 28935 #: disable-comments.php:312 36 msgid "" 37 "Note: The <em>Disable Comments</em> plugin is currently active, and " 38 "comments are completely disabled on: %s. Many of the settings below will " 39 "not be applicable for those post types." 40 msgstr "" 41 42 #: disable-comments.php:312 31 43 msgid ", " 32 44 msgstr "" 33 45 34 #: disable-comments.php:3 1746 #: disable-comments.php:338 35 47 msgid "" 36 48 "The <em>Disable Comments</em> plugin is active, but isn't configured to do " … … 39 51 msgstr "" 40 52 41 #: disable-comments.php: 38253 #: disable-comments.php:418 42 54 msgid "Settings" 43 55 msgstr "" 44 56 45 #: disable-comments.php: 38357 #: disable-comments.php:419 46 58 msgid "Tools" 47 59 msgstr "" 48 60 49 #: disable-comments.php:391 50 msgctxt "settings menu title" 51 msgid "Disable Comments" 52 msgstr "" 53 54 #: disable-comments.php:403 includes/tools-page.php:7 55 #: includes/tools-page.php:103 61 #: disable-comments.php:440 includes/tools-page.php:13 62 #: includes/tools-page.php:116 56 63 msgid "Delete Comments" 57 64 msgstr "" 58 65 59 #: includes/settings-page.php:4 366 #: includes/settings-page.php:44 60 67 msgid "" 61 68 "If a caching/performance plugin is active, please invalidate its cache to " … … 63 70 msgstr "" 64 71 65 #: includes/settings-page.php:4 472 #: includes/settings-page.php:45 66 73 msgid "" 67 74 "Options updated. Changes to the Admin Menu and Admin Bar will not appear " … … 69 76 msgstr "" 70 77 71 #. #-#-#-#-# disable-comments.pot (Disable Comments 1.6) #-#-#-#-# 72 #. Plugin Name of the plugin/theme 73 #: includes/settings-page.php:49 74 msgid "Disable Comments" 75 msgstr "" 76 77 #: includes/settings-page.php:52 78 #: includes/settings-page.php:53 78 79 msgid "" 79 80 "<em>Disable Comments</em> is Network Activated. The settings below will " … … 81 82 msgstr "" 82 83 83 #: includes/settings-page.php:5 484 #: includes/settings-page.php:56 84 85 msgid "" 85 86 "It seems that a caching/performance plugin is active on this site. Please " … … 88 89 msgstr "" 89 90 90 #: includes/settings-page.php: 58 includes/tools-page.php:8591 #: includes/settings-page.php:61 includes/tools-page.php:95 91 92 msgid "Everywhere" 92 93 msgstr "" 93 94 94 #: includes/settings-page.php: 5895 #: includes/settings-page.php:61 95 96 msgid "Disable all comment-related controls and settings in WordPress." 96 97 msgstr "" 97 98 98 #: includes/settings-page.php: 5999 msgid "" 100 "% s: This option is global and will affect your entire site. Use it only if"101 " you want to disable comments <em>everywhere</em>. A complete description of"102 " what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."103 msgstr ""104 105 #: includes/settings-page.php:59 includes/settings-page.php:80 106 #: includes/settings-page.php: 82 includes/settings-page.php:110107 #: includes/tools-page.php: 86 includes/tools-page.php:9799 #: includes/settings-page.php:62 100 msgid "" 101 "%1$s: This option is global and will affect your entire site. Use it only " 102 "if you want to disable comments <em>everywhere</em>. A complete description " 103 "of what this option does is <a href=\"%2$s\" target=\"_blank\">available " 104 "here</a>." 105 msgstr "" 106 107 #: includes/settings-page.php:62 includes/tools-page.php:96 108 #: includes/tools-page.php:110 108 109 msgid "Warning" 109 110 msgstr "" 110 111 111 #: includes/settings-page.php:6 1112 #: includes/settings-page.php:64 112 113 msgid "On certain post types" 113 114 msgstr "" 114 115 115 #: includes/settings-page.php: 67 includes/tools-page.php:94116 #: includes/settings-page.php:73 includes/tools-page.php:107 116 117 msgid "" 117 118 "Only the built-in post types appear above. If you want to disable comments " 118 "on other custom post types on the entire network, you can supply a comma-"119 " separated list of post types below (use the slug that identifies the post"120 " type)."121 msgstr "" 122 123 #: includes/settings-page.php: 68 includes/tools-page.php:95119 "on other custom post types on the entire network, you can supply a " 120 "comma-separated list of post types below (use the slug that identifies the " 121 "post type)." 122 msgstr "" 123 124 #: includes/settings-page.php:74 includes/tools-page.php:108 124 125 msgid "Custom post types:" 125 126 msgstr "" 126 127 127 #: includes/settings-page.php:70 128 msgid "" 129 "Disabling comments will also disable trackbacks and pingbacks. All comment-" 130 "related fields will also be hidden from the edit/quick-edit screens of the " 131 "affected posts. These settings cannot be overridden for individual posts." 132 msgstr "" 133 134 #: includes/settings-page.php:75 135 msgid "Other options" 136 msgstr "" 137 138 #: includes/settings-page.php:79 139 msgid "Use persistent mode" 140 msgstr "" 141 142 #: includes/settings-page.php:80 143 msgid "" 144 "%s: <strong>This will make persistent changes to your database — " 145 "comments will remain closed even if you later disable the plugin!</strong> " 146 "You should not use it if you only want to disable comments temporarily. " 147 "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting " 148 "this option." 149 msgstr "" 150 151 #: includes/settings-page.php:82 152 msgid "" 153 "%s: Entering persistent mode on large multi-site networks requires a large " 154 "number of database queries and can take a while. Use with caution!" 155 msgstr "" 156 157 #: includes/settings-page.php:89 128 #: includes/settings-page.php:76 129 msgid "" 130 "Disabling comments will also disable trackbacks and pingbacks. All " 131 "comment-related fields will also be hidden from the edit/quick-edit screens " 132 "of the affected posts. These settings cannot be overridden for individual " 133 "posts." 134 msgstr "" 135 136 #: includes/settings-page.php:81 158 137 msgid "Save Changes" 159 138 msgstr "" 160 139 161 #: includes/settings-page.php:110 162 msgid "" 163 "%s: Selecting this option will make persistent changes to your database. Are " 164 "you sure you want to enable it?" 165 msgstr "" 166 167 #: includes/tools-page.php:13 includes/tools-page.php:75 140 #: includes/tools-page.php:20 includes/tools-page.php:86 168 141 msgid "No comments available for deletion." 169 142 msgstr "" 170 143 171 #: includes/tools-page.php: 38144 #: includes/tools-page.php:46 172 145 msgid "All comments have been deleted." 173 146 msgstr "" 174 147 175 #: includes/tools-page.php:4 0 includes/tools-page.php:43148 #: includes/tools-page.php:48 includes/tools-page.php:51 176 149 msgid "Internal error occured. Please try again later." 177 150 msgstr "" 178 151 179 #: includes/tools-page.php: 62180 msgid "All comments have been deleted for %s s."181 msgstr "" 182 183 #: includes/tools-page.php: 68152 #: includes/tools-page.php:73 153 msgid "All comments have been deleted for %s." 154 msgstr "" 155 156 #: includes/tools-page.php:79 184 157 msgid "Comment Deletion Complete" 185 158 msgstr "" 186 159 187 #: includes/tools-page.php: 85160 #: includes/tools-page.php:95 188 161 msgid "Delete all comments in WordPress." 189 162 msgstr "" 190 163 191 #: includes/tools-page.php: 86164 #: includes/tools-page.php:96 192 165 msgid "" 193 166 "%s: This function and will affect your entire site. Use it only if you want " … … 195 168 msgstr "" 196 169 197 #: includes/tools-page.php: 88170 #: includes/tools-page.php:98 198 171 msgid "For certain post types" 199 172 msgstr "" 200 173 201 #: includes/tools-page.php: 97174 #: includes/tools-page.php:110 202 175 msgid "" 203 176 "%s: Deleting comments will remove existing comment entries in the database " … … 205 178 msgstr "" 206 179 207 #: includes/tools-page.php:1 02180 #: includes/tools-page.php:115 208 181 msgid "Total Comments:" 182 msgstr "" 183 184 #. Plugin Name of the plugin/theme 185 msgid "Disable Comments" 209 186 msgstr "" 210 187 … … 226 203 msgid "http://www.rayofsolaris.net/" 227 204 msgstr "" 205 206 #: disable-comments.php:427 207 msgctxt "settings menu title" 208 msgid "Disable Comments" 209 msgstr "" 210 211 #: includes/settings-page.php:50 212 msgctxt "settings page title" 213 msgid "Disable Comments" 214 msgstr "" -
disable-comments/trunk/readme.txt
r2125992 r2295896 4 4 Tags: comments, disable, global 5 5 Requires at least: 5.0 6 Tested up to: 5. 36 Tested up to: 5.4 7 7 Stable tag: trunk 8 8 -
disable-comments/trunk/uninstall.php
r2125992 r2295896 1 1 <?php 2 /** 3 * Uninstall script 4 * 5 * @package Disable_Comments 6 */ 7 2 8 if ( ! defined( 'ABSPATH' ) && ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { 3 9 exit;
Note: See TracChangeset
for help on using the changeset viewer.