PluginProbe ʕ •ᴥ•ʔ
ECS – Ele Custom Skin for Elementor / 4.3.11
ECS – Ele Custom Skin for Elementor v4.3.11
4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 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 / ecs-assets.php
ele-custom-skin / includes Last commit date
admin-bar-menu.php 4 years ago ajax-pagination.php 2 weeks ago class-ecs-core.php 4 months ago class-ecs-module-base.php 2 weeks ago class-ecs-modules-manager.php 3 months ago dynamic-style.php 4 years ago ecs-assets.php 2 weeks ago ecs-dependencies.php 6 years ago ecs-notices.php 6 years ago enqueue-styles.php 2 weeks ago pro-features.php 4 months ago pro-preview.php 6 years ago
ecs-assets.php
35 lines
1 <?php
2 /**
3 * Minified asset URL helper.
4 *
5 * .min.css / .min.js files are generated at release time (see
6 * release-ecs-free.py / release-ecs-pro.py) and are not committed to the
7 * plugin's git repository — only the SVN/zip release build ships them.
8 * Falls back to the unminified file when SCRIPT_DEBUG is on, or when the
9 * .min file doesn't exist yet (e.g. running straight from git checkout).
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) exit;
13
14 /**
15 * @param string $url Full enqueue URL for a .css or .js file.
16 * @param string $path Filesystem path to the same file (to check the .min
17 * file actually exists before pointing at it).
18 */
19 function ecs_asset_url( string $url, string $path ): string {
20 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
21 return $url;
22 }
23
24 if ( ! preg_match( '/\.(css|js)$/', $path ) || str_ends_with( $path, '.min.css' ) || str_ends_with( $path, '.min.js' ) ) {
25 return $url;
26 }
27
28 $min_path = preg_replace( '/\.(css|js)$/', '.min.$1', $path );
29 if ( ! file_exists( $min_path ) ) {
30 return $url;
31 }
32
33 return preg_replace( '/\.(css|js)$/', '.min.$1', $url );
34 }
35