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 / classes / htaccess.php

htaccess.php in Elementor Website Builder – more than just a page builder 3.0.7, at core/debug/classes/htaccess.php

47 lines 1.1 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\Classes;
3
4 use Elementor\Modules\SafeMode\Module as Safe_Mode;
5
6 class Htaccess extends Inspection_Base {
7
8 private $message = '';
9
10 public function __construct() {
11 $this->message = __( 'Your site\'s .htaccess file appears to be missing.', 'elementor' );
12 }
13
14 public function run() {
15 $safe_mode_enabled = get_option( Safe_Mode::OPTION_ENABLED, '' );
16 if ( empty( $safe_mode_enabled ) || is_multisite() ) {
17 return true;
18 }
19
20 $permalink_structure = get_option( 'permalink_structure' );
21 if ( empty( $permalink_structure ) || empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
22 return true;
23 }
24
25 $server = strtoupper( $_SERVER['SERVER_SOFTWARE'] );
26
27 if ( strstr( $server, 'APACHE' ) ) {
28 $htaccess_file = get_home_path() . '.htaccess';
29 $this->message .= ' ' . sprintf( __( 'File Path: %s', 'elementor' ), $htaccess_file ) . ' ';
30 return file_exists( $htaccess_file );
31 }
32 return true;
33 }
34
35 public function get_name() {
36 return 'apache-htaccess';
37 }
38
39 public function get_message() {
40 return $this->message;
41 }
42
43 public function get_help_doc_url() {
44 return 'https://go.elementor.com/preview-not-loaded/#htaccess';
45 }
46 }
47