Disable Comments - Version 1.3

Version Description

  • Move persistent mode filter into a define.
  • Add an advanced option to show the theme's comment template even when comments are disabled.
Download this release

Release Info

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

Code changes from version 1.2 to 1.3

disable-comments.php CHANGED
@@ -3,7 +3,7 @@
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.2
7
  Author: Samir Shah
8
  Author URI: http://rayofsolaris.net/
9
  License: GPL2
@@ -16,11 +16,20 @@ if( !defined( 'ABSPATH' ) )
16
 
17
  class Disable_Comments {
18
  const db_version = 6;
 
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__ ), (array) get_site_option( 'active_sitewide_plugins' ) ) );
26
 
@@ -139,8 +148,10 @@ class Disable_Comments {
139
 
140
  function check_comment_template() {
141
  if( is_singular() && ( $this->options['remove_everywhere'] || $this->is_post_type_disabled( get_post_type() ) ) ) {
142
- // Kill the comments template. This will deal with themes that don't check comment stati properly!
143
- add_filter( 'comments_template', array( $this, 'dummy_comments_template' ), 20 );
 
 
144
  // Remove comment-reply script for themes that include it indiscriminately
145
  wp_deregister_script( 'comment-reply' );
146
  // feed_links_extra inserts a comments RSS link
@@ -371,19 +382,21 @@ jQuery(document).ready(function($){
371
  <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>
372
  </li>
373
  </ul>
 
 
374
  <h3><?php _e( 'Other options', 'disable-comments') ?></h3>
375
  <ul>
376
  <li>
377
  <?php
378
- if( $persistent_allowed ) {
379
- 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>';
380
- 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>';
381
- if( $this->networkactive )
382
- 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>';
383
- }
384
  ?>
385
  </li>
386
  </ul>
 
 
387
  <?php wp_nonce_field( 'disable-comments-admin' ); ?>
388
  <p class="submit"><input class="button-primary" type="submit" name="submit" value="<?php _e( 'Save Changes') ?>"></p>
389
  </form>
@@ -443,6 +456,10 @@ jQuery(document).ready(function($){
443
  }
444
 
445
  private function persistent_mode_allowed() {
 
 
 
 
446
  return apply_filters( 'disable_comments_allow_persistent_mode', true );
447
  }
448
 
@@ -470,4 +487,4 @@ jQuery(document).ready(function($){
470
  }
471
  }
472
 
473
- new Disable_Comments();
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.3
7
  Author: Samir Shah
8
  Author URI: http://rayofsolaris.net/
9
  License: GPL2
16
 
17
  class Disable_Comments {
18
  const db_version = 6;
19
+ private static $instance = null;
20
  private $options;
21
  private $networkactive;
22
  private $modified_types = array();
23
 
24
+ public static function get_instance() {
25
+ if ( null == self::$instance ) {
26
+ self::$instance = new self;
27
+ }
28
+
29
+ return self::$instance;
30
+ }
31
+
32
+ private function __construct() {
33
  // are we network activated?
34
  $this->networkactive = ( is_multisite() && array_key_exists( plugin_basename( __FILE__ ), (array) get_site_option( 'active_sitewide_plugins' ) ) );
35
 
148
 
149
  function check_comment_template() {
150
  if( is_singular() && ( $this->options['remove_everywhere'] || $this->is_post_type_disabled( get_post_type() ) ) ) {
151
+ if( !defined( 'DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE' ) || DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE == true ) {
152
+ // Kill the comments template. This will deal with themes that don't check comment stati properly!
153
+ add_filter( 'comments_template', array( $this, 'dummy_comments_template' ), 20 );
154
+ }
155
  // Remove comment-reply script for themes that include it indiscriminately
156
  wp_deregister_script( 'comment-reply' );
157
  // feed_links_extra inserts a comments RSS link
382
  <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>
383
  </li>
384
  </ul>
385
+
386
+ <?php if( $persistent_allowed ): ?>
387
  <h3><?php _e( 'Other options', 'disable-comments') ?></h3>
388
  <ul>
389
  <li>
390
  <?php
391
+ 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>';
392
+ 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>';
393
+ if( $this->networkactive )
394
+ 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>';
 
 
395
  ?>
396
  </li>
397
  </ul>
398
+ <?php endif; ?>
399
+
400
  <?php wp_nonce_field( 'disable-comments-admin' ); ?>
401
  <p class="submit"><input class="button-primary" type="submit" name="submit" value="<?php _e( 'Save Changes') ?>"></p>
402
  </form>
456
  }
457
 
458
  private function persistent_mode_allowed() {
459
+ if( defined( 'DISABLE_COMMENTS_ALLOW_PERSISTENT_MODE' ) && DISABLE_COMMENTS_ALLOW_PERSISTENT_MODE == false ) {
460
+ return false;
461
+ }
462
+ // The filter below is deprecated and will be removed in future versions. Use the define instead.
463
  return apply_filters( 'disable_comments_allow_persistent_mode', true );
464
  }
465
 
487
  }
488
  }
489
 
490
+ Disable_Comments::get_instance();
languages/disable-comments-fr_FR.mo CHANGED
Binary file
languages/disable-comments-fr_FR.po CHANGED
@@ -2,174 +2,209 @@
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 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 ? "
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  # This file is distributed under the same license as the Disable Comments package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Disable Comments 1.2\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/disable-comments\n"
7
+ "POT-Creation-Date: 2015-02-03 08:04:31+00:00\n"
8
+ "PO-Revision-Date: 2015-02-03 14:30+0100\n"
9
+ "Last-Translator: fxbenard | FxB <fx@fxbenard.com>\n"
10
+ "Language-Team: Hexagone <fx@hexagone.io>\n"
11
+ "Language: fr_FR\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 1.7.3\n"
 
 
 
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\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
+ "Disable Comments nécessite la version %s de WordPress ou une version supérieure"
 
23
 
24
+ #: disable-comments.php:210
25
  msgid ""
26
  "Note: The <em>Disable Comments</em> plugin is currently active, and comments "
27
  "are completely disabled on: %s. Many of the settings below will not be "
28
  "applicable for those post types."
29
  msgstr ""
30
+ "Remarque : l'extension <em>Disable Comments</em> est actuellement activée et "
31
+ "les commentaires sont complètement désactivés sur %s. Un grand nombre de ces "
32
+ "réglages ne seront pas applicables pour ces types de contenu. "
33
 
34
+ #: disable-comments.php:210
35
  msgid ", "
36
+ msgstr ","
37
 
38
+ #: disable-comments.php:230
39
  msgid ""
40
  "The <em>Disable Comments</em> plugin is active, but isn't configured to do "
41
+ "anything yet. Visit the <a href=\"%s\">configuration page</a> to choose which "
42
+ "post types to disable comments on."
43
  msgstr ""
44
+ "L'extension <em>Disable Comments</em> est activée mais n'est pas encore "
45
+ "configurée. Rendez-vous sur la <a href=\"%s\">page de configuration</a> pour "
46
+ "choisir les types de contenu pour lesquels vous souhaitez désactiver les "
47
+ "commentaires. "
48
+
49
+ #: disable-comments.php:237
50
+ msgid "Comments are closed."
51
+ msgstr "Les commentaires sont fermés."
52
+
53
+ #: disable-comments.php:290
54
+ msgid "Settings"
55
+ msgstr "Réglages"
56
 
57
+ #. Plugin Name of the plugin/theme
58
+ #: disable-comments.php:298 disable-comments.php:350
59
  msgid "Disable Comments"
60
+ msgstr "Disable Comments"
61
 
62
+ #: disable-comments.php:343
63
  msgid ""
64
  "If a caching/performance plugin is active, please invalidate its cache to "
65
  "ensure that changes are reflected immediately."
66
  msgstr ""
67
+ "Si vous utilisez une extension de cache, veuillez vider le cache afin de "
68
+ "constater que les changements sont répercutés immédiatement. "
69
 
70
+ #: disable-comments.php:344
71
  msgid ""
72
+ "Options updated. Changes to the Admin Menu and Admin Bar will not appear until "
73
+ "you leave or reload this page."
74
  msgstr ""
75
+ "Options mises à jour. Les modifications n'apparaitront pas dans l'admin tant "
76
+ "que vous n'aurez pas quitté ou rechargé cette page."
77
 
78
+ #: disable-comments.php:353
79
  msgid ""
80
+ "<em>Disable Comments</em> is Network Activated. The settings below will affect "
81
+ "<strong>all sites</strong> in this network."
82
  msgstr ""
83
+ "<em>Disable Comments</em>est activé au niveau du réseau. Les modifications ci-"
84
+ "dessous affecteront <strong>tous les sites</strong> du réseau."
85
 
86
+ #: disable-comments.php:355
87
  msgid ""
88
  "It seems that a caching/performance plugin is active on this site. Please "
89
  "manually invalidate that plugin's cache after making any changes to the "
90
  "settings below."
91
  msgstr ""
92
+ "Il semblerait qu'une extension de cache soit active sur votre site. Veuillez "
93
+ "vider ce cache après toutes modifications dans les réglages ci-dessous. "
94
 
95
+ #: disable-comments.php:359
96
  msgid "Everywhere"
97
  msgstr "Partout"
98
 
99
+ #: disable-comments.php:359
100
  msgid "Disable all comment-related controls and settings in WordPress."
101
+ msgstr "Désactiver tous les réglages relatifs aux commentaires dans WordPress."
102
 
103
+ #: disable-comments.php:360
104
  msgid ""
105
+ "%s: This option is global and will affect your entire site. Use it only if you "
106
+ "want to disable comments <em>everywhere</em>. A complete description of what "
107
+ "this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
108
  msgstr ""
109
+ "%s : Cette option affecte l'ensemble de votre site internet. Utilisez-la si "
110
+ "vous souhaitez désactiver les commentaires <em>partout</em>. Une documentation "
111
+ "complète des options de l'extension est <a href=\"%s\" target=\"_blank"
112
+ "\">disponible ici (en)</a>."
113
 
114
+ #: disable-comments.php:360 disable-comments.php:380 disable-comments.php:382
115
+ #: disable-comments.php:409
116
  msgid "Warning"
117
+ msgstr "Avertissement"
118
 
119
+ #: disable-comments.php:362
120
  msgid "On certain post types"
121
+ msgstr "Certains types de contenu "
122
+
123
+ #: disable-comments.php:368
124
+ msgid ""
125
+ "Only the built-in post types appear above. If you want to disable comments on "
126
+ "other custom post types on the entire network, you can supply a comma-separated "
127
+ "list of post types below (use the slug that identifies the post type)."
128
+ msgstr ""
129
+ "Seuls les types d'article intégrés apparaissent au-dessus. Si vous souhaitez "
130
+ "désactiver commentaires sur d&#39;autres types de contenu personnalisé sur "
131
+ "l&#39;ensemble du réseau, vous pouvez fournir une liste séparée par des "
132
+ "virgules de ces types de contenu ci-dessous (utiliser leurs identifiants)."
133
 
134
+ #: disable-comments.php:371
135
  msgid ""
136
  "Disabling comments will also disable trackbacks and pingbacks. All comment-"
137
  "related fields will also be hidden from the edit/quick-edit screens of the "
138
  "affected posts. These settings cannot be overridden for individual posts."
139
  msgstr ""
140
+ "Désactiver les commentaires entraine une désactivation des trackbacks et pings. "
141
+ "Tous les champs relatifs aux commentaires seront affectés. Ces réglages ne "
142
+ "pourront pas être choisi individuellement dans les articles. "
 
143
 
144
+ #: disable-comments.php:374
145
  msgid "Other options"
146
  msgstr "Autres options"
147
 
148
+ #: disable-comments.php:379
149
  msgid "Use persistent mode"
150
+ msgstr "Utiliser le mode persistant"
151
 
152
+ #: disable-comments.php:380
153
  msgid ""
154
+ "%s: <strong>This will make persistent changes to your database &mdash; comments "
155
+ "will remain closed even if you later disable the plugin!</strong> You should "
156
+ "not use it if you only want to disable comments temporarily. Please <a href=\"%s"
157
+ "\" target=\"_blank\">read the FAQ</a> before selecting this option."
 
158
  msgstr ""
159
+ "%s : <strong>Ceci fera des changements permanents à votre base de données. Les "
160
+ "commentaires seront désactivés même si vous désactivez l'extension !</strong> "
161
+ "Si vous souhaitez désactiver les commentaires de façon temporaire, vous ne "
162
+ "devez PAS activer cette option. Voir la <a href=\"%s\" target=\"_blank\">FAQ "
163
+ "(en)</a> avant de choisir cette option."
164
 
165
+ #: disable-comments.php:382
166
  msgid ""
167
  "%s: Entering persistent mode on large multi-site networks requires a large "
168
  "number of database queries and can take a while. Use with caution!"
169
  msgstr ""
170
+ "%s : Activer le mode persistent sur un réseau de sites nécessite de nombreuses "
171
+ "requetes dans la base de données. Utilisez cette option avec prudence !"
 
172
 
173
+ #: disable-comments.php:388
 
 
 
 
 
 
 
 
174
  msgid "Save Changes"
175
  msgstr "Sauvegarder les modifications"
176
 
177
+ #: disable-comments.php:409
178
  msgid ""
179
  "%s: Selecting this option will make persistent changes to your database. Are "
180
  "you sure you want to enable it?"
181
  msgstr ""
182
+ "%s : Selectionner cette option fera des changements permanents à votre base de "
183
+ "données. Etes-vous certain(e) de vouloir l'activer ? "
184
+
185
+ #. Plugin URI of the plugin/theme
186
+ msgid "http://wordpress.org/extend/plugins/disable-comments/"
187
+ msgstr "http://wordpress.org/extend/plugins/disable-comments/"
188
+
189
+ #. Description of the plugin/theme
190
+ msgid ""
191
+ "Allows administrators to globally disable comments on their site. Comments can "
192
+ "be disabled according to post type."
193
+ msgstr ""
194
+ "Permet aux administrateurs de désactiver globalement les commentaires sur leur "
195
+ "site. Les commentaires peuvent être désactivés selon le type de contenu."
196
+
197
+ #. Author of the plugin/theme
198
+ msgid "Samir Shah"
199
+ msgstr "Samir Shah"
200
+
201
+ #. Author URI of the plugin/theme
202
+ msgid "http://rayofsolaris.net/"
203
+ msgstr "http://rayofsolaris.net/"
204
+
205
+ #~ msgid ""
206
+ #~ "Persistent mode has been manually disabled. See the <a href=\"%s\" target="
207
+ #~ "\"_blank\">FAQ</a> for more information."
208
+ #~ msgstr ""
209
+ #~ "Le mode persistant a été désactivé de façon manuelle. Voir la <a href=\"%s\" "
210
+ #~ "target=\"_blank\">FAQ</a>pour plus d'information."
languages/disable-comments.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2014 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 1.2\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/disable-comments\n"
7
- "POT-Creation-Date: 2014-10-26 04:54:23+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-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -17,7 +17,10 @@ msgid "Disable Comments requires WordPress version %s or greater."
17
  msgstr ""
18
 
19
  #: disable-comments.php:210
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:210
@@ -25,7 +28,10 @@ msgid ", "
25
  msgstr ""
26
 
27
  #: disable-comments.php:230
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:237
@@ -36,24 +42,35 @@ msgstr ""
36
  msgid "Settings"
37
  msgstr ""
38
 
 
 
39
  #: disable-comments.php:298 disable-comments.php:350
40
  msgid "Disable Comments"
41
  msgstr ""
42
 
43
  #: disable-comments.php:343
44
- msgid "If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately."
 
 
45
  msgstr ""
46
 
47
  #: disable-comments.php:344
48
- msgid "Options updated. Changes to the Admin Menu and Admin Bar will not appear until you leave or reload this page."
 
 
49
  msgstr ""
50
 
51
  #: disable-comments.php:353
52
- msgid "<em>Disable Comments</em> is Network Activated. The settings below will affect <strong>all sites</strong> in this network."
 
 
53
  msgstr ""
54
 
55
  #: disable-comments.php:355
56
- 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."
 
 
 
57
  msgstr ""
58
 
59
  #: disable-comments.php:359
@@ -65,7 +82,10 @@ msgid "Disable all comment-related controls and settings in WordPress."
65
  msgstr ""
66
 
67
  #: disable-comments.php:360
68
- 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>."
 
 
 
69
  msgstr ""
70
 
71
  #: disable-comments.php:360 disable-comments.php:380 disable-comments.php:382
@@ -78,11 +98,18 @@ msgid "On certain post types"
78
  msgstr ""
79
 
80
  #: disable-comments.php:368
81
- msgid "Only the built-in post types appear above. If you want to disable comments on other custom post types on the entire network, you can supply a comma-separated list of post types below (use the slug that identifies the post type)."
 
 
 
 
82
  msgstr ""
83
 
84
  #: disable-comments.php:371
85
- 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."
 
 
 
86
  msgstr ""
87
 
88
  #: disable-comments.php:374
@@ -94,11 +121,18 @@ msgid "Use persistent mode"
94
  msgstr ""
95
 
96
  #: disable-comments.php:380
97
- 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."
 
 
 
 
 
98
  msgstr ""
99
 
100
  #: disable-comments.php:382
101
- 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!"
 
 
102
  msgstr ""
103
 
104
  #: disable-comments.php:388
@@ -106,5 +140,25 @@ msgid "Save Changes"
106
  msgstr ""
107
 
108
  #: disable-comments.php:409
109
- msgid "%s: Selecting this option will make persistent changes to your database. Are you sure you want to enable it?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  msgstr ""
1
+ # Copyright (C) 2015 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 1.2\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/disable-comments\n"
7
+ "POT-Creation-Date: 2015-02-03 08:04:31+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: 2015-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
17
  msgstr ""
18
 
19
  #: disable-comments.php:210
20
+ msgid ""
21
+ "Note: The <em>Disable Comments</em> plugin is currently active, and comments "
22
+ "are completely disabled on: %s. Many of the settings below will not be "
23
+ "applicable for those post types."
24
  msgstr ""
25
 
26
  #: disable-comments.php:210
28
  msgstr ""
29
 
30
  #: disable-comments.php:230
31
+ msgid ""
32
+ "The <em>Disable Comments</em> plugin is active, but isn't configured to do "
33
+ "anything yet. Visit the <a href=\"%s\">configuration page</a> to choose "
34
+ "which post types to disable comments on."
35
  msgstr ""
36
 
37
  #: disable-comments.php:237
42
  msgid "Settings"
43
  msgstr ""
44
 
45
+ #. #-#-#-#-# disable-comments.pot (Disable Comments 1.2) #-#-#-#-#
46
+ #. Plugin Name of the plugin/theme
47
  #: disable-comments.php:298 disable-comments.php:350
48
  msgid "Disable Comments"
49
  msgstr ""
50
 
51
  #: disable-comments.php:343
52
+ msgid ""
53
+ "If a caching/performance plugin is active, please invalidate its cache to "
54
+ "ensure that changes are reflected immediately."
55
  msgstr ""
56
 
57
  #: disable-comments.php:344
58
+ msgid ""
59
+ "Options updated. Changes to the Admin Menu and Admin Bar will not appear "
60
+ "until you leave or reload this page."
61
  msgstr ""
62
 
63
  #: disable-comments.php:353
64
+ msgid ""
65
+ "<em>Disable Comments</em> is Network Activated. The settings below will "
66
+ "affect <strong>all sites</strong> in this network."
67
  msgstr ""
68
 
69
  #: disable-comments.php:355
70
+ msgid ""
71
+ "It seems that a caching/performance plugin is active on this site. Please "
72
+ "manually invalidate that plugin's cache after making any changes to the "
73
+ "settings below."
74
  msgstr ""
75
 
76
  #: disable-comments.php:359
82
  msgstr ""
83
 
84
  #: disable-comments.php:360
85
+ msgid ""
86
+ "%s: This option is global and will affect your entire site. Use it only if "
87
+ "you want to disable comments <em>everywhere</em>. A complete description of "
88
+ "what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
89
  msgstr ""
90
 
91
  #: disable-comments.php:360 disable-comments.php:380 disable-comments.php:382
98
  msgstr ""
99
 
100
  #: disable-comments.php:368
101
+ msgid ""
102
+ "Only the built-in post types appear above. If you want to disable comments "
103
+ "on other custom post types on the entire network, you can supply a comma-"
104
+ "separated list of post types below (use the slug that identifies the post "
105
+ "type)."
106
  msgstr ""
107
 
108
  #: disable-comments.php:371
109
+ msgid ""
110
+ "Disabling comments will also disable trackbacks and pingbacks. All comment-"
111
+ "related fields will also be hidden from the edit/quick-edit screens of the "
112
+ "affected posts. These settings cannot be overridden for individual posts."
113
  msgstr ""
114
 
115
  #: disable-comments.php:374
121
  msgstr ""
122
 
123
  #: disable-comments.php:380
124
+ msgid ""
125
+ "%s: <strong>This will make persistent changes to your database &mdash; "
126
+ "comments will remain closed even if you later disable the plugin!</strong> "
127
+ "You should not use it if you only want to disable comments temporarily. "
128
+ "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting "
129
+ "this option."
130
  msgstr ""
131
 
132
  #: disable-comments.php:382
133
+ msgid ""
134
+ "%s: Entering persistent mode on large multi-site networks requires a large "
135
+ "number of database queries and can take a while. Use with caution!"
136
  msgstr ""
137
 
138
  #: disable-comments.php:388
140
  msgstr ""
141
 
142
  #: disable-comments.php:409
143
+ msgid ""
144
+ "%s: Selecting this option will make persistent changes to your database. Are "
145
+ "you sure you want to enable it?"
146
+ msgstr ""
147
+
148
+ #. Plugin URI of the plugin/theme
149
+ msgid "http://wordpress.org/extend/plugins/disable-comments/"
150
+ msgstr ""
151
+
152
+ #. Description of the plugin/theme
153
+ msgid ""
154
+ "Allows administrators to globally disable comments on their site. Comments "
155
+ "can be disabled according to post type."
156
+ msgstr ""
157
+
158
+ #. Author of the plugin/theme
159
+ msgid "Samir Shah"
160
+ msgstr ""
161
+
162
+ #. Author URI of the plugin/theme
163
+ msgid "http://rayofsolaris.net/"
164
  msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: solarissmoke
3
  Donate link: http://rayofsolaris.net/donate.php
4
  Tags: comments, disable, global
5
  Requires at least: 3.6
6
- Tested up to: 4.0
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.
@@ -32,8 +32,6 @@ Unfortunately some themes do not properly check the comment status of posts, and
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).
@@ -72,8 +70,21 @@ The plugin provides the option to **completely disable the commenting feature in
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.2 =
78
  * Allow network administrators to disable comments on custom post types across the whole network.
79
 
3
  Donate link: http://rayofsolaris.net/donate.php
4
  Tags: comments, disable, global
5
  Requires at least: 3.6
6
+ Tested up to: 4.2
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.
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
  = Nothing happens after I disable comments on all posts - comment forms still appear when I view my posts. =
36
 
37
  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).
70
 
71
  **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.**
72
 
73
+ == Advanced Configuration ==
74
+
75
+ Some of the plugin's behaviour can be modified by site administrators and plugin/theme developers through code:
76
+
77
+ * Define `DISABLE_COMMENTS_ALLOW_PERSISTENT_MODE` and set it to `false` to prevent persistent mode from being available as an option on the plugin settings page.
78
+ * Define `DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE` and set it to `false` to prevent the plugin the plugin from replacing the theme's comment template with an empty one.
79
+
80
+ These definitions can be made either in your main `wp-config.php` or in your theme's `functions.php` file.
81
+
82
  == Changelog ==
83
 
84
+ = 1.3 =
85
+ * Move persistent mode filter into a define.
86
+ * Add an advanced option to show the theme's comment template even when comments are disabled.
87
+
88
  = 1.2 =
89
  * Allow network administrators to disable comments on custom post types across the whole network.
90