Envato Elements – Template Kits (Beta) - Version 1.0.1

Version Description

  • 2019-04-09 =
  • Fix: Insert Envato Elements Photos directly into Gutenberg
Download this release

Release Info

Developer dtbaker
Plugin Icon 128x128 Envato Elements – Template Kits (Beta)
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.0.1

envato-elements.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: Beautifully designed, Free templates for popular WordPress page builders & access to Premium Photos from Envato Elements.
5
  * Author: Envato
6
  * Author URI: https://elements.envato.com/extensions/wordpress/?utm_source=extensions&utm_medium=referral&utm_campaign=elements_extensions_wpplugins
7
- * Version: 1.0.0
8
  * License: GPLv3 or later
9
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  *
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  }
29
 
30
  define( 'ENVATO_ELEMENTS_SLUG', 'envato-elements' );
31
- define( 'ENVATO_ELEMENTS_VER', '1.0.0' );
32
  define( 'ENVATO_ELEMENTS_FILE', __FILE__ );
33
  define( 'ENVATO_ELEMENTS_DIR', plugin_dir_path( ENVATO_ELEMENTS_FILE ) );
34
  define( 'ENVATO_ELEMENTS_URI', plugins_url( '/', ENVATO_ELEMENTS_FILE ) );
4
  * Description: Beautifully designed, Free templates for popular WordPress page builders & access to Premium Photos from Envato Elements.
5
  * Author: Envato
6
  * Author URI: https://elements.envato.com/extensions/wordpress/?utm_source=extensions&utm_medium=referral&utm_campaign=elements_extensions_wpplugins
7
+ * Version: 1.0.1
8
  * License: GPLv3 or later
9
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  *
28
  }
29
 
30
  define( 'ENVATO_ELEMENTS_SLUG', 'envato-elements' );
31
+ define( 'ENVATO_ELEMENTS_VER', '1.0.1' );
32
  define( 'ENVATO_ELEMENTS_FILE', __FILE__ );
33
  define( 'ENVATO_ELEMENTS_DIR', plugin_dir_path( ENVATO_ELEMENTS_FILE ) );
34
  define( 'ENVATO_ELEMENTS_URI', plugins_url( '/', ENVATO_ELEMENTS_FILE ) );
inc/class-collection-photos.php CHANGED
@@ -423,37 +423,39 @@ class Collection_Photos extends Collection {
423
 
424
  $result['attachmentData'] = wp_prepare_attachment_for_js( $result['attachment_id'] );
425
 
426
- $result['data'] = [
427
- 'content' => [
428
- [
429
- 'id' => \Elementor\Utils::generate_random_string(),
430
- 'elType' => 'section',
431
- 'settings' => [],
432
- 'isInner' => false,
433
- 'elements' => [
434
- [
435
- 'id' => \Elementor\Utils::generate_random_string(),
436
- 'elType' => 'column',
437
- 'elements' => [
438
- [
439
- 'id' => \Elementor\Utils::generate_random_string(),
440
- 'elType' => 'widget',
441
- 'settings' => [
442
- 'image' => [
443
- 'url' => wp_get_attachment_url( $result['attachment_id'] ),
444
- 'id' => $result['attachment_id'],
 
 
 
445
  ],
446
- 'image_size' => 'full',
447
- ],
448
- 'widgetType' => 'image'
449
- ]
450
  ],
451
- 'isInner' => false
452
- ],
453
  ]
454
  ]
455
- ]
456
- ];
457
  }
458
 
459
  return new \WP_REST_Response( $result, 200 );
423
 
424
  $result['attachmentData'] = wp_prepare_attachment_for_js( $result['attachment_id'] );
425
 
426
+ if ( Elementor::get_instance()->is_deep_integration_enabled() ) {
427
+ $result['data'] = [
428
+ 'content' => [
429
+ [
430
+ 'id' => \Elementor\Utils::generate_random_string(),
431
+ 'elType' => 'section',
432
+ 'settings' => [],
433
+ 'isInner' => false,
434
+ 'elements' => [
435
+ [
436
+ 'id' => \Elementor\Utils::generate_random_string(),
437
+ 'elType' => 'column',
438
+ 'elements' => [
439
+ [
440
+ 'id' => \Elementor\Utils::generate_random_string(),
441
+ 'elType' => 'widget',
442
+ 'settings' => [
443
+ 'image' => [
444
+ 'url' => wp_get_attachment_url( $result['attachment_id'] ),
445
+ 'id' => $result['attachment_id'],
446
+ ],
447
+ 'image_size' => 'full',
448
  ],
449
+ 'widgetType' => 'image'
450
+ ]
451
+ ],
452
+ 'isInner' => false
453
  ],
454
+ ]
 
455
  ]
456
  ]
457
+ ];
458
+ }
459
  }
460
 
461
  return new \WP_REST_Response( $result, 200 );
inc/class-deep-photos.php CHANGED
@@ -35,7 +35,7 @@ class Deep_Photos extends Base {
35
 
36
 
37
  public function load_custom_wp_admin_scripts(){
38
- if ( Elementor::get_instance()->is_deep_integration_enabled() ) {
39
  wp_enqueue_script( 'elements-deep', ENVATO_ELEMENTS_URI . 'assets/js/elements-deep.min.js', [ 'jquery' ], ENVATO_ELEMENTS_VER, true );
40
  wp_enqueue_style( 'elements-deep', ENVATO_ELEMENTS_URI . 'assets/css/elements-deep.min.css', [], ENVATO_ELEMENTS_VER );
41
  Plugin::get_instance()->admin_page_assets_react();
35
 
36
 
37
  public function load_custom_wp_admin_scripts(){
38
+ if ( License::get_instance()->is_activated() ) {
39
  wp_enqueue_script( 'elements-deep', ENVATO_ELEMENTS_URI . 'assets/js/elements-deep.min.js', [ 'jquery' ], ENVATO_ELEMENTS_VER, true );
40
  wp_enqueue_style( 'elements-deep', ENVATO_ELEMENTS_URI . 'assets/css/elements-deep.min.css', [], ENVATO_ELEMENTS_VER );
41
  Plugin::get_instance()->admin_page_assets_react();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: elementor, beaver builder, elements, templates
4
  Requires at least: 4.6
5
  Tested up to: 5.1
6
  Requires PHP: 5.6
7
- Stable tag: 1.0.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -81,6 +81,9 @@ If you have any questions or feedback for the team, please send an email to exte
81
 
82
  == Changelog ==
83
 
 
 
 
84
  = 1.0.0 - 2019-04-09 =
85
  * Feature: Envato Elements Photos Search & Import
86
  * Feature: Media Library Photos Integration
4
  Requires at least: 4.6
5
  Tested up to: 5.1
6
  Requires PHP: 5.6
7
+ Stable tag: 1.0.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.0.1 - 2019-04-09 =
85
+ * Fix: Insert Envato Elements Photos directly into Gutenberg
86
+
87
  = 1.0.0 - 2019-04-09 =
88
  * Feature: Envato Elements Photos Search & Import
89
  * Feature: Media Library Photos Integration