|
@@ 116-120 (lines=5) @@
|
| 113 |
|
$type = sanitize_title_with_dashes( $type ); |
| 114 |
|
// Enqueue styles. |
| 115 |
|
$style_relative_path = '_inc/blocks/' . $type . '/view' . ( is_rtl() ? '.rtl' : '' ) . '.css'; |
| 116 |
|
if ( self::block_has_asset( $style_relative_path ) ) { |
| 117 |
|
$style_version = self::get_asset_version( $style_relative_path ); |
| 118 |
|
$view_style = plugins_url( $style_relative_path, JETPACK__PLUGIN_FILE ); |
| 119 |
|
wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
| 120 |
|
} |
| 121 |
|
|
| 122 |
|
// Enqueue script. |
| 123 |
|
$script_relative_path = '_inc/blocks/' . $type . '/view.js'; |
|
@@ 124-128 (lines=5) @@
|
| 121 |
|
|
| 122 |
|
// Enqueue script. |
| 123 |
|
$script_relative_path = '_inc/blocks/' . $type . '/view.js'; |
| 124 |
|
if ( self::block_has_asset( $script_relative_path ) ) { |
| 125 |
|
$script_version = self::get_asset_version( $script_relative_path ); |
| 126 |
|
$view_script = plugins_url( $script_relative_path, JETPACK__PLUGIN_FILE ); |
| 127 |
|
wp_enqueue_script( 'jetpack-block-' . $type, $view_script, array(), $script_version, false ); |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
/** |