|
@@ 478-482 (lines=5) @@
|
| 475 |
|
|
| 476 |
|
// Enqueue styles. |
| 477 |
|
$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 478 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 479 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 480 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 481 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 482 |
|
} |
| 483 |
|
|
| 484 |
|
} |
| 485 |
|
/** |
|
@@ 503-507 (lines=5) @@
|
| 500 |
|
|
| 501 |
|
// Enqueue script. |
| 502 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
| 503 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 504 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 505 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 506 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 507 |
|
} |
| 508 |
|
|
| 509 |
|
wp_localize_script( |
| 510 |
|
'jetpack-block-' . $type, |