| @@ -54,8 +54,12 @@ | ||
| 54 | 54 | */ |
| 55 | 55 | |
| 56 | 56 | use Automattic\Jetpack\Assets; |
| 57 | 57 | |
| 58 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 59 | + exit( 0 ); | |
| 60 | +} | |
| 61 | + | |
| 58 | 62 | if ( ! class_exists( 'Presentations' ) ) : |
| 59 | 63 | /** |
| 60 | 64 | * Create a shortcode to display Presentations and slides. |
| 61 | 65 | */ |
| @@ -119,19 +123,19 @@ | ||
| 119 | 123 | // Add CSS. |
| 120 | 124 | wp_enqueue_style( 'presentations', $plugin . 'css/style.css', array(), JETPACK__VERSION ); |
| 121 | 125 | // Add JavaScript. |
| 122 | 126 | wp_enqueue_script( 'jquery' ); |
| 123 | - wp_enqueue_script( | |
| 124 | - 'jmpress', | |
| 125 | - Assets::get_file_url_for_environment( '_inc/build/shortcodes/js/jmpress.min.js', 'modules/shortcodes/js/jmpress.js' ), | |
| 127 | + wp_register_script( | |
| 128 | + 'jetpack-shortcode-deps', | |
| 129 | + plugins_url( '_inc/build/shortcodes/js/dependencies.min.js', JETPACK__PLUGIN_FILE ), | |
| 126 | 130 | array( 'jquery' ), |
| 127 | - JETPACK__VERSION, | |
| 131 | + '20251030', | |
| 128 | 132 | true |
| 129 | 133 | ); |
| 130 | 134 | wp_enqueue_script( |
| 131 | 135 | 'presentations', |
| 132 | 136 | Assets::get_file_url_for_environment( '_inc/build/shortcodes/js/main.min.js', 'modules/shortcodes/js/main.js' ), |
| 133 | - array( 'jquery', 'jmpress' ), | |
| 137 | + array( 'jquery', 'jetpack-shortcode-deps' ), | |
| 134 | 138 | JETPACK__VERSION, |
| 135 | 139 | true |
| 136 | 140 | ); |
| 137 | 141 | } |