|
@@ 237-241 (lines=5) @@
|
| 234 |
|
$type = sanitize_title_with_dashes( $type ); |
| 235 |
|
// Enqueue styles. |
| 236 |
|
$style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 237 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 238 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 239 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 240 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
// Enqueue script. |
| 244 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
|
@@ 245-249 (lines=5) @@
|
| 242 |
|
|
| 243 |
|
// Enqueue script. |
| 244 |
|
$script_relative_path = self::get_blocks_directory() . $type . '/view.js'; |
| 245 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 246 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 247 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 248 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
| 249 |
|
} |
| 250 |
|
|
| 251 |
|
wp_localize_script( |
| 252 |
|
'jetpack-block-' . $type, |