| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | public function hooks() { |
| 38 | 38 | if ( class_exists( '\Elementor\Plugin' ) ) { |
| 39 | 39 | add_action( 'elementor/preview/enqueue_styles', [ $this, 'styles' ] ); |
| 40 | 40 | add_action( 'elementor/editor/before_enqueue_styles', [ $this, 'styles' ] ); |
| 41 | - add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'scripts' ] ); | |
| 41 | + add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'scripts' ] ); | |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | * @return void |
| 56 | 56 | */ |
| 57 | 57 | public function scripts() { |
| 58 | 58 | templately()->assets->enqueue( 'templately-elementor', 'css/elementor.css' ); |
| 59 | - templately()->assets->enqueue( 'templately-elementor', 'js/elementor.js', [ 'jquery' ], true ); | |
| 59 | + templately()->assets->enqueue( 'templately-elementor', 'js/elementor.js', [ 'jquery' ] ); | |
| 60 | 60 | templately()->admin->scripts( 'elementor' ); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| @@ -284,12 +284,8 @@ | ||
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | $importer = new ElementorImporter; |
| 287 | 287 | $imported_template = $importer->import_in_library( $template_data ); |
| 288 | - | |
| 289 | - if( is_wp_error( $imported_template ) ) { | |
| 290 | - return $imported_template; | |
| 291 | - } | |
| 292 | 288 | |
| 293 | 289 | return [ |
| 294 | 290 | 'post_id' => $imported_template['template_id'], |
| 295 | 291 | 'edit_link' => get_edit_post_link( $imported_template['template_id'], 'internal' ), |