| @@ -122,16 +122,16 @@ | ||
| 122 | 122 | 'types' => $types |
| 123 | 123 | ]; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - $script_dependencies = ['regenerator-runtime']; | |
| 126 | + $script_dependencies = []; | |
| 127 | 127 | $_localize_handle = 'templately'; |
| 128 | 128 | $_current_screen = 'templately'; |
| 129 | 129 | |
| 130 | 130 | if ( $hook === 'elementor' || $hook === 'gutenberg' ) { |
| 131 | - $_current_screen = $hook; | |
| 132 | - $_localize_handle = 'templately-' . $hook; | |
| 133 | - $script_dependencies[] = $_localize_handle; | |
| 131 | + $_current_screen = $hook; | |
| 132 | + $_localize_handle = 'templately-' . $hook; | |
| 133 | + $script_dependencies = [$_localize_handle]; | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | if ( $hook === 'toplevel_page_templately' || $hook == 'edit.php' ) { |
| 137 | 137 | templately()->assets->enqueue( 'templately-admin', 'css/admin.css', [ 'templately' ] ); |
| @@ -142,9 +142,8 @@ | ||
| 142 | 142 | 'templately-dmsans', |
| 143 | 143 | set_url_scheme( '//fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap' ) |
| 144 | 144 | ); |
| 145 | 145 | |
| 146 | - wp_enqueue_media(); | |
| 147 | 146 | templately()->assets->enqueue( 'templately', 'js/templately.js', $script_dependencies, true ); |
| 148 | 147 | templately()->assets->enqueue( 'templately', 'css/templately.css', ['templately-dmsans'] ); |
| 149 | 148 | |
| 150 | 149 | /** |