PluginProbe ʕ •ᴥ•ʔ
ECS – Ele Custom Skin for Elementor / 4.3.6
ECS – Ele Custom Skin for Elementor v4.3.6
4.3.6 4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.11 4.1.10 4.1.9 4.1.8 4.1.6 4.1.7 4.1.5 4.1.4 4.1.1 4.1.2 trunk 1.0.0 1.0.1 1.0.9 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.4 1.2.5 1.3.10 1.3.11 1.3.3 1.3.4 1.3.6 1.3.7 1.3.9 1.4.0 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 4.1.0
ele-custom-skin / includes / enqueue-styles.php
ele-custom-skin / includes Last commit date
admin-bar-menu.php 3 years ago ajax-pagination.php 2 years ago class-ecs-core.php 2 months ago class-ecs-module-base.php 1 month ago class-ecs-modules-manager.php 2 months ago dynamic-style.php 3 years ago ecs-dependencies.php 6 years ago ecs-notices.php 6 years ago enqueue-styles.php 2 years ago pro-features.php 2 months ago pro-preview.php 6 years ago
enqueue-styles.php
46 lines
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' ),99999 );
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 $options=array();
21 foreach ( $templates as $template ) {
22 $options[ $template->ID ] = strtotime($template->post_modified);
23 }
24 if(empty($options)) return false; return $options;
25 }
26 public function frontend_styles() {
27 //adding some css fixes
28
29 wp_enqueue_style('ecs-styles', plugin_dir_url(__DIR__) . 'assets/css/ecs-style.css',array(),ELECS_VER);
30 wp_enqueue_script('ecs-script', plugin_dir_url(__DIR__) . 'assets/js/ecs.js',array(),ELECS_VER);
31
32 $styles=$this->get_skin_template();
33 $upload_dir = wp_upload_dir();
34
35 //some people forget to change the http into https and blame the plugin
36 $upload_dir['baseurl']=set_url_scheme($upload_dir['baseurl']);
37
38 if(is_array($styles)) foreach($styles as $id => $ver){
39 $style_url = $upload_dir['baseurl'].'/elementor/css/post-'.$id.'.css';
40 $style_file = $upload_dir['basedir'].'/elementor/css/post-'.$id.'.css';
41 if (file_exists($style_file)) wp_enqueue_style('elementor-post-'.$id, $style_url, array(), $ver);
42 }
43 }
44
45 }
46 new ECS_Enqueue_Style();