Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack-gutenberg.php 1 location

@@ 492-496 (lines=5) @@
489
490
		// Enqueue styles.
491
		$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css';
492
		if ( self::block_has_asset( $style_relative_path ) ) {
493
			$style_version = self::get_asset_version( $style_relative_path );
494
			$view_style    = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE );
495
			wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version );
496
		}
497
498
	}
499

modules/search/class.jetpack-search.php 1 location

@@ 231-235 (lines=5) @@
228
			}
229
230
			$style_relative_path = '_inc/build/instant-search/instant-search.min.css';
231
			if ( file_exists( JETPACK__PLUGIN_DIR . $script_relative_path ) ) {
232
				$style_version = self::get_asset_version( $style_relative_path );
233
				$style_path    = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE );
234
				wp_enqueue_style( 'jetpack-instant-search', $style_path, array(), $style_version );
235
			}
236
		}
237
	}
238