PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.7
Elementor Website Builder – more than just a page builder v3.0.7
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 / debug / loading-inspection-manager.php

loading-inspection-manager.php in Elementor Website Builder – more than just a page builder 3.0.7, at core/debug/loading-inspection-manager.php

55 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Core\Debug;
3
4 use Elementor\Core\Debug\Classes\Inspection_Base;
5 use Elementor\Core\Debug\Classes\Theme_Missing;
6 use Elementor\Core\Debug\Classes\Htaccess;
7
8 class Loading_Inspection_Manager {
9
10 public static $_instance = null;
11
12 public static function instance() {
13 if ( null === self::$_instance ) {
14 self::$_instance = new Loading_Inspection_Manager();
15 }
16 return self::$_instance;
17 }
18
19 /** @var Inspection_Base[] */
20 private $inspections = [];
21
22 public function register_inspections() {
23 $this->inspections['theme-missing'] = new Theme_Missing();
24 $this->inspections['htaccess'] = new Htaccess();
25 }
26
27 /**
28 * @param Inspection_Base $inspection
29 */
30 public function register_inspection( $inspection ) {
31 $this->inspections[ $inspection->get_name() ] = $inspection;
32 }
33
34 public function run_inspections() {
35 $debug_data = [
36 'message' => __( 'We\'re sorry, but something went wrong. Click on \'Learn more\' and follow each of the steps to quickly solve it.', 'elementor' ),
37 'header' => __( 'The preview could not be loaded', 'elementor' ),
38 'doc_url' => 'https://go.elementor.com/preview-not-loaded/',
39 ];
40 foreach ( $this->inspections as $inspection ) {
41 if ( ! $inspection->run() ) {
42 $debug_data = [
43 'message' => $inspection->get_message(),
44 'header' => $inspection->get_header_message(),
45 'doc_url' => $inspection->get_help_doc_url(),
46 'error' => true,
47 ];
48 break;
49 }
50 }
51
52 return $debug_data;
53 }
54 }
55