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

@@ 1013-1019 (lines=7) @@
1010
			return 'en_US';
1011
		}
1012
1013
		if ( ! class_exists( 'GP_Locales' ) ) {
1014
			if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
1015
				return false;
1016
			}
1017
1018
			require JETPACK__GLOTPRESS_LOCALES_PATH;
1019
		}
1020
1021
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
1022
			// WP.com: get_locale() returns 'it'