Code Duplication    Length = 14-14 lines in 2 locations

class.jetpack-options.php 1 location

@@ 481-494 (lines=14) @@
478
	 *
479
	 * @return bool
480
	 */
481
	static function bypass_raw_option( $name ) {
482
483
		if ( Jetpack_Constants::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
484
			return true;
485
		}
486
		/**
487
		 * Allows to disable particular raw options.
488
		 * @since 5.5.0
489
		 *
490
		 * @param array $disabled_raw_options An array of option names that you can selectively blacklist from being managed via direct database queries.
491
		 */
492
		$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
493
		return isset( $disabled_raw_options[ $name ] );
494
	}
495
496
	/**
497
	 * Gets all known options that are used by Jetpack and managed by Jetpack_Options.

packages/options/src/Manager.php 1 location

@@ 281-294 (lines=14) @@
278
	 *
279
	 * @return bool
280
	 */
281
	function bypass_raw_option( $name ) {
282
		if ( \Jetpack_Constants::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
283
			return true;
284
		}
285
		/**
286
		 * Allows to disable particular raw options.
287
		 *
288
		 * @since 5.5.0
289
		 *
290
		 * @param array $disabled_raw_options An array of option names that you can selectively blacklist from being managed via direct database queries.
291
		 */
292
		$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
293
		return isset( $disabled_raw_options[ $name ] );
294
	}
295
}
296