Elementor Custom Skin - Version 1.3.6

Version Description

Download this release

Release Info

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

Code changes from version 1.3.4 to 1.3.6

Files changed (3) hide show
  1. ele-custom-skin.php +3 -2
  2. includes/enqueue-styles.php +36 -0
  3. readme.txt +4 -1
ele-custom-skin.php CHANGED
@@ -1,7 +1,7 @@
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,10 +18,11 @@ 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.4');
22
 
23
  include_once ELECS_DIR.'includes/ecs-notices.php';
24
  include_once ELECS_DIR.'includes/ecs-dependencies.php';
 
25
 
26
  //check if Elementor is installed
27
 
1
  <?php
2
  /*
3
  * Plugin Name: Ele Custom Skin
4
+ * Version: 1.3.5
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.5');
22
 
23
  include_once ELECS_DIR.'includes/ecs-notices.php';
24
  include_once ELECS_DIR.'includes/ecs-dependencies.php';
25
+ include_once ELECS_DIR.'includes/enqueue-styles.php';
26
 
27
  //check if Elementor is installed
28
 
includes/enqueue-styles.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ class ECS_Enqueue_Style {
5
+ public function __construct() {
6
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles' ) );
7
+ }
8
+ function get_skin_template(){
9
+ global $wpdb;
10
+ $templates = $wpdb->get_results(
11
+ "SELECT $wpdb->term_relationships.object_id as ID, $wpdb->posts.post_modified as post_modified FROM $wpdb->term_relationships
12
+ INNER JOIN $wpdb->term_taxonomy ON
13
+ $wpdb->term_relationships.term_taxonomy_id=$wpdb->term_taxonomy.term_taxonomy_id
14
+ INNER JOIN $wpdb->terms ON
15
+ $wpdb->term_taxonomy.term_id=$wpdb->terms.term_id AND $wpdb->terms.slug='loop'
16
+ INNER JOIN $wpdb->posts ON
17
+ $wpdb->term_relationships.object_id=$wpdb->posts.ID
18
+ WHERE $wpdb->posts.post_status='publish'"
19
+ );
20
+ foreach ( $templates as $template ) {
21
+ $options[ $template->ID ] = strtotime($template->post_modified);
22
+ }
23
+ return $options;
24
+ }
25
+ public function frontend_styles() {
26
+ $styles=$this->get_skin_template();
27
+ $upload_dir = wp_upload_dir();
28
+ foreach($styles as $id => $ver){
29
+ $style_url = $upload_dir['baseurl'].'/elementor/css/post-'.$id.'.css';
30
+ $style_file = $upload_dir['basedir'].'/elementor/css/post-'.$id.'.css';
31
+ if (file_exists($style_file)) wp_enqueue_style('elementor-post-'.$id, $style_url, array(), $ver);
32
+ }
33
+ }
34
+
35
+ }
36
+ new ECS_Enqueue_Style();
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.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,9 @@ Add to your template a Post or Post Archive widget and from Skins select Custom
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.
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.5
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.5 =
63
+ * Fixing "CSS flashing" by adding the Loop Template Stylesheet in the Head section of the HTML.
64
+
65
  = 1.3.4 =
66
  * Now you can preview any post_type while you edit Loop Template, including woocommerce products.
67
  * Fixed dependecies issues.