|
@@ 464-468 (lines=5) @@
|
| 461 |
|
$type = sanitize_title_with_dashes( $type ); |
| 462 |
|
// Enqueue styles. |
| 463 |
|
$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 464 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 465 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 466 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 467 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 468 |
|
} |
| 469 |
|
|
| 470 |
|
// Enqueue script. |
| 471 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
|
@@ 472-476 (lines=5) @@
|
| 469 |
|
|
| 470 |
|
// Enqueue script. |
| 471 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
| 472 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 473 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 474 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 475 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 476 |
|
} |
| 477 |
|
|
| 478 |
|
wp_localize_script( |
| 479 |
|
'jetpack-block-' . $type, |