|
@@ 216-220 (lines=5) @@
|
| 213 |
|
$type = sanitize_title_with_dashes( $type ); |
| 214 |
|
// Enqueue styles. |
| 215 |
|
$style_relative_path = '_inc/blocks/' . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 216 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 217 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 218 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 219 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 220 |
|
} |
| 221 |
|
|
| 222 |
|
// Enqueue script. |
| 223 |
|
$script_relative_path = '_inc/blocks/' . $type . '/view.js'; |
|
@@ 224-228 (lines=5) @@
|
| 221 |
|
|
| 222 |
|
// Enqueue script. |
| 223 |
|
$script_relative_path = '_inc/blocks/' . $type . '/view.js'; |
| 224 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 225 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 226 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 227 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
wp_localize_script( |
| 231 |
|
'jetpack-block-' . $type, |