Code Duplication    Length = 14-14 lines in 2 locations

class.jetpack-options.php 1 location

@@ 482-495 (lines=14) @@
479
	 *
480
	 * @return bool
481
	 */
482
	static function bypass_raw_option( $name ) {
483
484
		if ( Constants_Manager::get_constant( 'JETPACK_DISABLE_RAW_OPTIONS' ) ) {
485
			return true;
486
		}
487
		/**
488
		 * Allows to disable particular raw options.
489
		 * @since 5.5.0
490
		 *
491
		 * @param array $disabled_raw_options An array of option names that you can selectively blacklist from being managed via direct database queries.
492
		 */
493
		$disabled_raw_options = apply_filters( 'jetpack_disabled_raw_options', array() );
494
		return isset( $disabled_raw_options[ $name ] );
495
	}
496
497
	/**
498
	 * 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 ( Constants_Manager::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