Code Duplication    Length = 5-7 lines in 3 locations

modules/sharedaddy/sharing-sources.php 1 location

@@ 896-902 (lines=7) @@
893
			return 'en_US';
894
		}
895
896
		if ( ! class_exists( 'GP_Locales' ) ) {
897
			if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
898
				return false;
899
			}
900
901
			require JETPACK__GLOTPRESS_LOCALES_PATH;
902
		}
903
904
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
905
			// 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

@@ 1031-1037 (lines=7) @@
1028
			return 'en_US';
1029
		}
1030
1031
		if ( ! class_exists( 'GP_Locales' ) ) {
1032
			if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
1033
				return false;
1034
			}
1035
1036
			require JETPACK__GLOTPRESS_LOCALES_PATH;
1037
		}
1038
1039
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
1040
			// WP.com: get_locale() returns 'it'