Disable Comments - Version 1.1

Version Description

  • Attempt to hide the comments template ("Comments are closed") whenever comments are disabled.
Download this release

Release Info

Developer solarissmoke
Plugin Icon 128x128 Disable Comments
Version 1.1
Comparing to
See all releases

Version 1.1

comments-template.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ /* Dummy comments template file.
3
+ * This replaces the theme's comment template when comments are disabled everywhere
4
+ */
disable-comments.php ADDED
@@ -0,0 +1,437 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Disable Comments
4
+ Plugin URI: http://wordpress.org/extend/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.1
7
+ Author: Samir Shah
8
+ Author URI: http://rayofsolaris.net/
9
+ License: GPL2
10
+ Text Domain: disable-comments
11
+ Domain Path: /languages/
12
+ */
13
+
14
+ if( !defined( 'ABSPATH' ) )
15
+ exit;
16
+
17
+ class Disable_Comments {
18
+ const db_version = 5;
19
+ private $options;
20
+ private $networkactive;
21
+ private $modified_types = array();
22
+
23
+ function __construct() {
24
+ // are we network activated?
25
+ $this->networkactive = ( is_multisite() && array_key_exists( plugin_basename( __FILE__ ), get_site_option( 'active_sitewide_plugins' ) ) );
26
+
27
+ // load options
28
+ $this->options = $this->networkactive ? get_site_option( 'disable_comments_options', array() ) : get_option( 'disable_comments_options', array() );
29
+
30
+ // load language files
31
+ load_plugin_textdomain( 'disable-comments', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
32
+
33
+ // If it looks like first run, check compat
34
+ if ( empty( $this->options ) && version_compare( $GLOBALS['wp_version'], '3.3', '<' ) ) {
35
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
36
+ deactivate_plugins( __FILE__ );
37
+ if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'activate' || $_GET['action'] == 'error_scrape' ) )
38
+ exit( sprintf( __( 'Disable Comments requires WordPress version %s or greater.', 'disable-comments' ), '3.3' ) );
39
+ }
40
+
41
+ $old_ver = isset( $this->options['db_version'] ) ? $this->options['db_version'] : 0;
42
+ if( $old_ver < self::db_version ) {
43
+ if( $old_ver < 2 ) {
44
+ // upgrade options from version 0.2.1 or earlier to 0.3
45
+ $this->options['disabled_post_types'] = get_option( 'disable_comments_post_types', array() );
46
+ delete_option( 'disable_comments_post_types' );
47
+ }
48
+ if( $old_ver < 5 ) {
49
+ // simple is beautiful - remove multiple settings in favour of one
50
+ $this->options['remove_everywhere'] = isset( $this->options['remove_admin_menu_comments'] ) ? $this->options['remove_admin_menu_comments'] : false;
51
+ foreach( array( 'remove_admin_menu_comments', 'remove_admin_bar_comments', 'remove_recent_comments', 'remove_discussion', 'remove_rc_widget' ) as $v )
52
+ unset( $this->options[$v] );
53
+ }
54
+
55
+ foreach( array( 'remove_everywhere', 'permanent' ) as $v )
56
+ if( !isset( $this->options[$v] ) )
57
+ $this->options[$v] = false;
58
+
59
+ $this->options['db_version'] = self::db_version;
60
+ $this->update_options();
61
+ }
62
+
63
+ // these need to happen now
64
+ if( $this->options['remove_everywhere'] ) {
65
+ add_action( 'widgets_init', array( $this, 'disable_rc_widget' ) );
66
+ add_filter( 'wp_headers', array( $this, 'filter_wp_headers' ) );
67
+ add_action( 'template_redirect', array( $this, 'filter_query' ), 9 ); // before redirect_canonical
68
+
69
+ // Admin bar filtering has to happen here since WP 3.6
70
+ add_action( 'template_redirect', array( $this, 'filter_admin_bar' ) );
71
+ add_action( 'admin_init', array( $this, 'filter_admin_bar' ) );
72
+ }
73
+
74
+ // these can happen later
75
+ add_action( 'wp_loaded', array( $this, 'setup_filters' ) );
76
+ }
77
+
78
+ private function update_options() {
79
+ if( $this->networkactive )
80
+ update_site_option( 'disable_comments_options', $this->options );
81
+ else
82
+ update_option( 'disable_comments_options', $this->options );
83
+ }
84
+
85
+ function setup_filters(){
86
+ if( !empty( $this->options['disabled_post_types'] ) ) {
87
+ foreach( $this->options['disabled_post_types'] as $type ) {
88
+ // we need to know what native support was for later
89
+ if( post_type_supports( $type, 'comments' ) ) {
90
+ $this->modified_types[] = $type;
91
+ remove_post_type_support( $type, 'comments' );
92
+ remove_post_type_support( $type, 'trackbacks' );
93
+ }
94
+ }
95
+ add_filter( 'comments_open', array( $this, 'filter_comment_status' ), 20, 2 );
96
+ add_filter( 'pings_open', array( $this, 'filter_comment_status' ), 20, 2 );
97
+ }
98
+ elseif( is_admin() ) {
99
+ add_action( 'all_admin_notices', array( $this, 'setup_notice' ) );
100
+ }
101
+
102
+ // Filters for the admin only
103
+ if( is_admin() ) {
104
+ if( $this->networkactive ) {
105
+ add_action( 'network_admin_menu', array( $this, 'settings_menu' ) );
106
+ add_filter( 'network_admin_plugin_action_links', array( $this, 'plugin_actions_links'), 10, 2 );
107
+ }
108
+ else {
109
+ add_action( 'admin_menu', array( $this, 'settings_menu' ) );
110
+ add_filter( 'plugin_action_links', array( $this, 'plugin_actions_links'), 10, 2 );
111
+ if( is_multisite() ) // We're on a multisite setup, but the plugin isn't network activated.
112
+ register_deactivation_hook( __FILE__, array( $this, 'single_site_deactivate' ) );
113
+ }
114
+
115
+ add_action( 'admin_print_footer_scripts', array( $this, 'discussion_notice' ) );
116
+ add_filter( 'plugin_row_meta', array( $this, 'set_plugin_meta' ), 10, 2 );
117
+
118
+ // if only certain types are disabled, remember the original post status
119
+ if( !( $this->persistent_mode_allowed() && $this->options['permanent'] ) && !$this->options['remove_everywhere'] ) {
120
+ add_action( 'edit_form_advanced', array( $this, 'edit_form_inputs' ) );
121
+ add_action( 'edit_page_form', array( $this, 'edit_form_inputs' ) );
122
+ }
123
+
124
+ if( $this->options['remove_everywhere'] ) {
125
+ add_action( 'admin_menu', array( $this, 'filter_admin_menu' ), 9999 ); // do this as late as possible
126
+ add_action( 'admin_head', array( $this, 'hide_dashboard_bits' ) );
127
+ add_action( 'wp_dashboard_setup', array( $this, 'filter_dashboard' ) );
128
+ add_filter( 'pre_option_default_pingback_flag', '__return_zero' );
129
+ }
130
+ }
131
+ // Filters for front end only
132
+ else {
133
+ add_action( 'template_redirect', array( $this, 'check_comment_template' ) );
134
+ }
135
+ }
136
+
137
+ function check_comment_template() {
138
+ if( is_singular() && ( $this->options['remove_everywhere'] || in_array( get_post_type(), $this->options['disabled_post_types'] ) ) ) {
139
+ // Kill the comments template. This will deal with themes that don't check comment stati properly!
140
+ add_filter( 'comments_template', array( $this, 'dummy_comments_template' ), 20 );
141
+ // Remove comment-reply script for themes that include it indiscriminately
142
+ wp_deregister_script( 'comment-reply' );
143
+ }
144
+ }
145
+
146
+ function dummy_comments_template() {
147
+ return dirname( __FILE__ ) . '/comments-template.php';
148
+ }
149
+
150
+ function filter_wp_headers( $headers ) {
151
+ unset( $headers['X-Pingback'] );
152
+ return $headers;
153
+ }
154
+
155
+ function filter_query() {
156
+ if( is_comment_feed() ) {
157
+ if( isset( $_GET['feed'] ) ) {
158
+ wp_redirect( remove_query_arg( 'feed' ), 301 );
159
+ exit;
160
+ }
161
+
162
+ set_query_var( 'feed', '' ); // redirect_canonical will do the rest
163
+ redirect_canonical();
164
+ }
165
+ }
166
+
167
+ function filter_admin_bar() {
168
+ if( is_admin_bar_showing() ) {
169
+ // Remove comments links from admin bar
170
+ remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 ); // WP<3.3
171
+ remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 ); // WP 3.3
172
+ if( is_multisite() )
173
+ add_action( 'admin_bar_menu', array( $this, 'remove_network_comment_links' ), 500 );
174
+ }
175
+ }
176
+
177
+ function remove_network_comment_links( $wp_admin_bar ) {
178
+ if( $this->networkactive ) {
179
+ foreach( (array) $wp_admin_bar->user->blogs as $blog )
180
+ $wp_admin_bar->remove_menu( 'blog-' . $blog->userblog_id . '-c' );
181
+ }
182
+ else {
183
+ // We have no way to know whether the plugin is active on other sites, so only remove this one
184
+ $wp_admin_bar->remove_menu( 'blog-' . get_current_blog_id() . '-c' );
185
+ }
186
+ }
187
+
188
+ function edit_form_inputs() {
189
+ global $post;
190
+ // Without a dicussion meta box, comment_status will be set to closed on new/updated posts
191
+ if( in_array( $post->post_type, $this->modified_types ) ) {
192
+ echo '<input type="hidden" name="comment_status" value="' . $post->comment_status . '" /><input type="hidden" name="ping_status" value="' . $post->ping_status . '" />';
193
+ }
194
+ }
195
+
196
+ function discussion_notice(){
197
+ if( get_current_screen()->id == 'options-discussion' && !empty( $this->options['disabled_post_types'] ) ) {
198
+ $names = array();
199
+ foreach( $this->options['disabled_post_types'] as $type )
200
+ $names[$type] = get_post_type_object( $type )->labels->name;
201
+ ?>
202
+ <script>
203
+ jQuery(document).ready(function($){
204
+ $(".wrap h2").first().after( <?php echo json_encode( '<div style="color: #900"><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>' );?> );
205
+ });
206
+ </script>
207
+ <?php
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Return context-aware settings page URL
213
+ */
214
+ private function settings_page_url() {
215
+ $base = $this->networkactive ? network_admin_url( 'settings.php' ) : admin_url( 'options-general.php' );
216
+ return add_query_arg( 'page', 'disable_comments_settings', $base );
217
+ }
218
+
219
+ function setup_notice(){
220
+ if( strpos( get_current_screen()->id, 'settings_page_disable_comments_settings' ) === 0 )
221
+ return;
222
+ $hascaps = $this->networkactive ? is_network_admin() && current_user_can( 'manage_network_plugins' ) : current_user_can( 'manage_options' );
223
+ if( $hascaps )
224
+ echo '<div class="updated fade"><p>' . sprintf( __( 'The <em>Disable Comments</em> plugin is active, but isn\'t configured to do anything yet. Visit the <a href="%s">configuration page</a> to choose which post types to disable comments on.', 'disable-comments'), esc_attr( $this->settings_page_url() ) ) . '</p></div>';
225
+ }
226
+
227
+ function filter_admin_menu(){
228
+ global $pagenow;
229
+
230
+ if ( $pagenow == 'comment.php' || $pagenow == 'edit-comments.php' || $pagenow == 'options-discussion.php' )
231
+ wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );
232
+
233
+ remove_menu_page( 'edit-comments.php' );
234
+ remove_submenu_page( 'options-general.php', 'options-discussion.php' );
235
+ }
236
+
237
+ function filter_dashboard(){
238
+ remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
239
+ }
240
+
241
+ function hide_dashboard_bits(){
242
+ if( 'dashboard' == get_current_screen()->id )
243
+ add_action( 'admin_print_footer_scripts', array( $this, 'dashboard_js' ) );
244
+ }
245
+
246
+ function dashboard_js(){
247
+ if( version_compare( $GLOBALS['wp_version'], '3.8', '<' ) ) {
248
+ // getting hold of the discussion box is tricky. The table_discussion class is used for other things in multisite
249
+ echo '<script> jQuery(function($){ $("#dashboard_right_now .table_discussion").has(\'a[href="edit-comments.php"]\').first().hide(); }); </script>';
250
+ }
251
+ else {
252
+ echo '<script> jQuery(function($){ $("#dashboard_right_now .comment-count, #latest-comments").hide(); }); </script>';
253
+ }
254
+ }
255
+
256
+ function filter_comment_status( $open, $post_id ) {
257
+ $post = get_post( $post_id );
258
+ return ( $this->options['remove_everywhere'] || in_array( $post->post_type, $this->options['disabled_post_types'] ) ) ? false : $open;
259
+ }
260
+
261
+ function disable_rc_widget() {
262
+ // This widget has been removed from the Dashboard in WP 3.8 and can be removed in a future version
263
+ unregister_widget( 'WP_Widget_Recent_Comments' );
264
+ }
265
+
266
+ function set_plugin_meta( $links, $file ) {
267
+ static $plugin;
268
+ $plugin = plugin_basename( __FILE__ );
269
+ if ( $file == $plugin ) {
270
+ $links[] = '<a href="https://github.com/solarissmoke/disable-comments">GitHub</a>';
271
+ }
272
+ return $links;
273
+ }
274
+
275
+ /**
276
+ * Add links to Settings page
277
+ */
278
+ function plugin_actions_links( $links, $file ) {
279
+ static $plugin;
280
+ $plugin = plugin_basename( __FILE__ );
281
+ if( $file == $plugin && current_user_can('manage_options') ) {
282
+ array_unshift(
283
+ $links,
284
+ sprintf( '<a href="%s">%s</a>', esc_attr( $this->settings_page_url() ), __( 'Settings' ) )
285
+ );
286
+ }
287
+
288
+ return $links;
289
+ }
290
+
291
+ function settings_menu() {
292
+ $title = __( 'Disable Comments', 'disable-comments' );
293
+ if( $this->networkactive )
294
+ add_submenu_page( 'settings.php', $title, $title, 'manage_network_plugins', 'disable_comments_settings', array( $this, 'settings_page' ) );
295
+ else
296
+ add_submenu_page( 'options-general.php', $title, $title, 'manage_options', 'disable_comments_settings', array( $this, 'settings_page' ) );
297
+ }
298
+
299
+ function settings_page() {
300
+ $typeargs = array( 'public' => true );
301
+ if( $this->networkactive )
302
+ $typeargs['_builtin'] = true; // stick to known types for network
303
+ $types = get_post_types( $typeargs, 'objects' );
304
+ foreach( array_keys( $types ) as $type ) {
305
+ if( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) // the type doesn't support comments anyway
306
+ unset( $types[$type] );
307
+ }
308
+
309
+ $persistent_allowed = $this->persistent_mode_allowed();
310
+
311
+ if ( isset( $_POST['submit'] ) ) {
312
+ check_admin_referer( 'disable-comments-admin' );
313
+ $this->options['remove_everywhere'] = ( $_POST['mode'] == 'remove_everywhere' );
314
+
315
+ if( $this->options['remove_everywhere'] )
316
+ $disabled_post_types = array_keys( $types );
317
+ else
318
+ $disabled_post_types = empty( $_POST['disabled_types'] ) ? array() : (array) $_POST['disabled_types'];
319
+
320
+ $disabled_post_types = array_intersect( $disabled_post_types, array_keys( $types ) );
321
+
322
+ // entering permanent mode, or post types have changed
323
+ if( $persistent_allowed && !empty( $_POST['permanent'] ) && ( !$this->options['permanent'] || $disabled_post_types != $this->options['disabled_post_types'] ) )
324
+ $this->enter_permanent_mode();
325
+
326
+ $this->options['disabled_post_types'] = $disabled_post_types;
327
+ $this->options['permanent'] = $persistent_allowed && isset( $_POST['permanent'] );
328
+
329
+ $this->update_options();
330
+ $cache_message = WP_CACHE ? ' <strong>' . __( 'If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately.' ) . '</strong>' : '';
331
+ 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>';
332
+ }
333
+ ?>
334
+ <style> .indent {padding-left: 2em} </style>
335
+ <div class="wrap">
336
+ <?php screen_icon( 'plugins' ); ?>
337
+ <h2><?php _e( 'Disable Comments', 'disable-comments') ?></h2>
338
+ <?php
339
+ if( $this->networkactive )
340
+ echo '<div class="updated"><p>' . __( '<em>Disable Comments</em> is Network Activated. The settings below will affect <strong>all sites</strong> in this network.', 'disable-comments') . '</p></div>';
341
+ if( WP_CACHE )
342
+ echo '<div class="updated"><p>' . __( "It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below.", 'disable-comments') . '</p></div>';
343
+ ?>
344
+ <form action="" method="post" id="disable-comments">
345
+ <ul>
346
+ <li><label for="remove_everywhere"><input type="radio" id="remove_everywhere" name="mode" value="remove_everywhere" <?php checked( $this->options['remove_everywhere'] );?> /> <strong><?php _e( 'Everywhere', 'disable-comments') ?></strong>: <?php _e( 'Disable all comment-related controls and settings in WordPress.', 'disable-comments') ?></label>
347
+ <p class="indent"><?php printf( __( '%s: This option is global and will affect your entire site. Use it only if you want to disable comments <em>everywhere</em>. A complete description of what this option does is <a href="%s" target="_blank">available here</a>.', 'disable-comments' ), '<strong style="color: #900">' . __('Warning', 'disable-comments') . '</strong>', 'http://wordpress.org/extend/plugins/disable-comments/other_notes/' ); ?></p>
348
+ </li>
349
+ <li><label for="selected_types"><input type="radio" id="selected_types" name="mode" value="selected_types" <?php checked( ! $this->options['remove_everywhere'] );?> /> <strong><?php _e( 'On certain post types', 'disable-comments') ?></strong></label>:
350
+ <p></p>
351
+ <ul class="indent" id="listoftypes">
352
+ <?php foreach( $types as $k => $v ) echo "<li><label for='post-type-$k'><input type='checkbox' name='disabled_types[]' value='$k' ". checked( in_array( $k, $this->options['disabled_post_types'] ), true, false ) ." id='post-type-$k'> {$v->labels->name}</label></li>";?>
353
+ </ul>
354
+ <p class="indent"><?php _e( 'Disabling comments will also disable trackbacks and pingbacks. All comment-related fields will also be hidden from the edit/quick-edit screens of the affected posts. These settings cannot be overridden for individual posts.', 'disable-comments') ?></p>
355
+ </li>
356
+ </ul>
357
+ <h3><?php _e( 'Other options', 'disable-comments') ?></h3>
358
+ <ul>
359
+ <li>
360
+ <?php
361
+ if( $persistent_allowed ) {
362
+ echo '<label for="permanent"><input type="checkbox" name="permanent" id="permanent" '. checked( $this->options['permanent'], true, false ) . '> <strong>' . __( 'Use persistent mode', 'disable-comments') . '</strong></label>';
363
+ echo '<p class="indent">' . sprintf( __( '%s: <strong>This will make persistent changes to your database &mdash; comments will remain closed even if you later disable the plugin!</strong> You should not use it if you only want to disable comments temporarily. Please <a href="%s" target="_blank">read the FAQ</a> before selecting this option.', 'disable-comments'), '<strong style="color: #900">' . __('Warning', 'disable-comments') . '</strong>', 'http://wordpress.org/extend/plugins/disable-comments/faq/' ) . '</p>';
364
+ if( $this->networkactive )
365
+ echo '<p class="indent">' . sprintf( __( '%s: Entering persistent mode on large multi-site networks requires a large number of database queries and can take a while. Use with caution!', 'disable-comments'), '<strong style="color: #900">' . __('Warning', 'disable-comments') . '</strong>' ) . '</p>';
366
+ }
367
+ ?>
368
+ </li>
369
+ </ul>
370
+ <?php wp_nonce_field( 'disable-comments-admin' ); ?>
371
+ <p class="submit"><input class="button-primary" type="submit" name="submit" value="<?php _e( 'Save Changes') ?>"></p>
372
+ </form>
373
+ </div>
374
+ <script>
375
+ jQuery(document).ready(function($){
376
+ function disable_comments_uihelper(){
377
+ if( $("#remove_everywhere").is(":checked") )
378
+ $("#listoftypes").css("color", "#888").find(":input").attr("disabled", true );
379
+ else
380
+ $("#listoftypes").css("color", "#000").find(":input").attr("disabled", false );
381
+ }
382
+
383
+ $("#disable-comments :input").change(function(){
384
+ $("#message").slideUp();
385
+ disable_comments_uihelper();
386
+ });
387
+
388
+ disable_comments_uihelper();
389
+
390
+ $("#permanent").change( function() {
391
+ if( $(this).is(":checked") && ! confirm(<?php echo json_encode( sprintf( __( '%s: Selecting this option will make persistent changes to your database. Are you sure you want to enable it?', 'disable-comments'), __( 'Warning', 'disable-comments' ) ) );?>) )
392
+ $(this).attr("checked", false );
393
+ });
394
+ });
395
+ </script>
396
+ <?php
397
+ }
398
+
399
+ private function enter_permanent_mode() {
400
+ $types = $this->options['disabled_post_types'];
401
+ if( empty( $types ) )
402
+ return;
403
+
404
+ global $wpdb;
405
+
406
+ if( $this->networkactive ) {
407
+ // NOTE: this can be slow on large networks!
408
+ $blogs = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND deleted = '0'", $wpdb->siteid ) );
409
+
410
+ foreach ( $blogs as $id ) {
411
+ switch_to_blog( $id );
412
+ $this->close_comments_in_db( $types );
413
+ restore_current_blog();
414
+ }
415
+ }
416
+ else {
417
+ $this->close_comments_in_db( $types );
418
+ }
419
+ }
420
+
421
+ private function close_comments_in_db( $types ){
422
+ global $wpdb;
423
+ $bits = implode( ', ', array_pad( array(), count( $types ), '%s' ) );
424
+ $wpdb->query( $wpdb->prepare( "UPDATE `$wpdb->posts` SET `comment_status` = 'closed', ping_status = 'closed' WHERE `post_type` IN ( $bits )", $types ) );
425
+ }
426
+
427
+ private function persistent_mode_allowed() {
428
+ return apply_filters( 'disable_comments_allow_persistent_mode', true );
429
+ }
430
+
431
+ function single_site_deactivate() {
432
+ // for single sites, delete the options upon deactivation, not uninstall
433
+ delete_option( 'disable_comments_options' );
434
+ }
435
+ }
436
+
437
+ new Disable_Comments();
languages/disable-comments-de_DE.mo ADDED
Binary file
languages/disable-comments-de_DE.po ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Disable Comments in German
2
+ # This file is distributed under the same license as the Disable Comments package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2013-12-20 07:54+0300\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: GlotPress/0.1\n"
11
+ "Project-Id-Version: Disable Comments\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+
16
+ #: disable-comments.php:358
17
+ msgid "%s: <strong>This will make persistent changes to your database &mdash; comments will remain closed even if you later disable the plugin!</strong> You should not use it if you only want to disable comments temporarily. Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting this option."
18
+ msgstr "%s: <strong>Dies wird bleibende Änderungen an Datenbank &mdash; Kommentaren vornehmen, die auch nach der Deaktivierung des Plugins bestehen bleiben!</strong> Nutze diese Option nicht, wenn du die Kommentare nur temporär deaktivieren willst. Bitte <a href=\"%s\" target=\"_blank\">lies die FAQs</a> bevor du diese Option nutzt."
19
+
20
+ msgid "http://wordpress.org/extend/plugins/disable-comments/"
21
+ msgstr "http://wordpress.org/extend/plugins/disable-comments/"
22
+
23
+ msgid "Samir Shah"
24
+ msgstr "Samir Shah"
25
+
26
+ msgid "http://rayofsolaris.net/"
27
+ msgstr "http://rayofsolaris.net/"
28
+
29
+ #: disable-comments.php:352
30
+ msgid "Other options"
31
+ msgstr "Weitere Optionen"
32
+
33
+ #: disable-comments.php:38
34
+ msgid "Disable Comments requires WordPress version %s or greater."
35
+ msgstr "Kommentare deaktivieren benötigt WordPress Version %s oder höher."
36
+
37
+ #: disable-comments.php:200
38
+ msgid "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."
39
+ msgstr "Anmerkung: Das <em>Kommentar deaktivieren</em>-Plugin ist aktiv und Kommentare sind für %s deaktiviert. Viele der Einstellungen unten lassen sich dadurch auf diesen Inhaltstyp nicht anwenden."
40
+
41
+ #: disable-comments.php:342
42
+ msgid "%s: This option is global and will affect your entire site. Use it only if you want to disable comments <em>everywhere</em>. A complete description of what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
43
+ msgstr "%s: Diese Option ist global und beeinflusst die gesamte Seite. Nutze diese nur, wenn du Kommentare <em>überall</em> deaktivieren willst. Eine ausführliche Beschreibung dieser Option ist <a href=\"%s\" target=\"_blank\">hier verfügbar (EN)</a>."
44
+
45
+ msgid "Allows administrators to globally disable comments on their site. Comments can be disabled according to post type."
46
+ msgstr "Ermöglicht es Administratoren Kommentare global auf der Seite zu deaktivieren. Kommentare können auch für bestimmte Inhaltstyp deaktiviert werden."
47
+
48
+ #: disable-comments.php:341
49
+ msgid "Disable all comment-related controls and settings in WordPress."
50
+ msgstr "Deaktiviere alle Kommentar-bezogenen Kontrollen und Einstellungen in WordPress."
51
+
52
+ #: disable-comments.php:342
53
+ #: disable-comments.php:358
54
+ #: disable-comments.php:360
55
+ #: disable-comments.php:385
56
+ msgid "Warning"
57
+ msgstr "Achtung"
58
+
59
+ #: disable-comments.php:344
60
+ msgid "On certain post types"
61
+ msgstr "Für bestimmte Inhaltstypen"
62
+
63
+ #: disable-comments.php:349
64
+ msgid "Disabling comments will also disable trackbacks and pingbacks. All comment-related fields will also be hidden from the edit/quick-edit screens of the affected posts. These settings cannot be overridden for individual posts."
65
+ msgstr "Das Deaktivieren von Kommentaren deaktiviert auch Trackbacks und Pingbacks. Alle Kommentar-bezogenen Felder werden außerdem auf den Bearbeiten/QuickEdit-Seiten der Beiträge ausgeblendet. Diese Einstellungen können nicht für einzelne Beiträge überschrieben werden."
66
+
67
+ #: disable-comments.php:357
68
+ msgid "Use persistent mode"
69
+ msgstr "Persistent-Mode nutzen"
70
+
71
+ #: disable-comments.php:360
72
+ msgid "%s: Entering persistent mode on large multi-site networks requires a large number of database queries and can take a while. Use with caution!"
73
+ msgstr "%s: Persistent-Mode auf großen Multi-Site Netzwerken zu aktivieren hat eine große Anzahl von Datenbankzugriffen zur Folge und kann einige Zeit in Anspruch nehmen. Bitte mit Vorsicht nutzen!"
74
+
75
+ #: disable-comments.php:385
76
+ msgid "%s: Selecting this option will make persistent changes to your database. Are you sure you want to enable it?"
77
+ msgstr "%s: Die Wahl dieser Option hat permanente Änderungen in der Datenbank zur Folge. Bist du sicher, dass du sie aktivieren willst?"
78
+
79
+ #: disable-comments.php:220
80
+ msgid "The <em>Disable Comments</em> plugin is active, but isn't configured to do anything yet. Visit the <a href=\"%s\">configuration page</a> to choose which post types to disable comments on."
81
+ msgstr "Das <em>Kommentare deaktivieren</em>-Plugin ist aktiv aber noch nicht konfiguriert. Rufe die <a href=\"%s\">Einstellungsseite</a> um auszuwählen für welche Inhaltstypen Kommentare deaktiviert werden sollen."
82
+
83
+ #: disable-comments.php:288
84
+ #: disable-comments.php:332
85
+ msgid "Disable Comments"
86
+ msgstr "Kommentare deaktivieren"
87
+
88
+ #: disable-comments.php:326
89
+ msgid "Options updated. Changes to the Admin Menu and Admin Bar will not appear until you leave or reload this page."
90
+ msgstr "Änderungen übernommen. Veränderungen an Admin Menü und Admin Bar werden nicht sichtbar bevor du die Seite verlässt oder neu lädst."
91
+
92
+ #: disable-comments.php:335
93
+ msgid "<em>Disable Comments</em> is Network Activated. The settings below will affect <strong>all sites</strong> in this network."
94
+ msgstr "<em>Kommentare deaktivieren</em> ist für alle Seiten aktiviert. Die Einstellungen unten betreffen <strong>alle Seiten</strong> des Netzwerks."
95
+
96
+ #: disable-comments.php:337
97
+ msgid "It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below."
98
+ msgstr "Es scheint ein Caching/Performance-Plugin aktiv zu sein. Bitte leere den Cache des Plugins nach der Änderung der Optionen auf dieser Seite."
99
+
100
+ #: disable-comments.php:341
101
+ msgid "Everywhere"
102
+ msgstr "Überall"
103
+
languages/disable-comments-fr_FR.mo ADDED
Binary file
languages/disable-comments-fr_FR.po ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Disable Comments
2
+ # This file is distributed under the same license as the Disable Comments package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Disable Comments 0.9.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/disable-comments\n"
7
+ "POT-Creation-Date: 2013-06-19 05:01:50+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-12-06 12:06+0100\n"
12
+ "Last-Translator: \n"
13
+ "Language-Team: http://wptheme.fr/\n"
14
+ "X-Generator: Poedit 1.6\n"
15
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
16
+ "Language: fr_FR\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+
19
+ #: disable-comments.php:38
20
+ msgid "Disable Comments requires WordPress version %s or greater."
21
+ msgstr ""
22
+ "Le plugin Disable Comment nécessite la version %s de Wordpress ou une "
23
+ "version supérieure"
24
+
25
+ #: disable-comments.php:169
26
+ msgid ""
27
+ "Note: The <em>Disable Comments</em> plugin is currently active, and comments "
28
+ "are completely disabled on: %s. Many of the settings below will not be "
29
+ "applicable for those post types."
30
+ msgstr ""
31
+ "Info : Le plugin <em>Disable Comments</em> est actuellement actif et les "
32
+ "commentaires sont complétement désactivés sur %s. Bon nombre de ces réglages "
33
+ "ne seront pas applicables pour ce type d'articles. "
34
+
35
+ #: disable-comments.php:169
36
+ msgid ", "
37
+ msgstr ", "
38
+
39
+ #: disable-comments.php:183
40
+ msgid ""
41
+ "The <em>Disable Comments</em> plugin is active, but isn't configured to do "
42
+ "anything yet. Visit the <a href=\"%s\">configuration page</a> to choose "
43
+ "which post types to disable comments on."
44
+ msgstr ""
45
+ "Le plugin <em>Disable Comments</em> est activé mais pas encore configuré "
46
+ "pour fonctionner. Consultez la <a href=\"%s\"> page de configuration </a> "
47
+ "pour choisir le type d'articles et pages pour lesquels vous souhaitez "
48
+ "désactiver les commentaires. "
49
+
50
+ #: disable-comments.php:225 disable-comments.php:269
51
+ msgid "Disable Comments"
52
+ msgstr "Désactiver les commentaires"
53
+
54
+ #: disable-comments.php:262
55
+ msgid ""
56
+ "If a caching/performance plugin is active, please invalidate its cache to "
57
+ "ensure that changes are reflected immediately."
58
+ msgstr ""
59
+ "Si vous utilisez un plugin de cache, veuillez a vider le cache afin de "
60
+ "constater les changements apportés par Disable Comments. "
61
+
62
+ #: disable-comments.php:263
63
+ msgid ""
64
+ "Options updated. Changes to the Admin Menu and Admin Bar will not appear "
65
+ "until you leave or reload this page."
66
+ msgstr ""
67
+ "Options mise à jour. Les modifications du menu administrateur n'apparaitront "
68
+ "pas tant que vous n'aurez pas rechargé cette page. "
69
+
70
+ #: disable-comments.php:272
71
+ msgid ""
72
+ "<em>Disable Comments</em> is Network Activated. The settings below will "
73
+ "affect <strong>all sites</strong> in this network."
74
+ msgstr ""
75
+ "<em>Disable Comments</em>est activé sur un réseau. Les modifications ci-"
76
+ "dessous affecteront <strong>tous les sites du réseau</strong>"
77
+
78
+ #: disable-comments.php:274
79
+ msgid ""
80
+ "It seems that a caching/performance plugin is active on this site. Please "
81
+ "manually invalidate that plugin's cache after making any changes to the "
82
+ "settings below."
83
+ msgstr ""
84
+ "Il semblerait qu'un plugin de cache soit actif sur ce site. Veuillez vider à "
85
+ "la main le cache après toutes modifications dans les réglages ci-dessous. "
86
+
87
+ #: disable-comments.php:278
88
+ msgid "Everywhere"
89
+ msgstr "Partout"
90
+
91
+ #: disable-comments.php:278
92
+ msgid "Disable all comment-related controls and settings in WordPress."
93
+ msgstr "Désactiver tous les réglages relatifs aux commentaires dans Wordpress"
94
+
95
+ #: disable-comments.php:279
96
+ msgid ""
97
+ "%s: This option is global and will affect your entire site. Use it only if "
98
+ "you want to disable comments <em>everywhere</em>. A complete description of "
99
+ "what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
100
+ msgstr ""
101
+ "%s : Cette option affecte l'ensemble de votre site internet. Utilisez là si "
102
+ "vous souhaitez désactiver les commentaires sur <em>tout votre site. </em>. "
103
+ "Une documentation compète des options de ce plugin est <a href=\"%s\" target="
104
+ "\"_blank\">disponible ici </a>"
105
+
106
+ #: disable-comments.php:279 disable-comments.php:295 disable-comments.php:297
107
+ #: disable-comments.php:325
108
+ msgid "Warning"
109
+ msgstr "Attention"
110
+
111
+ #: disable-comments.php:281
112
+ msgid "On certain post types"
113
+ msgstr "Sur certains type de pages"
114
+
115
+ #: disable-comments.php:286
116
+ msgid ""
117
+ "Disabling comments will also disable trackbacks and pingbacks. All comment-"
118
+ "related fields will also be hidden from the edit/quick-edit screens of the "
119
+ "affected posts. These settings cannot be overridden for individual posts."
120
+ msgstr ""
121
+ "Désactiver les commentaires entraine une désactivation des trackbacks et "
122
+ "pingbacks. Tous les champs relatifs aux commentaires seront affectés. Ces "
123
+ "réglages ne pourront pas être choisi individuellement pour certains "
124
+ "articles. "
125
+
126
+ #: disable-comments.php:289
127
+ msgid "Other options"
128
+ msgstr "Autres options"
129
+
130
+ #: disable-comments.php:294
131
+ msgid "Use persistent mode"
132
+ msgstr "Utiliser le mode persistent"
133
+
134
+ #: disable-comments.php:295
135
+ msgid ""
136
+ "%s: <strong>This will make persistent changes to your database &mdash; "
137
+ "comments will remain closed even if you later disable the plugin!</strong> "
138
+ "You should not use it if you only want to disable comments temporarily. "
139
+ "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting "
140
+ "this option."
141
+ msgstr ""
142
+ "%s: <strong>Ceci fera des changements permanent à votre base de données. Les "
143
+ "commentaires seront désactivés même si vous supprimez ce plugin</strong> "
144
+ "Vous ne devez pas activer cette option si vous souhaitez désactiver les "
145
+ "commentaires de façon temporaire. Voir la <a href=\"%s\" target=\"_blank\"> "
146
+ "FAQ </a> avant de choisir cette option"
147
+
148
+ #: disable-comments.php:297
149
+ msgid ""
150
+ "%s: Entering persistent mode on large multi-site networks requires a large "
151
+ "number of database queries and can take a while. Use with caution!"
152
+ msgstr ""
153
+ "%s : Activer le mode persistent sur un réseau de sites nécessite de "
154
+ "nombreuses requetes à la base de données. Utilisez cette option avec "
155
+ "précaution. "
156
+
157
+ #: disable-comments.php:300
158
+ msgid ""
159
+ "Persistent mode has been manually disabled. See the <a href=\"%s\" target="
160
+ "\"_blank\">FAQ</a> for more information."
161
+ msgstr ""
162
+ "Le mode persistant a été désactivé de façon manuelle. Voir la <a href=\"%s\" "
163
+ "target=\"_blank\">FAQ</a>pour plus d'information."
164
+
165
+ #: disable-comments.php:305
166
+ msgid "Save Changes"
167
+ msgstr "Sauvegarder les modifications"
168
+
169
+ #: disable-comments.php:325
170
+ msgid ""
171
+ "%s: Selecting this option will make persistent changes to your database. Are "
172
+ "you sure you want to enable it?"
173
+ msgstr ""
174
+ "%s : Selectionner cette option fera des changements persistants sur votre "
175
+ "base de données. Etes-vous sur de vouloir l'activer ? "
languages/disable-comments-id_ID.mo ADDED
Binary file
languages/disable-comments-id_ID.po ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is distributed under the same license as the Disable Comments package.
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Disable Comments 0.9.1\n"
5
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/disable-comments\n"
6
+ "POT-Creation-Date: 2013-06-19 05:01:50+00:00\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "PO-Revision-Date: 2013-12-08 22:10+0800\n"
11
+ "Last-Translator: Nasrulhaq Muiz <nasrulhaq81@gmail.com>\n"
12
+ "Language-Team: Nasrulhaq Muiz <nasroel@al-badar.net>\n"
13
+ "Language: id_ID\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+
16
+ #: disable-comments.php:38
17
+ msgid "Disable Comments requires WordPress version %s or greater."
18
+ msgstr "Matikan Komentar membutuhkan versi WordPress %s atau lebih."
19
+
20
+ #: disable-comments.php:169
21
+ msgid ""
22
+ "Note: The <em>Disable Comments</em> plugin is currently active, and comments "
23
+ "are completely disabled on: %s. Many of the settings below will not be "
24
+ "applicable for those post types."
25
+ msgstr ""
26
+ "Catatan: Plugin <em>Matikan Komentar</> saat ini aktif, dan semua komentar "
27
+ "dimatikan pada: %s. Ragam pengaturan dibawah tidak dapat diterapkan tipe "
28
+ "posting tersebut. "
29
+
30
+ #: disable-comments.php:169
31
+ msgid ", "
32
+ msgstr ","
33
+
34
+ #: disable-comments.php:183
35
+ msgid ""
36
+ "The <em>Disable Comments</em> plugin is active, but isn't configured to do "
37
+ "anything yet. Visit the <a href=\"%s\">configuration page</a> to choose "
38
+ "which post types to disable comments on."
39
+ msgstr ""
40
+ "Plugin <em>Matikan Komentar</em> aktif, tapi belum diatur untuk melakukan "
41
+ "apapun. Kunjungi <a href=\"%s\">halaman konfigurasi</a> untuk memilih tipe "
42
+ "posting yang mana agar komentar yang dimatikan menyala."
43
+
44
+ #: disable-comments.php:225 disable-comments.php:269
45
+ msgid "Disable Comments"
46
+ msgstr "Matikan Komentar"
47
+
48
+ #: disable-comments.php:262
49
+ msgid ""
50
+ "If a caching/performance plugin is active, please invalidate its cache to "
51
+ "ensure that changes are reflected immediately."
52
+ msgstr ""
53
+ "Jika sebuah plugin caching / kinerja dalam keadaan aktif, silakan "
54
+ "membatalkan cache untuk memastikan bahwa perubahan tercermin segera."
55
+
56
+ #: disable-comments.php:263
57
+ msgid ""
58
+ "Options updated. Changes to the Admin Menu and Admin Bar will not appear "
59
+ "until you leave or reload this page."
60
+ msgstr ""
61
+ "Pilihan diperbarui. Perubahan pada Menu Admin dan Bilah Admin tidak akan "
62
+ "nampak hingga anda meninggalkan atau memuat ulang halaman ini"
63
+
64
+ #: disable-comments.php:272
65
+ msgid ""
66
+ "<em>Disable Comments</em> is Network Activated. The settings below will "
67
+ "affect <strong>all sites</strong> in this network."
68
+ msgstr ""
69
+ "<em>Disable Comments</em> adalah Jaringan Diaktifkan. Pengaturan di bawah "
70
+ "ini akan mempengaruhi<strong>semua situs</strong> dalam jaringan ini."
71
+
72
+ #: disable-comments.php:274
73
+ msgid ""
74
+ "It seems that a caching/performance plugin is active on this site. Please "
75
+ "manually invalidate that plugin's cache after making any changes to the "
76
+ "settings below."
77
+ msgstr ""
78
+ "Tampaknya plugin caching / kinerja aktif di situs ini. Harap membatalkan "
79
+ "cache plugin secara manual setelah membuat perubahan apapun untuk pengaturan "
80
+ "di bawah ini."
81
+
82
+ #: disable-comments.php:278
83
+ msgid "Everywhere"
84
+ msgstr "Di mana-mana"
85
+
86
+ #: disable-comments.php:278
87
+ msgid "Disable all comment-related controls and settings in WordPress."
88
+ msgstr ""
89
+ "Menonaktifkan semua kontrol-komentar terkait dan pengaturan dalam WordPress."
90
+
91
+ #: disable-comments.php:279
92
+ msgid ""
93
+ "%s: This option is global and will affect your entire site. Use it only if "
94
+ "you want to disable comments <em>everywhere</em>. A complete description of "
95
+ "what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
96
+ msgstr ""
97
+ "Pilihan ini global dan akan mempengaruhi seluruh situs Anda. Gunakan hanya "
98
+ "jika Anda ingin menonaktifkan komentar <em>mana-mana</em>. Penjelasan "
99
+ "lengkap tentang apa pilihan yang dilakukan adalah <a href=\"%s\" target="
100
+ "\"_blank\">tersedia disini</a>"
101
+
102
+ #: disable-comments.php:279 disable-comments.php:295 disable-comments.php:297
103
+ #: disable-comments.php:325
104
+ msgid "Warning"
105
+ msgstr "Peringatan"
106
+
107
+ #: disable-comments.php:281
108
+ msgid "On certain post types"
109
+ msgstr "Pada jenis pos tertentu"
110
+
111
+ #: disable-comments.php:286
112
+ msgid ""
113
+ "Disabling comments will also disable trackbacks and pingbacks. All comment-"
114
+ "related fields will also be hidden from the edit/quick-edit screens of the "
115
+ "affected posts. These settings cannot be overridden for individual posts."
116
+ msgstr ""
117
+ "Menonaktifkan komentar juga akan menonaktifkan trackbacks dan pingbacks. "
118
+ "Semua bidang-komentar terkait juga akan disembunyikan dari edit / cepat-"
119
+ "mengedit layar dari tulisan terpengaruh. Pengaturan ini tidak dapat diganti "
120
+ "untuk setiap posting."
121
+
122
+ #: disable-comments.php:289
123
+ msgid "Other options"
124
+ msgstr "Pilihan lainnya"
125
+
126
+ #: disable-comments.php:294
127
+ msgid "Use persistent mode"
128
+ msgstr "Gunakan mode Tetap"
129
+
130
+ #: disable-comments.php:295
131
+ msgid ""
132
+ "%s: <strong>This will make persistent changes to your database &mdash; "
133
+ "comments will remain closed even if you later disable the plugin!</strong> "
134
+ "You should not use it if you only want to disable comments temporarily. "
135
+ "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting "
136
+ "this option."
137
+ msgstr ""
138
+ "%s: <strong> Ini akan membuat perubahan tetap pada basis data &mdash; anda, "
139
+ "komentar akan dikeluarkan walaupun kemudian akan menonaktifkan plugin!</"
140
+ "strong> Anda seharusnya tidak menggunakan jika hanya menonaktifkan komentar "
141
+ "sementara waktu. Harap <a href=\"%s\" target=\"_blank\">baca FAQ</a> sebelum "
142
+ "menentukan pilihan."
143
+
144
+ #: disable-comments.php:297
145
+ msgid ""
146
+ "%s: Entering persistent mode on large multi-site networks requires a large "
147
+ "number of database queries and can take a while. Use with caution!"
148
+ msgstr ""
149
+ "%s: Memasukkan mode tetap pada jaringan multi situs yang lebih besar "
150
+ "membutuhkan sejumlah besar kueri basis data dan membutuhkan beberapa waktu. "
151
+ "Gunakan dengan seksama! "
152
+
153
+ #: disable-comments.php:300
154
+ msgid ""
155
+ "Persistent mode has been manually disabled. See the <a href=\"%s\" target="
156
+ "\"_blank\">FAQ</a> for more information."
157
+ msgstr ""
158
+ "Mode Tetap telah diaktifkan secara manual, Lihat <a href=\"%s\" target="
159
+ "\"_blank\">FAQ</a> untuk informasi lebih lanjut."
160
+
161
+ #: disable-comments.php:305
162
+ msgid "Save Changes"
163
+ msgstr "Simpan Perubahan"
164
+
165
+ #: disable-comments.php:325
166
+ msgid ""
167
+ "%s: Selecting this option will make persistent changes to your database. Are "
168
+ "you sure you want to enable it?"
169
+ msgstr ""
170
+ "%s: Memilih opsi ini akan membuat perubahan yang tetap pada basis data anda. "
171
+ "Apakah anda yakin mengaktifkannnya?"
languages/disable-comments-ru_RU.mo ADDED
Binary file
languages/disable-comments-ru_RU.po ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Disable Comments in Russian
2
+ # This file is distributed under the same license as the Disable Comments package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Disable Comments\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/disable-comments\n"
7
+ "POT-Creation-Date: 2013-06-19 05:01:50+00:00\n"
8
+ "PO-Revision-Date: 2014-01-08 01:28+0400\n"
9
+ "Last-Translator: Elvis TEAM <elviswebteam@gmail.com>\n"
10
+ "Language-Team: Elvis WT <elviswebteam@gmail.com>\n"
11
+ "Language: ru\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
16
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
17
+ "X-Generator: Poedit 1.6.3\n"
18
+
19
+ #: disable-comments.php:38
20
+ msgid "Disable Comments requires WordPress version %s or greater."
21
+ msgstr "Для работы плагина требуется WordPress версии %s или выше."
22
+
23
+ #: disable-comments.php:169
24
+ 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
+ "отключены: %s. Настройки ниже неприменимы к указанным ранее типам записей."
31
+
32
+ #: disable-comments.php:169
33
+ msgid ", "
34
+ msgstr ","
35
+
36
+ #: disable-comments.php:183
37
+ msgid ""
38
+ "The <em>Disable Comments</em> plugin is active, but isn't configured to do "
39
+ "anything yet. Visit the <a href=\"%s\">configuration page</a> to choose "
40
+ "which post types to disable comments on."
41
+ msgstr ""
42
+ "Плагин активирован, но еще не настроен. Чтобы сделать это, перейдите на <a "
43
+ "href=\"%s\">страницу настроек</a>. Там можно задать типы записей, для "
44
+ "которых будут отключены комментарии."
45
+
46
+ #: disable-comments.php:225 disable-comments.php:269
47
+ msgid "Disable Comments"
48
+ msgstr "Откл. комментарии"
49
+
50
+ #: disable-comments.php:262
51
+ msgid ""
52
+ "If a caching/performance plugin is active, please invalidate its cache to "
53
+ "ensure that changes are reflected immediately."
54
+ msgstr ""
55
+ "Если плагин для кэширования или ускорения блога включен, не забудьте "
56
+ "очистить кэш сразу после изменения настроек, чтобы они вступили в силу."
57
+
58
+ #: disable-comments.php:263
59
+ msgid ""
60
+ "Options updated. Changes to the Admin Menu and Admin Bar will not appear "
61
+ "until you leave or reload this page."
62
+ msgstr ""
63
+ "Настройки обновлены. Изменения панели и меню администратора вступят в силу "
64
+ "только после обновления страницы."
65
+
66
+ #: disable-comments.php:272
67
+ msgid ""
68
+ "<em>Disable Comments</em> is Network Activated. The settings below will "
69
+ "affect <strong>all sites</strong> in this network."
70
+ msgstr ""
71
+ "Плагин работает в режиме сети. Измененные ниже настройки повлияют на "
72
+ "<strong>все блоги</strong> данной сети."
73
+
74
+ #: disable-comments.php:274
75
+ msgid ""
76
+ "It seems that a caching/performance plugin is active on this site. Please "
77
+ "manually invalidate that plugin's cache after making any changes to the "
78
+ "settings below."
79
+ msgstr ""
80
+ "Похоже, Вы используете плагин для кэширования или ускорения блога. Не "
81
+ "забудьте после изменения любых настроек очистить кэш вручную!"
82
+
83
+ #: disable-comments.php:278
84
+ msgid "Everywhere"
85
+ msgstr "Везде"
86
+
87
+ #: disable-comments.php:278
88
+ msgid "Disable all comment-related controls and settings in WordPress."
89
+ msgstr ""
90
+ "Отключить все параметры и настройки WordPress, связанные с управлением "
91
+ "комментариями."
92
+
93
+ #: disable-comments.php:279
94
+ msgid ""
95
+ "%s: This option is global and will affect your entire site. Use it only if "
96
+ "you want to disable comments <em>everywhere</em>. A complete description of "
97
+ "what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
98
+ msgstr ""
99
+ "%s: Эта опция имеет глобальное значение и будет применена даже к Вашему "
100
+ "сайту. Используйте только если хотите отключить комментарии <em>везде</em>. "
101
+ "Полное описание опции можно найти <a href=\"%s\" target=\"_blank\">здесь</a>."
102
+
103
+ #: disable-comments.php:279 disable-comments.php:295 disable-comments.php:297
104
+ #: disable-comments.php:325
105
+ msgid "Warning"
106
+ msgstr "Внимание"
107
+
108
+ #: disable-comments.php:281
109
+ msgid "On certain post types"
110
+ msgstr "Для типов записей"
111
+
112
+ #: disable-comments.php:286
113
+ msgid ""
114
+ "Disabling comments will also disable trackbacks and pingbacks. All comment-"
115
+ "related fields will also be hidden from the edit/quick-edit screens of the "
116
+ "affected posts. These settings cannot be overridden for individual posts."
117
+ msgstr ""
118
+ "При использовании плагина будут также отключены трекбэки и пингбэки. Все "
119
+ "относящиеся к комментированию поля будут скрыты (для выбранных типов "
120
+ "записей). Эти настройки вступают в силу для ВСЕХ записей указанного типа, "
121
+ "без исключений."
122
+
123
+ #: disable-comments.php:289
124
+ msgid "Other options"
125
+ msgstr "Другие настройки"
126
+
127
+ #: disable-comments.php:294
128
+ msgid "Use persistent mode"
129
+ msgstr "Использовать \"живое\" сохранение"
130
+
131
+ #: disable-comments.php:295
132
+ msgid ""
133
+ "%s: <strong>This will make persistent changes to your database &mdash; "
134
+ "comments will remain closed even if you later disable the plugin!</strong> "
135
+ "You should not use it if you only want to disable comments temporarily. "
136
+ "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting "
137
+ "this option."
138
+ msgstr ""
139
+ "%s: <strong>Включение опции позволит записывать изменения в \"живом\" режиме "
140
+ "в базу данных &mdash; а комментарии будут отключены даже после деактивации "
141
+ "плагина!</strong> Не стоит использовать опцию, если не хотите надолго "
142
+ "отключить все комментарии. Прежде всего, <a href=\"%s\" target=\"_blank"
143
+ "\">прочитайте внимательно FAQ</a>."
144
+
145
+ #: disable-comments.php:297
146
+ msgid ""
147
+ "%s: Entering persistent mode on large multi-site networks requires a large "
148
+ "number of database queries and can take a while. Use with caution!"
149
+ msgstr ""
150
+ "%s: Включение \"живого\" режима на больших мультиблоговых сайтах сильно "
151
+ "нагружает базу данных запросами. Использовать осторожно!"
152
+
153
+ #: disable-comments.php:300
154
+ msgid ""
155
+ "Persistent mode has been manually disabled. See the <a href=\"%s\" target="
156
+ "\"_blank\">FAQ</a> for more information."
157
+ msgstr ""
158
+ "Режим \"живого\" сохранения был отключен вручную. Подробнее читайте <a href="
159
+ "\"%s\" target=\"_blank\">FAQ</a>."
160
+
161
+ #: disable-comments.php:305
162
+ msgid "Save Changes"
163
+ msgstr "Сохранить изменения"
164
+
165
+ #: disable-comments.php:325
166
+ msgid ""
167
+ "%s: Selecting this option will make persistent changes to your database. Are "
168
+ "you sure you want to enable it?"
169
+ msgstr ""
170
+ "%s: При включении этой опции все изменения будут заноситься в базу данных. "
171
+ "Вы уверены, что хотите включить опцию?"
172
+
173
+ #~ msgid ""
174
+ #~ "Allows administrators to globally disable comments on their site. "
175
+ #~ "Comments can be disabled according to post type."
176
+ #~ msgstr ""
177
+ #~ "Позволяет администраторам сайтов вручную отключать комментарии на своих "
178
+ #~ "блогах. Комментарии отключаются для указанных типов записей."
languages/disable-comments-vi_VI.mo ADDED
Binary file
languages/disable-comments-vi_VI.po ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Disable Comments
2
+ # This file is distributed under the same license as the Disable Comments package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Disable Comments 0.9.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/disable-comments\n"
7
+ "POT-Creation-Date: 2013-06-19 05:01:50+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-01-13 23:54+0700\n"
12
+ "Last-Translator: Vietnamese WPress-based blog | http://rongsay.info "
13
+ "<me@rongsay.info>\n"
14
+ "Language-Team: Vietnamese WPress-based blog | http://rongsay.info "
15
+ "<me@rongsay.info>\n"
16
+ "X-Generator: Poedit 1.5.7\n"
17
+
18
+ #: disable-comments.php:38
19
+ msgid "Disable Comments requires WordPress version %s or greater."
20
+ msgstr "Vô hiệu hóa ý kiến yêu cầu phiên bản WordPress %s hoặc cao hơn."
21
+
22
+ #: disable-comments.php:169
23
+ msgid ""
24
+ "Note: The <em>Disable Comments</em> plugin is currently active, and comments "
25
+ "are completely disabled on: %s. Many of the settings below will not be "
26
+ "applicable for those post types."
27
+ msgstr ""
28
+ "Lưu ý: <em>Vô hiệu hóa ý kiến</em> hiện đang hoạt động, và ý kiến bị vô hiệu "
29
+ "hoá hoàn toàn ở các: %s. Nhiều trong số các cài đặt dưới đây sẽ không được "
30
+ "áp dụng cho những loại post type đó."
31
+
32
+ #: disable-comments.php:169
33
+ msgid ", "
34
+ msgstr ", "
35
+
36
+ #: disable-comments.php:183
37
+ msgid ""
38
+ "The <em>Disable Comments</em> plugin is active, but isn't configured to do "
39
+ "anything yet. Visit the <a href=\"%s\">configuration page</a> to choose "
40
+ "which post types to disable comments on."
41
+ msgstr ""
42
+ "<Em> vô hiệu hóa ý kiến </em> hoạt động, nhưng không cấu hình để làm bất cứ "
43
+ "điều gì được nêu ra. Truy cập vào các <a href=\"%s\"> Trang cấu hình </a> "
44
+ "chọn các post type cần vô hiệu hóa ý kiến."
45
+
46
+ #: disable-comments.php:225 disable-comments.php:269
47
+ msgid "Disable Comments"
48
+ msgstr "Vô hiệu hóa ý kiến"
49
+
50
+ #: disable-comments.php:262
51
+ msgid ""
52
+ "If a caching/performance plugin is active, please invalidate its cache to "
53
+ "ensure that changes are reflected immediately."
54
+ msgstr ""
55
+ "Nếu một plugin bộ nhớ đệm (cache) hoạt động, xin vui lòng tắt bộ nhớ cache "
56
+ "của nó để đảm bảo rằng những thay đổi được thi hành ngay lập tức."
57
+
58
+ #: disable-comments.php:263
59
+ msgid ""
60
+ "Options updated. Changes to the Admin Menu and Admin Bar will not appear "
61
+ "until you leave or reload this page."
62
+ msgstr ""
63
+ "Tùy chọn Cập Nhật. Thay đổi trình đơn Admin và Admin Bar sẽ không xuất hiện "
64
+ "cho đến khi bạn nạp lại trang này."
65
+
66
+ #: disable-comments.php:272
67
+ msgid ""
68
+ "<em>Disable Comments</em> is Network Activated. The settings below will "
69
+ "affect <strong>all sites</strong> in this network."
70
+ msgstr ""
71
+ "<em> vô hiệu hóa ý kiến </em> kích hoạt trong toàn Network. Thiết đặt dưới "
72
+ "đây sẽ ảnh hưởng đến Tất cả trang web trong mạng này."
73
+
74
+ #: disable-comments.php:274
75
+ msgid ""
76
+ "It seems that a caching/performance plugin is active on this site. Please "
77
+ "manually invalidate that plugin's cache after making any changes to the "
78
+ "settings below."
79
+ msgstr ""
80
+ "Có vẻ như một plugin bộ nhớ đệm/hiệu suất đang hoạt động trên trang web này. "
81
+ "Tắt bộ nhớ cache plugin đó sau khi thực hiện bất kỳ thay đổi các thiết đặt "
82
+ "dưới đây."
83
+
84
+ #: disable-comments.php:278
85
+ msgid "Everywhere"
86
+ msgstr "Ở mọi nơi"
87
+
88
+ #: disable-comments.php:278
89
+ msgid "Disable all comment-related controls and settings in WordPress."
90
+ msgstr ""
91
+ "Vô hiệu hoá tất cả các liên quan đến bình luận điều khiển và thiết lập trong "
92
+ "WordPress."
93
+
94
+ #: disable-comments.php:279
95
+ msgid ""
96
+ "%s: This option is global and will affect your entire site. Use it only if "
97
+ "you want to disable comments <em>everywhere</em>. A complete description of "
98
+ "what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
99
+ msgstr ""
100
+ "%s: Tùy chọn này là toàn cầu và sẽ ảnh hưởng đến toàn bộ trang web của bạn. "
101
+ "Sử dụng nó chỉ nếu bạn muốn vô hiệu hóa ý kiến <em> ở khắp mọi nơi </em>. "
102
+ "Một mô tả đầy đủ về những gì tùy chọn này hiện <a href =\"%s\" target="
103
+ "\"_blank\"> có sẵn ở đây </a>."
104
+
105
+ #: disable-comments.php:279 disable-comments.php:295 disable-comments.php:297
106
+ #: disable-comments.php:325
107
+ msgid "Warning"
108
+ msgstr "Cảnh báo"
109
+
110
+ #: disable-comments.php:281
111
+ msgid "On certain post types"
112
+ msgstr "Trên một số loại post type"
113
+
114
+ #: disable-comments.php:286
115
+ msgid ""
116
+ "Disabling comments will also disable trackbacks and pingbacks. All comment-"
117
+ "related fields will also be hidden from the edit/quick-edit screens of the "
118
+ "affected posts. These settings cannot be overridden for individual posts."
119
+ msgstr ""
120
+ "Vô hiệu hóa ý kiến cũng vô hiệu hóa trackbacks và pingbacks. Tất cả các lĩnh "
121
+ "vực liên quan đến bình luận cũng sẽ được ẩn từ màn hình chỉnh sửa/nhanh "
122
+ "chóng-chỉnh sửa các bài viết bị ảnh hưởng. Các thiết đặt này không thể được "
123
+ "ghi đè cho bài đăng riêng lẻ."
124
+
125
+ #: disable-comments.php:289
126
+ msgid "Other options"
127
+ msgstr "Lựa chọn khác"
128
+
129
+ #: disable-comments.php:294
130
+ msgid "Use persistent mode"
131
+ msgstr "Sử dụng chế độ liên tục"
132
+
133
+ #: disable-comments.php:295
134
+ msgid ""
135
+ "%s: <strong>This will make persistent changes to your database &mdash; "
136
+ "comments will remain closed even if you later disable the plugin!</strong> "
137
+ "You should not use it if you only want to disable comments temporarily. "
138
+ "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting "
139
+ "this option."
140
+ msgstr ""
141
+ "%s: Điều này sẽ làm thay đổi liên tục cơ sở dữ liệu của bạn & mdash; ý kiến "
142
+ "sẽ vẫn đóng ngay cả khi bạn vô hiệu hóa plugin! Bạn không nên sử dụng nếu "
143
+ "bạn chỉ muốn vô hiệu hóa ý kiến tạm thời. Xin vui lòng <a href =\"%s\" "
144
+ "target=\"_blank\"> đọc FAQ </a> trước khi chọn tùy chọn này."
145
+
146
+ #: disable-comments.php:297
147
+ msgid ""
148
+ "%s: Entering persistent mode on large multi-site networks requires a large "
149
+ "number of database queries and can take a while. Use with caution!"
150
+ msgstr ""
151
+ "%s: Nhập chế độ liên tục trên nhiều trang web lớn đòi hỏi một số lượng truy "
152
+ "vấn cơ sở dữ liệu lớn và có thể mất một lúc. Sử dụng thận trọng!"
153
+
154
+ #: disable-comments.php:300
155
+ msgid ""
156
+ "Persistent mode has been manually disabled. See the <a href=\"%s\" target="
157
+ "\"_blank\">FAQ</a> for more information."
158
+ msgstr ""
159
+ "Chế độ liên tục đã bị vô hiệu theo cách thủ công. Xem các <a href = \"%s\" "
160
+ "target=\"_blank\"> FAQ </a> cho biết thêm thông tin."
161
+
162
+ #: disable-comments.php:305
163
+ msgid "Save Changes"
164
+ msgstr "Lưu thay đổi"
165
+
166
+ #: disable-comments.php:325
167
+ msgid ""
168
+ "%s: Selecting this option will make persistent changes to your database. Are "
169
+ "you sure you want to enable it?"
170
+ msgstr ""
171
+ "%s: Chọn tùy chọn này sẽ thực hiện liên tục thay đổi cơ sở dữ liệu của bạn. "
172
+ "Bạn có chắc bạn muốn bật nó?"
languages/disable-comments.pot ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Disable Comments
2
+ # This file is distributed under the same license as the Disable Comments package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Disable Comments 0.9.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/disable-comments\n"
7
+ "POT-Creation-Date: 2013-06-19 05:01:50+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: disable-comments.php:38
16
+ msgid "Disable Comments requires WordPress version %s or greater."
17
+ msgstr ""
18
+
19
+ #: disable-comments.php:169
20
+ msgid "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."
21
+ msgstr ""
22
+
23
+ #: disable-comments.php:169
24
+ msgid ", "
25
+ msgstr ""
26
+
27
+ #: disable-comments.php:183
28
+ msgid "The <em>Disable Comments</em> plugin is active, but isn't configured to do anything yet. Visit the <a href=\"%s\">configuration page</a> to choose which post types to disable comments on."
29
+ msgstr ""
30
+
31
+ #: disable-comments.php:225 disable-comments.php:269
32
+ msgid "Disable Comments"
33
+ msgstr ""
34
+
35
+ #: disable-comments.php:262
36
+ msgid "If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately."
37
+ msgstr ""
38
+
39
+ #: disable-comments.php:263
40
+ msgid "Options updated. Changes to the Admin Menu and Admin Bar will not appear until you leave or reload this page."
41
+ msgstr ""
42
+
43
+ #: disable-comments.php:272
44
+ msgid "<em>Disable Comments</em> is Network Activated. The settings below will affect <strong>all sites</strong> in this network."
45
+ msgstr ""
46
+
47
+ #: disable-comments.php:274
48
+ msgid "It seems that a caching/performance plugin is active on this site. Please manually invalidate that plugin's cache after making any changes to the settings below."
49
+ msgstr ""
50
+
51
+ #: disable-comments.php:278
52
+ msgid "Everywhere"
53
+ msgstr ""
54
+
55
+ #: disable-comments.php:278
56
+ msgid "Disable all comment-related controls and settings in WordPress."
57
+ msgstr ""
58
+
59
+ #: disable-comments.php:279
60
+ msgid "%s: This option is global and will affect your entire site. Use it only if you want to disable comments <em>everywhere</em>. A complete description of what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
61
+ msgstr ""
62
+
63
+ #: disable-comments.php:279 disable-comments.php:295 disable-comments.php:297
64
+ #: disable-comments.php:325
65
+ msgid "Warning"
66
+ msgstr ""
67
+
68
+ #: disable-comments.php:281
69
+ msgid "On certain post types"
70
+ msgstr ""
71
+
72
+ #: disable-comments.php:286
73
+ msgid "Disabling comments will also disable trackbacks and pingbacks. All comment-related fields will also be hidden from the edit/quick-edit screens of the affected posts. These settings cannot be overridden for individual posts."
74
+ msgstr ""
75
+
76
+ #: disable-comments.php:289
77
+ msgid "Other options"
78
+ msgstr ""
79
+
80
+ #: disable-comments.php:294
81
+ msgid "Use persistent mode"
82
+ msgstr ""
83
+
84
+ #: disable-comments.php:295
85
+ msgid "%s: <strong>This will make persistent changes to your database &mdash; comments will remain closed even if you later disable the plugin!</strong> You should not use it if you only want to disable comments temporarily. Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting this option."
86
+ msgstr ""
87
+
88
+ #: disable-comments.php:297
89
+ msgid "%s: Entering persistent mode on large multi-site networks requires a large number of database queries and can take a while. Use with caution!"
90
+ msgstr ""
91
+
92
+ #: disable-comments.php:300
93
+ msgid "Persistent mode has been manually disabled. See the <a href=\"%s\" target=\"_blank\">FAQ</a> for more information."
94
+ msgstr ""
95
+
96
+ #: disable-comments.php:305
97
+ msgid "Save Changes"
98
+ msgstr ""
99
+
100
+ #: disable-comments.php:325
101
+ msgid "%s: Selecting this option will make persistent changes to your database. Are you sure you want to enable it?"
102
+ msgstr ""
readme.txt ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Disable Comments ===
2
+ Contributors: solarissmoke
3
+ Donate link: http://rayofsolaris.net/donate.php
4
+ Tags: comments, disable, global
5
+ Requires at least: 3.5
6
+ Tested up to: 3.9
7
+ Stable tag: trunk
8
+
9
+ Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. Multisite friendly.
10
+
11
+ == Description ==
12
+
13
+ This plugin allows administrators to globally disable comments on any post type (posts, pages, attachments, etc.) so that these settings cannot be overridden for individual posts. It also removes all comment-related fields from edit and quick-edit screens. On multisite installations, it can be used to disable comments on the entire network.
14
+
15
+ Additionally, comment-related items can be removed from the Dashboard, Widgets, the Admin Menu and the Admin Bar.
16
+
17
+ **Important note**: Use this plugin if you don't want comments at all on your site (or on certain post types). Don't use it if you want to selectively disable comments on individual posts - WordPress lets you do that anyway. If you don't know how to disable comments on individual posts, there are instructions in [the FAQ](http://wordpress.org/extend/plugins/disable-comments/faq/).
18
+
19
+ If you come across any bugs or have suggestions, please use the plugin support forum or contact me at [rayofsolaris.net](http://rayofsolaris.net). I can't fix it if I don't know it's broken! Please check the [FAQ](http://wordpress.org/extend/plugins/disable-comments/faq/) for common issues.
20
+
21
+ Want to contribute? Here's the [GitHub development repository](https://github.com/solarissmoke/disable-comments).
22
+
23
+ Thanks to the following people for contributing translations of this plugin: French - [Murat](http://wptheme.fr), German - [Christian Foellmann](http://foe-services.de), Indonesian - [Nasrulhaq Muiz](http://al-badar.net), Russian - [Elvis](http://turkenichev.ru), Vietamese - Rong Say.
24
+
25
+ == Frequently Asked Questions ==
26
+
27
+ = What is "persistent mode"? =
28
+
29
+ By default, the plugin does not make any persistent changes to your posts - it just dynamically closes comments on them. This means that you can use the plugin temporarily and restore comment statuses when you disable it. If the plugin works in this mode, then I recommend that you don't use persistent mode.
30
+
31
+ Unfortunately some themes do not properly check the comment status of posts, and the plugin in default mode will have no effect with them (comments will still appear to be open). To fix this, switch to persistent mode. Note however that this will make persistent changes: **comments will remain closed even if you later disable the plugin** (you can always reopen them manually, of course).
32
+
33
+ **I repeat, using persistent mode will make changes to your database. DO NOT USE IT IF YOU WANT TO DISABLE COMMENTS TEMPORARILY.**
34
+
35
+ **Administrators**: If you want to prevent persistent mode from being used by mistake, hook into the `disable_comments_allow_persistent_mode` filter and return `false`. This will prevent the option from being available on the settings page.
36
+
37
+ = Nothing happens after I disable comments on all posts - comment forms still appear when I view my posts. =
38
+
39
+ This is because your theme is not checking the comment status of posts in the correct way. The solution is to switch the plugin to persistent mode (the last option on the plugin settings page).
40
+
41
+ You may like to point your theme's author to [this explanation](http://rayofsolaris.net/blog/2012/how-to-check-if-comments-are-allowed-in-wordpress) of what they are doing wrong, and how to fix it.
42
+
43
+ = How can I remove the text that says "comments are closed" at the bottom of articles where comments are disabled? =
44
+
45
+ The plugin tries its very best to hide this (and any other comment-related) messages.
46
+
47
+ If you still see the message, then it means your theme is overriding this behaviour, and you will have to edit its files manually to remove it. Two common approaches are to either delete or comment out the relevant lines in `wp-content/your-theme/comments.php`, or to add a declaration to `wp-content/your-theme/style.css` that hides the message from your visitors. In either case, make you you know what you are doing!
48
+
49
+ = I only want to disable comments on certain posts, not globally. What do I do? =
50
+
51
+ For starters, don't install this plugin!
52
+
53
+ Go to the edit page for the post you want to disable comments on. Scroll down to the "Discussion" box, where you will find the comment options for that post. If you don't see a "Discussion" box, then click on "Screen Options" at the top of your screen, and make sure the "Discussion" checkbox is checked.
54
+
55
+ You can also bulk-edit the comment status of multiple posts from the [posts screen](http://codex.wordpress.org/Posts_Screen).
56
+
57
+ = Why is persistent mode disabled? =
58
+
59
+ Someone (probably your site administrator) has chosen to disable this option. See "What is persistent mode?" above.
60
+
61
+ == Details ==
62
+
63
+ The plugin provides the option to **completely disable the commenting feature in WordPress**. When this option is selected, the following changes are made:
64
+
65
+ * All "Comments" links are hidden from the Admin Menu and Admin Bar;
66
+ * All comment-related sections ("Recent Comments", "Discussion" etc.) are hidden from the WordPress Dashboard;
67
+ * All comment-related widgets are disabled (so your theme cannot use them);
68
+ * The "Discussion" settings page is hidden;
69
+ * All comment RSS/Atom feeds are disabled (and requests for these will be redirected to the parent post);
70
+ * The X-Pingback HTTP header is removed from all pages;
71
+ * Outgoing pingbacks are disabled.
72
+
73
+ **Please delete any existing comments on your site before applying this setting, otherwise (depending on your theme) those comments may still be displayed to visitors.**
74
+
75
+ == Changelog ==
76
+
77
+ = 1.1 =
78
+ * Attempt to hide the comments template ("Comments are closed") whenever comments are disabled.
79
+
80
+ = 1.0.4 =
81
+ * Fix CSRF vulnerability in the admin. Thanks to dxw for responsible disclosure.
82
+
83
+ = 1.0.3 =
84
+ * Compatibility fix for WordPress 3.8
85
+
86
+ = 1.0.2 =
87
+ * Disable comment-reply script for themes that don't check comment status properly.
88
+ * Add French translation
89
+
90
+ = 1.0.1 =
91
+ * Fix issue with settings persistence in single-site installations.
92
+
93
+ = 1.0 =
94
+ * Prevent theme comments template from being displayed when comments are disabled everywhere.
95
+ * Prevent direct access to comment admin pages when comments are disabled everywhere.
96
+
97
+ = 0.9.2 =
98
+ * Make persistent mode option filter available all the time.
99
+ * Fix redirection for feed requests
100
+ * Fix admin bar filtering in WP 3.6
101
+
102
+ = 0.9.1 =
103
+ * Short life in the wild.
104
+
105
+ = 0.9 =
106
+ * Added gettext support and German translation.
107
+ * Added links to GitHub development repo.
108
+ * Allow network administrators to prevent the use of persistent mode.
109
+
110
+ = 0.8 =
111
+ * Remove X-Pingback header when comments are completely disabled.
112
+ * Disable comment feeds when comment are completely disabled.
113
+ * Simplified settings page.
114
+
115
+ = 0.7 =
116
+ * Now supports Network Activation - disable comments on your entire multi-site network.
117
+ * Simplified settings page.
118
+
119
+ = 0.6 =
120
+ * Add "persistent mode" to deal with themes that don't use filterable comment status checking.
121
+
122
+ = 0.5 =
123
+ * Allow temporary disabling of comments site-wide by ensuring that original comment statuses are not overwritten when a post is edited.
124
+
125
+ = 0.4 =
126
+ * Added the option to disable the Recent Comments template widget.
127
+ * Bugfix: don't show admin messages to users who don't can't do anything about them.
128
+
129
+ = 0.3.5 =
130
+ * Bugfix: Other admin menu items could inadvertently be hidden when 'Remove the "Comments" link from the Admin Menu' was selected.
131
+
132
+ = 0.3.4 =
133
+ * Bugfix: A typo on the settings page meant that the submit button went missing on some browsers. Thanks to Wojtek for reporting this.
134
+
135
+ = 0.3.3 =
136
+ * Bugfix: Custom post types which don't support comments shouldn't appear on the settings page
137
+ * Add warning notice to Discussion settings when comments are disabled
138
+
139
+ = 0.3.2 =
140
+ * Bugfix: Some dashboard items were incorrectly hidden in multisite
141
+
142
+ = 0.3.1 =
143
+ * Compatibility fix for WordPress 3.3
144
+
145
+ = 0.3 =
146
+ * Added the ability to remove links to comment admin pages from the Dashboard, Admin Bar and Admin Menu
147
+
148
+ = 0.2.1 =
149
+ * Usability improvements to help first-time users configure the plugin.
150
+
151
+ = 0.2 =
152
+ * Bugfix: Make sure pingbacks are also prevented when comments are disabled.
153
+
154
+ == Installation ==
155
+
156
+ 1. Upload the plugin folder to the `/wp-content/plugins/` directory
157
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
158
+ 3. The plugin settings can be accessed via the 'Settings' menu in the administration area (either your site administration for single-site installs, or your network administration for network installs).
uninstall.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ if( !defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN') )
3
+ exit;
4
+
5
+ delete_site_option( 'disable_comments_options' );