Elementor Custom Skin - Version 1.2.1

Version Description

  • Fixed summary length in case of a long excerpt
Download this release

Release Info

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

Code changes from version 1.2.0 to 1.2.1

ele-custom-skin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Ele Custom Skin
4
- * Version: 1.2.0
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
1
  <?php
2
  /*
3
  * Plugin Name: Ele Custom Skin
4
+ * Version: 1.2.1
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
includes/pro-preview.php CHANGED
@@ -70,12 +70,52 @@ add_action( 'ECS_after_control', function($skin){
70
  ]
71
  );
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  $skin->add_control(
74
  'upgrade_note',
75
  [
76
- 'label' => __( '<i class="fa fa-lock-open" aria-hidden="true"></i> Alternative templates are a PRO feature. ', 'ele-custom-skin' ),
77
  'type' => \Elementor\Controls_Manager::RAW_HTML,
78
- 'raw' => '<div style="padding-top:10px;line-height:1.6em;text-align:center;"><p>'.__( 'Get full features with Ele Custom Skin PRO, ', 'ele-custom-skin' ).'</p><p><a href="https://dudaster.com/ecs-pro/" target="_blank">'.__( 'Upgrade NOW!', 'ele-custom-skin' ).'</a></p></div>',
79
  'content_classes' => 'your-class',
80
  ]
81
  );
70
  ]
71
  );
72
 
73
+ $skin->add_control(
74
+ 'hr4',
75
+ [
76
+ 'type' => \Elementor\Controls_Manager::DIVIDER,
77
+ ]
78
+ );
79
+ $skin->add_control(
80
+ 'key_title',
81
+ [
82
+ 'label' => __( 'Dynamic Everywhere', 'ele-custom-skin' ),
83
+ 'type' => \Elementor\Controls_Manager::HEADING,
84
+ ]
85
+ );
86
+ $skin->add_control(
87
+ 'use_keywords',
88
+ [
89
+ 'label' => '<i class="fa fa-lock" aria-hidden="true"></i> '.__( 'Using Dynamic Keywords', 'ele-custom-skin' ),
90
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
91
+ 'label_on' => __( 'Yes', 'ele-custom-skin' ),
92
+ 'label_off' => __( 'No', 'ele-custom-skin' ),
93
+ 'return_value' => 'yes',
94
+ 'default' => 'no',
95
+ ]
96
+ );
97
+
98
+ $skin->add_control(
99
+ 'keywords_note',
100
+ [
101
+ 'label' => '',
102
+ 'type' => \Elementor\Controls_Manager::RAW_HTML,
103
+ 'raw' => '<div>Replace all the dynamic {{keywords}} from the Loop Template.</div>',
104
+ ]
105
+ );
106
+
107
+ $skin->add_control(
108
+ 'hr6',
109
+ [
110
+ 'type' => \Elementor\Controls_Manager::DIVIDER,
111
+ ]
112
+ );
113
  $skin->add_control(
114
  'upgrade_note',
115
  [
116
+ 'label' => '<i class="fa fa-lock-open" aria-hidden="true"></i> <b>'.__( 'Unlock PRO features. ', 'ele-custom-skin' ).'</b>',
117
  'type' => \Elementor\Controls_Manager::RAW_HTML,
118
+ 'raw' => '<div style="padding-top:10px;line-height:1.6em;text-align:center;"><p>'.__( 'Get full features with <b><i>Ele Custom Skin PRO</i></b>, ', 'ele-custom-skin' ).'</p><p style="padding-top:10px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://dudaster.com/ecs-pro/" target="_blank">'.__( 'Go Pro', 'ele-custom-skin' ).'</a></p></div>',
119
  'content_classes' => 'your-class',
120
  ]
121
  );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: page-builder, elementor, loop, archive list, post widget, skin, custom
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.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -16,9 +16,7 @@ This plugin adds new skin to Elementor Page Builder Posts and Posts Archive widg
16
 
17
  You can design a loop item just like a single template and it would be used as a skin.
18
 
19
- [youtube http://www.youtube.com/watch?v=NPkL7AesG-E]
20
-
21
- Thanks to Avro for the video!
22
 
23
  For a quick tutorial see Frequently Asked Questions!
24
 
@@ -28,7 +26,7 @@ For more details and demo check our official site https://dudaster.com/
28
 
29
  Note: This plugin is an addon of Elementor Page Builder (https://wordpress.org/plugins/elementor/) and will only work with Elementor Page Builder installed.
30
 
31
- Also check Elementor Custom Skin Pro!
32
 
33
  You can expand your freedom in more ways than you can imagine. Check it out at https://dudaster.com/ecs-pro/ !
34
 
@@ -63,6 +61,9 @@ Add to your template a Post or Post Archive widget and from Skins select Custom
63
 
64
  == Changelog ==
65
 
 
 
 
66
  = 1.2.0 =
67
  * Now works with WPML
68
 
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.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
16
 
17
  You can design a loop item just like a single template and it would be used as a skin.
18
 
19
+ [youtube http://www.youtube.com/watch?v=DwLFdaZ69KU&t=94]
 
 
20
 
21
  For a quick tutorial see Frequently Asked Questions!
22
 
26
 
27
  Note: This plugin is an addon of Elementor Page Builder (https://wordpress.org/plugins/elementor/) and will only work with Elementor Page Builder installed.
28
 
29
+ Also check <a href="https://dudaster.com/ecs-pro/" target="_blank">Elementor Custom Skin Pro</a>!
30
 
31
  You can expand your freedom in more ways than you can imagine. Check it out at https://dudaster.com/ecs-pro/ !
32
 
61
 
62
  == Changelog ==
63
 
64
+ = 1.2.1 =
65
+ * Fixed summary length in case of a long excerpt
66
+
67
  = 1.2.0 =
68
  * Now works with WPML
69
 
skins/skin-custom.php CHANGED
@@ -167,9 +167,11 @@ class Skin_Posts_ECS extends Skin_Base {
167
  protected function render_post() {
168
  $this->render_post_header();
169
  if ($this->get_instance_value( 'skin_template' )){
170
- if (function_exists("parse_content")) {
171
  global $post;
172
- echo parse_content($this->get_template(),$post);
 
 
173
  }
174
  else echo $this->get_template();
175
  }
167
  protected function render_post() {
168
  $this->render_post_header();
169
  if ($this->get_instance_value( 'skin_template' )){
170
+ if ($this->get_instance_value( 'use_keywords' ) == "yes") {
171
  global $post;
172
+ $template = $this->get_template();
173
+ $new_template = apply_filters( 'ecs_dynamic_filter', $template, $post );
174
+ echo $new_template ? $new_template : $template;
175
  }
176
  else echo $this->get_template();
177
  }
theme-builder/dynamic-tags/tags/post-summary.php CHANGED
@@ -43,6 +43,21 @@ class Post_Summary extends Tag {
43
  public function render() {
44
  add_filter( 'excerpt_more',function(){return '';}, 20 );
45
  add_filter( 'excerpt_length', function(){$settings = $this->get_settings(); return $settings['length'];}, 20 );
46
- echo get_the_excerpt();
47
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
43
  public function render() {
44
  add_filter( 'excerpt_more',function(){return '';}, 20 );
45
  add_filter( 'excerpt_length', function(){$settings = $this->get_settings(); return $settings['length'];}, 20 );
46
+ echo $this->excerpt();
47
  }
48
+
49
+ public function excerpt() {
50
+ $settings = $this->get_settings();
51
+ $limit = $settings['length'];
52
+ $excerpt = explode(' ',get_the_excerpt(), $limit);
53
+ if (count($excerpt)>=$limit) {
54
+ array_pop($excerpt);
55
+ $excerpt = implode(" ",$excerpt);
56
+ } else {
57
+ $excerpt = implode(" ",$excerpt);
58
+ }
59
+ $excerpt = preg_replace('`[[^]]*]`','',$excerpt);
60
+ return $excerpt;
61
+ }
62
+
63
  }