PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.5.2
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.5.2
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Core/Platform/Elementor.php +3 -17 3.6.53.5.2 View file →
@@ -47,9 +47,8 @@
47 47 * @return void
48 48 */
49 49 public function styles() {
50 50 templately()->assets->enqueue( 'templately-elementor-preview', 'css/elementor.css' );
51 - templately()->assets->enqueue( 'templately-tailwind', 'css/tailwind.css', ['templately-elementor-preview'] );
52 51 }
53 52
54 53 /**
55 54 * Assets Enqueueing
@@ -56,9 +55,8 @@
56 55 * @return void
57 56 */
58 57 public function scripts() {
59 58 templately()->assets->enqueue( 'templately-elementor', 'css/elementor.css' );
60 - templately()->assets->enqueue( 'templately-tailwind', 'css/tailwind.css', ['templately-elementor'] );
61 59 templately()->assets->enqueue( 'templately-elementor', 'js/elementor.js', [ 'jquery' ], true );
62 60 templately()->admin->scripts( 'elementor' );
63 61 }
64 62
@@ -76,9 +74,9 @@
76 74 * Checking the template eligibility for import.
77 75 *
78 76 * @return WP_Error|void
79 77 */
80 - protected function is_eligible( $template, $types = [ 'page', 'section','block' ] ) {
78 + protected function is_eligible( $template, $types = [ 'page', 'section' ] ) {
81 79 if ( ! Helper::is_plugin_active( 'elementor-pro/elementor-pro.php' ) &&
82 80 isset( $template['type'] ) &&
83 81 ! in_array( $template['type'], $types, true )
84 82 ) {
@@ -242,9 +240,9 @@
242 240 * @since 2.0.0
243 241 *
244 242 * @return array|WP_Error array on success, WP_Error on failure.
245 243 */
246 - public function create_page( $id, $title, $importer = null, $settings = [] ) {
244 + public function create_page( $id, $title, $importer = null ) {
247 245 $template_data = $importer->get_content( $id );
248 246
249 247 if ( is_wp_error( $template_data ) ) {
250 248 return $template_data;
@@ -249,12 +247,8 @@
249 247 if ( is_wp_error( $template_data ) ) {
250 248 return $template_data;
251 249 }
252 250
253 - if ( ! empty( $settings ) && ! empty( $template_data['content'] ) && is_array( $template_data['content'] ) ) {
254 - $template_data['content'] = \Templately\Core\Importer\Utils\ElementorSettingsMerger::merge( $template_data['content'], $settings );
255 - }
256 -
257 251 $importer = new ElementorImporter;
258 252 $template_data = $importer->get_data( $template_data );
259 253
260 254 if ( ! empty( $title ) ) {
@@ -287,21 +281,13 @@
287 281 'visit' => get_permalink( $inserted_ID )
288 282 ];
289 283 }
290 284
291 - public function import_in_library( $id, $importer = null, $settings = [] ) {
285 + public function import_in_library( $id, $importer = null ) {
292 286 $template_data = $importer->get_content( $id, 'elementor', 'remote' );
293 287
294 288 if ( is_wp_error( $template_data ) ) {
295 289 return $template_data;
296 - }
297 -
298 - if ( ! empty( $settings ) && ! empty( $template_data['content'] ) && is_array( $template_data['content'] ) ) {
299 - $template_data['content'] = \Templately\Core\Importer\Utils\ElementorSettingsMerger::merge( $template_data['content'], $settings );
300 - }
301 -
302 - if(trim($template_data['type']) == 'block'){
303 - $template_data['type'] = 'section';
304 290 }
305 291
306 292 $importer = new ElementorImporter;
307 293 $imported_template = $importer->import_in_library( $template_data );