PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.4
Elementor Website Builder – more than just a page builder v3.25.4
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 / core / frontend / performance.php

performance.php in Elementor Website Builder – more than just a page builder 3.25.4, at core/frontend/performance.php

35 lines 797 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Core\Frontend;
3
4 use Elementor\Plugin;
5
6 class Performance {
7
8 private static $use_style_controls = false;
9
10 private static $is_frontend = null;
11
12 public static function set_use_style_controls( bool $bool ): void {
13 static::$use_style_controls = $bool;
14 }
15
16 public static function is_use_style_controls(): bool {
17 return static::$use_style_controls;
18 }
19
20 public static function should_optimize_controls() {
21 if ( null === static::$is_frontend ) {
22 static::$is_frontend = (
23 ! is_admin()
24 && ! Plugin::$instance->preview->is_preview_mode()
25 );
26 }
27
28 return static::$is_frontend;
29 }
30
31 public static function is_optimized_control_loading_feature_enabled(): bool {
32 return Plugin::$instance->experiments->is_feature_active( 'e_optimized_control_loading' );
33 }
34 }
35