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

@@ 6334-6351 (lines=18) @@
6331
	 * @since 4.3.2
6332
	 * @return bool
6333
	 */
6334
	public static function sync_idc_optin() {
6335
		if ( Constants::is_defined( 'JETPACK_SYNC_IDC_OPTIN' ) ) {
6336
			$default = Constants::get_constant( 'JETPACK_SYNC_IDC_OPTIN' );
6337
		} else {
6338
			$default = ! Constants::is_defined( 'SUNRISE' ) && ! is_multisite();
6339
		}
6340
6341
		/**
6342
		 * Allows sites to opt in for IDC mitigation which blocks the site from syncing to WordPress.com when the home
6343
		 * URL or site URL do not match what WordPress.com expects. The default value is either true, or the value of
6344
		 * JETPACK_SYNC_IDC_OPTIN constant if set.
6345
		 *
6346
		 * @since 4.3.2
6347
		 *
6348
		 * @param bool $default Whether the site is opted in to IDC mitigation.
6349
		 */
6350
		return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );
6351
	}
6352
6353
	/**
6354
	 * Maybe Use a .min.css stylesheet, maybe not.