PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.0
Elementor Website Builder – more than just a page builder v4.0.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-widgets / styles / style-file.php

style-file.php in Elementor Website Builder – more than just a page builder 4.0.0, at modules/atomic-widgets/styles/style-file.php

46 lines 946 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\AtomicWidgets\Styles;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly.
7 }
8
9 class Style_File {
10 private string $handle;
11 private string $path;
12 private string $url;
13 private string $media;
14
15 private function __construct( string $handle, string $path, string $url, string $media ) {
16 $this->handle = $handle;
17 $this->path = $path;
18 $this->url = $url;
19 $this->media = $media;
20 }
21
22 public static function create( string $handle, string $path, string $url, string $media ): self {
23 return new self( $handle, $path, $url, $media );
24 }
25
26 public function get_handle(): string {
27 return $this->handle;
28 }
29
30 public function get_path(): string {
31 return $this->path;
32 }
33
34 public function get_url(): string {
35 return $this->url;
36 }
37
38 public function get_media(): string {
39 if ( str_starts_with( $this->media, '@media' ) ) {
40 return substr( $this->media, 6 );
41 }
42
43 return $this->media;
44 }
45 }
46