Elementor Custom Skin - Version 1.3.4

Version Description

  • Now you can preview any post_type while you edit Loop Template, including woocommerce products.
  • Fixed dependecies issues.
Download this release

Release Info

Developer dudaster
Plugin Icon 128x128 Elementor Custom Skin
Version 1.3.4
Comparing to
See all releases

Code changes from version 1.3.3 to 1.3.4

ele-custom-skin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Ele Custom Skin
4
- * Version: 1.3.3
5
  * Description: Elementor Custom Skin for Posts and Archive Posts. You can create a skin as you want.
6
  * Plugin URI: https://dudaster.com
7
  * Author: Dudaster.com
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
  define( 'ELECS_DIR', plugin_dir_path( __FILE__ ));
19
  define( 'ELECS_NAME', plugin_basename( __FILE__ ));
20
  define( 'ELECS_URL', plugin_dir_url( __FILE__ ));
21
- define ('ELECS_VER','1.3.3');
22
 
23
  include_once ELECS_DIR.'includes/ecs-notices.php';
24
  include_once ELECS_DIR.'includes/ecs-dependencies.php';
1
  <?php
2
  /*
3
  * Plugin Name: Ele Custom Skin
4
+ * Version: 1.3.4
5
  * Description: Elementor Custom Skin for Posts and Archive Posts. You can create a skin as you want.
6
  * Plugin URI: https://dudaster.com
7
  * Author: Dudaster.com
18
  define( 'ELECS_DIR', plugin_dir_path( __FILE__ ));
19
  define( 'ELECS_NAME', plugin_basename( __FILE__ ));
20
  define( 'ELECS_URL', plugin_dir_url( __FILE__ ));
21
+ define ('ELECS_VER','1.3.4');
22
 
23
  include_once ELECS_DIR.'includes/ecs-notices.php';
24
  include_once ELECS_DIR.'includes/ecs-dependencies.php';
includes/ecs-dependencies.php CHANGED
@@ -9,7 +9,7 @@ function ecs_dependencies(){
9
  $ecs_multi_site = get_blog_option(get_current_blog_id(), 'active_plugins');
10
  $ecs_multi_site = isset($ecs_multi_site) ? $ecs_multi_site : [];
11
  $ecs_multi_sitewide=get_site_option( 'active_sitewide_plugins') ;
12
- foreach($ecs_multi_sitewide as $ecs_key => $ecs_value){
13
  $ecs_multi_site[] = $ecs_key;
14
  }
15
  $ecs_plugins = $ecs_multi_site;
9
  $ecs_multi_site = get_blog_option(get_current_blog_id(), 'active_plugins');
10
  $ecs_multi_site = isset($ecs_multi_site) ? $ecs_multi_site : [];
11
  $ecs_multi_sitewide=get_site_option( 'active_sitewide_plugins') ;
12
+ if (is_array($ecs_multi_sitewide)) foreach($ecs_multi_sitewide as $ecs_key => $ecs_value){
13
  $ecs_multi_site[] = $ecs_key;
14
  }
15
  $ecs_plugins = $ecs_multi_site;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: page-builder, elementor, loop, archive list, post widget, skin, custom, po
4
  Donate link: https://www.paypal.me/dudaster
5
  Requires at least: 5.0
6
  Tested up to: 5.2.3
7
- Stable tag: 1.3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,10 @@ Add to your template a Post or Post Archive widget and from Skins select Custom
59
 
60
  == Changelog ==
61
 
 
 
 
 
62
  = 1.3.3 =
63
  * Fixed issues missing Post Widget Panel
64
 
4
  Donate link: https://www.paypal.me/dudaster
5
  Requires at least: 5.0
6
  Tested up to: 5.2.3
7
+ Stable tag: 1.3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  == Changelog ==
61
 
62
+ = 1.3.4 =
63
+ * Now you can preview any post_type while you edit Loop Template, including woocommerce products.
64
+ * Fixed dependecies issues.
65
+
66
  = 1.3.3 =
67
  * Fixed issues missing Post Widget Panel
68
 
theme-builder/documents/loop.php CHANGED
@@ -1,11 +1,13 @@
1
  <?php
2
  namespace ElementorPro\Modules\ThemeBuilder\Documents;
 
 
3
 
4
  if ( ! defined( 'ABSPATH' ) ) {
5
  exit; // Exit if accessed directly
6
  }
7
 
8
- class Loop extends Theme_Document {
9
 
10
  public static function get_properties() {
11
  $properties = parent::get_properties();
@@ -25,17 +27,48 @@ class Loop extends Theme_Document {
25
  return __( 'Loop', 'ele-custom-skin' );
26
  }
27
 
28
- public static function get_preview_as_default() {
29
- return '';
30
- }
31
 
 
32
  public static function get_preview_as_options() {
33
- return array_merge(
34
- [
35
- '',
 
 
 
 
 
 
 
 
 
 
36
  ],
37
- Single::get_preview_as_options()
38
- );
39
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  }
1
  <?php
2
  namespace ElementorPro\Modules\ThemeBuilder\Documents;
3
+ use ElementorPro\Modules\ThemeBuilder\Documents\Single;
4
+ use ElementorPro\Modules\ThemeBuilder\Module;
5
 
6
  if ( ! defined( 'ABSPATH' ) ) {
7
  exit; // Exit if accessed directly
8
  }
9
 
10
+ class Loop extends Single {
11
 
12
  public static function get_properties() {
13
  $properties = parent::get_properties();
27
  return __( 'Loop', 'ele-custom-skin' );
28
  }
29
 
30
+ /*
31
+
32
+ Let's be undependable from Preview As options
33
 
34
+ */
35
  public static function get_preview_as_options() {
36
+ $post_types = self::get_public_post_types();//Module::get_public_post_types();
37
+
38
+ $post_types['attachment'] = get_post_type_object( 'attachment' )->label;
39
+ $post_types_options = [];
40
+
41
+ foreach ( $post_types as $post_type => $label ) {
42
+ $post_types_options[ 'single/' . $post_type ] = get_post_type_object( $post_type )->labels->singular_name;
43
+ }
44
+
45
+ return [
46
+ 'single' => [
47
+ 'label' => __( 'Single', 'elementor-pro' ),
48
+ 'options' => $post_types_options,
49
  ],
50
+ 'page/404' => __( '404', 'elementor-pro' ),
51
+ ];
52
  }
53
+
54
+ public static function get_public_post_types(){
55
+ //Array ( [post] => Posts [page] => Pages )
56
+ $post_types_options = [];
57
+ $args = array(
58
+ 'public' => true,
59
+ );
60
+ $output = 'objects'; // names or objects
61
+ $post_types = get_post_types( $args, $output );
62
+ foreach ( $post_types as $post_type ) {
63
+ if ('elementor_library' != $post_type->name) $post_types_options[$post_type->name]= $post_type->label ;
64
+ }
65
+ return $post_types_options;
66
+ }
67
+ /*
68
+
69
+ I want a preview like the template not default
70
+
71
+ */
72
+
73
 
74
  }