5
5
* Description: More than a plugin, the guarantee of a protected website by experts.
6
6
* Author: SecuPress
7
7
* Author URI: https://secupress.me
8
- * Version: 2.1.2
8
+ * Version: 2.1.3
9
9
* Code Name: Python (Mark XX)
10
10
* Network: true
11
11
* Contributors: SecuPress, juliobox, GregLone
23
23
/** DEFINES ===================================================================================== */
24
24
/** --------------------------------------------------------------------------------------------- */
25
25
26
- define ( 'SECUPRESS_VERSION ' , '2.1.2 ' );
26
+ define ( 'SECUPRESS_VERSION ' , '2.1.3 ' );
27
27
define ( 'SECUPRESS_MAJOR_VERSION ' , '2.1 ' );
28
28
define ( 'SECUPRESS_FILE ' , __FILE__ );
29
29
define ( 'SECUPRESS_PATH ' , realpath ( dirname ( SECUPRESS_FILE ) ) . DIRECTORY_SEPARATOR );
@@ -271,6 +271,17 @@ function secupress_load_plugins() {
271
271
do_action ( 'secupress.plugins.loaded ' );
272
272
}
273
273
274
+ /**
275
+ * Check is the $locale if a FR one
276
+ *
277
+ * @return (bool) True if $locale is fr_FR (france) or fr_BE (belgium) or fr_CA (canada)
278
+ * @author Julio Potier
279
+ * @since 2.1.3
280
+ * @param (string) $locale The locale to be tested
281
+ **/
282
+ function secupress_locale_is_FR ( $ locale ) {
283
+ return 'fr_FR ' === $ locale || 'fr_CA ' === $ locale || 'fr_BE ' === $ locale ;
284
+ }
274
285
275
286
/**
276
287
* Include files that contain our functions.
@@ -385,6 +396,7 @@ function secupress_load_functions() {
385
396
/**
386
397
* Load our own i18n to prevent too long strings or spelling errors from voluteers at translate.wp.org, sorry guys.
387
398
*
399
+ * @since 2.1.3 Usage of secupress_locale_is_FR()
388
400
* @since 2.0.3 fr_BE & fr_CA = fr_FR
389
401
* @since 2.0
390
402
* @author Julio Potier
@@ -406,7 +418,7 @@ function secupress_load_own_i18n( $mofile, $domain ) {
406
418
$ determined_locale = determine_locale ();
407
419
}
408
420
$ locale = apply_filters ( 'plugin_locale ' , $ determined_locale , $ domain );
409
- if ( ' fr_CA ' === $ locale || ' fr_BE ' === $ locale ) {
421
+ if ( secupress_locale_is_FR ( $ locale ) ) {
410
422
$ locale = 'fr_FR ' ;
411
423
}
412
424
$ mofile = WP_PLUGIN_DIR . '/ ' . dirname ( plugin_basename ( SECUPRESS_FILE ) ) . '/languages/ ' . $ domain . '- ' . $ locale . '.mo ' ;
@@ -439,4 +451,4 @@ function secupress_load_plugin_textdomain_translations() {
439
451
__ ( 'SecuPress Free — WordPress Security ' , 'secupress ' );
440
452
/** Translators: Description of the plugin/theme */
441
453
__ ( 'Protect your WordPress with SecuPress, analyze and ensure the safety of your website daily. ' , 'secupress ' );
442
- }
454
+ }
0 commit comments