PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.3
Elementor Website Builder – more than just a page builder v4.2.3
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 4.2.3, at core/frontend/performance.php

32 lines 660 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 $is_use ): void {
13 static::$use_style_controls = $is_use;
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 && ! defined( 'REST_REQUEST' )
26 );
27 }
28
29 return static::$is_frontend;
30 }
31 }
32