| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
| 2 | - | |
| 3 | -use Automattic\Jetpack\Assets; | |
| 4 | - | |
| 5 | 2 | /** |
| 6 | 3 | * Presentations |
| 7 | 4 | * Presentations plugin based on the work done by <a href="http://darylkoop.com/">Daryl Koopersmith</a>. Powered by jmpress.js |
| 8 | 5 | * |
| @@ -55,8 +52,14 @@ | ||
| 55 | 52 | * |
| 56 | 53 | * @package automattic/jetpack |
| 57 | 54 | */ |
| 58 | 55 | |
| 56 | +use Automattic\Jetpack\Assets; | |
| 57 | + | |
| 58 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 59 | + exit( 0 ); | |
| 60 | +} | |
| 61 | + | |
| 59 | 62 | if ( ! class_exists( 'Presentations' ) ) : |
| 60 | 63 | /** |
| 61 | 64 | * Create a shortcode to display Presentations and slides. |
| 62 | 65 | */ |
| @@ -120,19 +123,19 @@ | ||
| 120 | 123 | // Add CSS. |
| 121 | 124 | wp_enqueue_style( 'presentations', $plugin . 'css/style.css', array(), JETPACK__VERSION ); |
| 122 | 125 | // Add JavaScript. |
| 123 | 126 | wp_enqueue_script( 'jquery' ); |
| 124 | - wp_enqueue_script( | |
| 125 | - 'jmpress', | |
| 126 | - 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 ), | |
| 127 | 130 | array( 'jquery' ), |
| 128 | - JETPACK__VERSION, | |
| 131 | + '20251030', | |
| 129 | 132 | true |
| 130 | 133 | ); |
| 131 | 134 | wp_enqueue_script( |
| 132 | 135 | 'presentations', |
| 133 | 136 | Assets::get_file_url_for_environment( '_inc/build/shortcodes/js/main.min.js', 'modules/shortcodes/js/main.js' ), |
| 134 | - array( 'jquery', 'jmpress' ), | |
| 137 | + array( 'jquery', 'jetpack-shortcode-deps' ), | |
| 135 | 138 | JETPACK__VERSION, |
| 136 | 139 | true |
| 137 | 140 | ); |
| 138 | 141 | } |