|
@@ 255-259 (lines=5) @@
|
| 252 |
|
$type = sanitize_title_with_dashes( $type ); |
| 253 |
|
// Enqueue styles. |
| 254 |
|
$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 255 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 256 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 257 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 258 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
// Enqueue script. |
| 262 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
|
@@ 263-267 (lines=5) @@
|
| 260 |
|
|
| 261 |
|
// Enqueue script. |
| 262 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
| 263 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 264 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 265 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 266 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 267 |
|
} |
| 268 |
|
|
| 269 |
|
wp_localize_script( |
| 270 |
|
'jetpack-block-' . $type, |