Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack-gutenberg.php 1 location

@@ 474-478 (lines=5) @@
471
472
		// Enqueue styles.
473
		$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css';
474
		if ( self::block_has_asset( $style_relative_path ) ) {
475
			$style_version = self::get_asset_version( $style_relative_path );
476
			$view_style    = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE );
477
			wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version );
478
		}
479
480
	}
481

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

@@ 222-226 (lines=5) @@
219
			}
220
221
			$style_relative_path = '_inc/build/instant-search/instant-search.min.css';
222
			if ( file_exists( JETPACK__PLUGIN_DIR . $script_relative_path ) ) {
223
				$style_version = self::get_asset_version( $style_relative_path );
224
				$style_path    = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE );
225
				wp_enqueue_style( 'jetpack-instant-search', $style_path, array(), $style_version );
226
			}
227
		}
228
	}
229