|
@@ 417-421 (lines=5) @@
|
| 414 |
|
$type = sanitize_title_with_dashes( $type ); |
| 415 |
|
// Enqueue styles. |
| 416 |
|
$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 417 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 418 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 419 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 420 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 421 |
|
} |
| 422 |
|
|
| 423 |
|
// Enqueue script. |
| 424 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
|
@@ 425-429 (lines=5) @@
|
| 422 |
|
|
| 423 |
|
// Enqueue script. |
| 424 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
| 425 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 426 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 427 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 428 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 429 |
|
} |
| 430 |
|
|
| 431 |
|
wp_localize_script( |
| 432 |
|
'jetpack-block-' . $type, |