PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.0-dev10
Elementor Website Builder – more than just a page builder v3.6.0-dev10
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.6.0-dev10, at core/debug/classes/htaccess.php

48 lines 1.2 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 = esc_html__( '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 /* translators: %s: Path to .htaccess file. */
30 $this->message .= ' ' . sprintf( esc_html__( 'File Path: %s', 'elementor' ), $htaccess_file ) . ' ';
31 return file_exists( $htaccess_file );
32 }
33 return true;
34 }
35
36 public function get_name() {
37 return 'apache-htaccess';
38 }
39
40 public function get_message() {
41 return $this->message;
42 }
43
44 public function get_help_doc_url() {
45 return 'https://go.elementor.com/preview-not-loaded/#htaccess';
46 }
47 }
48