Code Duplication    Length = 7-14 lines in 2 locations

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

@@ 49-55 (lines=7) @@
46
	 *
47
	 * @return bool True if Jetpack is active and not in offline mode.
48
	 */
49
	public static function is_active_and_not_development_mode() {
50
		_deprecated_function( __FUNCTION__, 'jetpack-8.8.0', 'Jetpack::is_active_and_not_offline_mode' );
51
		if ( ! Jetpack::is_active() || ( new Status() )->is_offline_mode() ) {
52
			return false;
53
		}
54
		return true;
55
	}
56
57
	/**
58
	 * Deprecated manage functions

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

@@ 524-537 (lines=14) @@
521
	 *
522
	 * @return bool
523
	 */
524
	public static function should_load() {
525
		if ( ! Jetpack::is_active() && ! ( new Status() )->is_offline_mode() ) {
526
			return false;
527
		}
528
529
		/**
530
		 * Filter to disable Gutenberg blocks
531
		 *
532
		 * @since 6.5.0
533
		 *
534
		 * @param bool true Whether to load Gutenberg blocks
535
		 */
536
		return (bool) apply_filters( 'jetpack_gutenberg', true );
537
	}
538
539
	/**
540
	 * Only enqueue block assets when needed.