@@ 466-470 (lines=5) @@ | ||
463 | ||
464 | // Enqueue styles. |
|
465 | $style_relative_path = self::get_blocks_directory() . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
|
466 | if ( self::block_has_asset( $style_relative_path ) ) { |
|
467 | $style_version = self::get_asset_version( $style_relative_path ); |
|
468 | $view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
|
469 | wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
|
470 | } |
|
471 | ||
472 | } |
|
473 | ||
@@ 500-504 (lines=5) @@ | ||
497 | : array(); |
|
498 | $script_dependencies = array_merge( $script_dependencies, $dependencies, array( 'wp-polyfill' ) ); |
|
499 | ||
500 | if ( self::block_has_asset( $script_relative_path ) ) { |
|
501 | $script_version = self::get_asset_version( $script_relative_path ); |
|
502 | $view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
|
503 | wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
|
504 | } |
|
505 | ||
506 | wp_localize_script( |
|
507 | 'jetpack-block-' . $type, |