Code Duplication    Length = 18-18 lines in 2 locations

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

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

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

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