|
@@ 387-391 (lines=5) @@
|
| 384 |
|
$type = sanitize_title_with_dashes( $type ); |
| 385 |
|
// Enqueue styles. |
| 386 |
|
$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 387 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 388 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 389 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 390 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 391 |
|
} |
| 392 |
|
|
| 393 |
|
// Enqueue script. |
| 394 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
|
@@ 395-399 (lines=5) @@
|
| 392 |
|
|
| 393 |
|
// Enqueue script. |
| 394 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
| 395 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 396 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 397 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 398 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 399 |
|
} |
| 400 |
|
|
| 401 |
|
wp_localize_script( |
| 402 |
|
'jetpack-block-' . $type, |