| @@ -35,17 +35,14 @@ | ||
| 35 | 35 | * |
| 36 | 36 | * @since 3.0.0 |
| 37 | 37 | */ |
| 38 | 38 | public static function enqueue() { |
| 39 | - $dependencies = apply_filters( 'wpupg_assets_public_js_dependencies', array() ); | |
| 40 | - | |
| 41 | 39 | wp_register_style( 'wpupg-public', WPUPG_URL . 'dist/public.css', array(), WPUPG_VERSION, 'all' ); |
| 42 | - wp_register_script( 'wpupg-public', WPUPG_URL . 'dist/public.js', $dependencies, WPUPG_VERSION, true ); | |
| 40 | + wp_register_script( 'wpupg-public', WPUPG_URL . 'dist/public.js', array( 'jquery' ), WPUPG_VERSION, true ); | |
| 43 | 41 | |
| 44 | 42 | wp_localize_script( 'wpupg-public', 'wpupg_public', array( |
| 45 | 43 | 'api_nonce' => wp_create_nonce( 'wp_rest' ), |
| 46 | 44 | 'api_endpoint' => get_rest_url( null, 'wp-ultimate-post-grid/v1/items' ), |
| 47 | - 'debugging' => WPUPG_Settings::get( 'enable_debug_messages' ), | |
| 48 | 45 | )); |
| 49 | 46 | } |
| 50 | 47 | |
| 51 | 48 | /** |
| @@ -77,15 +74,8 @@ | ||
| 77 | 74 | |
| 78 | 75 | wp_enqueue_style( 'wpupg-admin', WPUPG_URL . 'dist/admin.css', array(), WPUPG_VERSION, 'all' ); |
| 79 | 76 | wp_enqueue_script( 'wpupg-admin', WPUPG_URL . 'dist/admin.js', $dependencies, WPUPG_VERSION, true ); |
| 80 | 77 | |
| 81 | - // Template Editor. | |
| 82 | - $screen = get_current_screen(); | |
| 83 | - if ( 'grids_page_wpupg_template_editor' === $screen->id ) { | |
| 84 | - wp_enqueue_style( 'wpupg-admin-template', WPUPG_URL . 'dist/admin-template.css', array(), WPUPG_VERSION, 'all' ); | |
| 85 | - wp_enqueue_script( 'wpupg-admin-template', WPUPG_URL . 'dist/admin-template.js', array( 'wpupg-admin' ), WPUPG_VERSION, true ); | |
| 86 | - } | |
| 87 | - | |
| 88 | 78 | // Translations. |
| 89 | 79 | include( WPUPG_DIR . 'templates/admin/translations.php' ); |
| 90 | 80 | |
| 91 | 81 | $wpupg_admin = array( |
| @@ -97,9 +87,8 @@ | ||
| 97 | 87 | 'grid' => get_rest_url( null, 'wp/v2/' . WPUPG_POST_TYPE ), |
| 98 | 88 | 'manage' => get_rest_url( null, 'wp-ultimate-post-grid/v1/manage' ), |
| 99 | 89 | 'notices' => get_rest_url( null, 'wp-ultimate-post-grid/v1/notice' ), |
| 100 | 90 | 'preview' => get_rest_url( null, 'wp-ultimate-post-grid/v1/preview' ), |
| 101 | - 'template' => get_rest_url( null, 'wp-ultimate-post-grid/v1/template' ), | |
| 102 | 91 | ), |
| 103 | 92 | 'addons' => array( |
| 104 | 93 | 'premium' => WPUPG_Addons::is_active( 'premium' ), |
| 105 | 94 | ), |