Elementor Custom Skin - Version 1.2.0

Version Description

  • Now works with WPML
Download this release

Release Info

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

Code changes from version 1.1.5 to 1.2.0

ele-custom-skin.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  * Plugin Name: Ele Custom Skin
4
- * Version: 1.1.5
5
  * Description: Elementor Custom Skin for Posts and Archive Posts. You can create a skin as you want.
6
- * Plugin URI: https://www.eletemplator.com
7
  * Author: Dudaster.com
8
- * Author URI: https://www.leadpro.ro
9
  * Text Domain: ele-custom-skin
10
  * Domain Path: /languages
11
  * License: GPLv3
@@ -17,6 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
17
 
18
  define( 'ELECS_DIR', plugin_dir_path( __FILE__ ));
19
  define( 'ELECS_NAME', plugin_basename( __FILE__ ));
 
20
  add_action( 'elementor_pro/init', 'elecs_elementor_init' );
21
  function elecs_elementor_init(){
22
  //load templates types
@@ -31,10 +32,8 @@ function elecs_add_skins(){
31
  require_once ELECS_DIR.'skins/skin-custom.php';
32
  }
33
 
34
- // it gives me time to do some testing with pro version
35
- if (date("Y-m-d") > "2019-08-12")
36
  include_once ELECS_DIR.'includes/pro-features.php';
37
 
38
  // dynamic background fix
39
  require_once ELECS_DIR.'includes/background-fix.php';
40
- //require_once ELECS_DIR.'includes/pro-features.php';
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
8
+ * Author URI: https://dudaster.com
9
  * Text Domain: ele-custom-skin
10
  * Domain Path: /languages
11
  * License: GPLv3
17
 
18
  define( 'ELECS_DIR', plugin_dir_path( __FILE__ ));
19
  define( 'ELECS_NAME', plugin_basename( __FILE__ ));
20
+ define( 'ELECS_URL', plugin_dir_url( __FILE__ ));
21
  add_action( 'elementor_pro/init', 'elecs_elementor_init' );
22
  function elecs_elementor_init(){
23
  //load templates types
32
  require_once ELECS_DIR.'skins/skin-custom.php';
33
  }
34
 
35
+
 
36
  include_once ELECS_DIR.'includes/pro-features.php';
37
 
38
  // dynamic background fix
39
  require_once ELECS_DIR.'includes/background-fix.php';
 
includes/pro-features.php CHANGED
@@ -12,7 +12,7 @@ function ecs_admin_notice(){
12
  $user_id = get_current_user_id();
13
  if (get_user_meta( $user_id, 'ele_custom_skin_notice_dismissed' )) return;
14
  $offer = '2019-12-29' > date("Y-m-d") ? 'Limited Offer: <b style="color:red;">Unlimited Sites Lifetime License</b>.':"";
15
- $image = '<img width="30px" src="'.plugin_dir_url( __FILE__ ) . 'assets/dudaster_icon.png" style="width:32px;margin-right:10px;margin-bottom: -11px;"/>';
16
  $user = wp_get_current_user();
17
  if ( in_array( 'administrator', (array) $user->roles ) ) {
18
  echo '<div class="notice notice-info " style="padding-right: 38px; position: relative;">
12
  $user_id = get_current_user_id();
13
  if (get_user_meta( $user_id, 'ele_custom_skin_notice_dismissed' )) return;
14
  $offer = '2019-12-29' > date("Y-m-d") ? 'Limited Offer: <b style="color:red;">Unlimited Sites Lifetime License</b>.':"";
15
+ $image = '<img width="30px" src="'.ELECS_URL . 'assets/dudaster_icon.png" style="width:32px;margin-right:10px;margin-bottom: -11px;"/>';
16
  $user = wp_get_current_user();
17
  if ( in_array( 'administrator', (array) $user->roles ) ) {
18
  echo '<div class="notice notice-info " style="padding-right: 38px; position: relative;">
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.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,10 +24,14 @@ For a quick tutorial see Frequently Asked Questions!
24
 
25
  Please let me know if a video tutorial is necessary, or if you already made one let me know so I can link to it.
26
 
27
- For more details and demo check our official site https://www.eletemplator.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
  == Installation ==
32
 
33
  1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
@@ -59,6 +63,9 @@ Add to your template a Post or Post Archive widget and from Skins select Custom
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 1.1.5 =
63
  * Fixed bugs
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.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
24
 
25
  Please let me know if a video tutorial is necessary, or if you already made one let me know so I can link to it.
26
 
27
+ 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
+
35
  == Installation ==
36
 
37
  1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
63
 
64
  == Changelog ==
65
 
66
+ = 1.2.0 =
67
+ * Now works with WPML
68
+
69
  = 1.1.5 =
70
  * Fixed bugs
71
 
skins/skin-custom.php CHANGED
@@ -139,19 +139,25 @@ class Skin_Posts_ECS extends Skin_Base {
139
  $template = $default_template;
140
  /* move to pro */
141
  $template = apply_filters( 'ECS_action_template', $template,$this,$ecs_index );
 
142
 
143
  $ecs_render_loop=get_the_ID().",".$template;
144
  //echo $ecs_render_loop;
145
 
146
 
147
  /* end pro */
148
- //print_r($newTemplate[0]['skin_template']);
149
  if (!$template) return;
150
  $return = \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template );
151
  $ecs_render_loop=false;
152
  $wp_query = $old_query;
153
  return $return;
154
  }
 
 
 
 
 
 
155
 
156
  protected function render_post_header() {
157
  ?>
139
  $template = $default_template;
140
  /* move to pro */
141
  $template = apply_filters( 'ECS_action_template', $template,$this,$ecs_index );
142
+ $template = $this->get_current_ID($template);
143
 
144
  $ecs_render_loop=get_the_ID().",".$template;
145
  //echo $ecs_render_loop;
146
 
147
 
148
  /* end pro */
 
149
  if (!$template) return;
150
  $return = \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template );
151
  $ecs_render_loop=false;
152
  $wp_query = $old_query;
153
  return $return;
154
  }
155
+
156
+ //this is for multilang porpouses... curently WPML
157
+ private function get_current_ID($id){
158
+ $newid = apply_filters( 'wpml_object_id', $id, 'elementor_library', TRUE );
159
+ return $newid ? $newid : $id;
160
+ }
161
 
162
  protected function render_post_header() {
163
  ?>