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