Code Duplication    Length = 5-7 lines in 3 locations

modules/sharedaddy/sharing-sources.php 1 location

@@ 897-903 (lines=7) @@
894
			return 'en_US';
895
		}
896
897
		if ( ! class_exists( 'GP_Locales' ) ) {
898
			if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
899
				return false;
900
			}
901
902
			require JETPACK__GLOTPRESS_LOCALES_PATH;
903
		}
904
905
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
906
			// WP.com: get_locale() returns 'it'

modules/notes.php 1 location

@@ 154-158 (lines=5) @@
151
152
		$wpcom_locale = get_locale();
153
154
		if ( !class_exists( 'GP_Locales' ) ) {
155
			if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
156
				require JETPACK__GLOTPRESS_LOCALES_PATH;
157
			}
158
		}
159
160
		if ( class_exists( 'GP_Locales' ) ) {
161
			$wpcom_locale_object = GP_Locales::by_field( 'wp_locale', $wpcom_locale );

class.jetpack.php 1 location

@@ 1024-1030 (lines=7) @@
1021
			return 'en_US';
1022
		}
1023
1024
		if ( ! class_exists( 'GP_Locales' ) ) {
1025
			if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
1026
				return false;
1027
			}
1028
1029
			require JETPACK__GLOTPRESS_LOCALES_PATH;
1030
		}
1031
1032
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
1033
			// WP.com: get_locale() returns 'it'