Code Duplication    Length = 18-18 lines in 2 locations

projects/packages/identity-crisis/src/class-identity-crisis.php 1 location

@@ 391-408 (lines=18) @@
388
	 * @return bool
389
	 * @since 4.3.2
390
	 */
391
	public static function sync_idc_optin() {
392
		if ( Constants::is_defined( 'JETPACK_SYNC_IDC_OPTIN' ) ) {
393
			$default = Constants::get_constant( 'JETPACK_SYNC_IDC_OPTIN' );
394
		} else {
395
			$default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite();
396
		}
397
398
		/**
399
		 * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home
400
		 * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of
401
		 * JETPACK_SYNC_IDC_OPTIN constant if set.
402
		 *
403
		 * @param bool $default Whether the site is opted in to IDC mitigation.
404
		 *
405
		 * @since 4.3.2
406
		 */
407
		return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );
408
	}
409
410
	/**
411
	 * Does the current admin page have help tabs?

projects/plugins/jetpack/class.jetpack.php 1 location

@@ 6298-6315 (lines=18) @@
6295
	 * @since 4.3.2
6296
	 * @return bool
6297
	 */
6298
	public static function sync_idc_optin() {
6299
		if ( Constants::is_defined( 'JETPACK_SYNC_IDC_OPTIN' ) ) {
6300
			$default = Constants::get_constant( 'JETPACK_SYNC_IDC_OPTIN' );
6301
		} else {
6302
			$default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite();
6303
		}
6304
6305
		/**
6306
		 * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home
6307
		 * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of
6308
		 * JETPACK_SYNC_IDC_OPTIN constant if set.
6309
		 *
6310
		 * @since 4.3.2
6311
		 *
6312
		 * @param bool $default Whether the site is opted in to IDC mitigation.
6313
		 */
6314
		return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );
6315
	}
6316
6317
	/**
6318
	 * Maybe Use a .min.css stylesheet, maybe not.