Code Duplication    Length = 18-18 lines in 2 locations

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

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

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

@@ 6355-6372 (lines=18) @@
6352
	 * @since 4.3.2
6353
	 * @return bool
6354
	 */
6355
	public static function sync_idc_optin() {
6356
		if ( Constants::is_defined( 'JETPACK_SYNC_IDC_OPTIN' ) ) {
6357
			$default = Constants::get_constant( 'JETPACK_SYNC_IDC_OPTIN' );
6358
		} else {
6359
			$default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite();
6360
		}
6361
6362
		/**
6363
		 * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home
6364
		 * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of
6365
		 * JETPACK_SYNC_IDC_OPTIN constant if set.
6366
		 *
6367
		 * @since 4.3.2
6368
		 *
6369
		 * @param bool $default Whether the site is opted in to IDC mitigation.
6370
		 */
6371
		return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );
6372
	}
6373
6374
	/**
6375
	 * Maybe Use a .min.css stylesheet, maybe not.