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

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