PluginProbe
HTTP Headers / trunk
HTTP Headers vtrunk
1.19.5 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.12.0 1.12.1 1.12.2 1.13.0 1.13.1 1.13.2 1.13.3 1.13.4 1.14.0 1.14.1 1.14.2 1.15.0 All 60 releases
http-headers / views / index.php

index.php in HTTP Headers trunk, at views/index.php

61 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit;
4 }
5 ?>
6 <div class="wrap">
7 <h1>HTTP Headers</h1>
8 <?php
9 $http_headers_check = http_headers_check_web_server_requirements();
10 if ($http_headers_check !== true) {
11 ?>
12 <div class="notice notice-error">
13 <h2><?php esc_html_e('Error!', 'http-headers'); ?></h2>
14 <?php
15 if ($http_headers_check == -1) {
16 ?><p><?php esc_html_e('The following file was not found. Please make sure the file exists and has write permissions:', 'http-headers'); ?> <code><?php echo esc_html(http_headers_get_web_server_filename()); ?></code></p><?php
17 } elseif ($http_headers_check == -2) {
18 ?><p><?php esc_html_e('Please make sure the following file has write permissions:', 'http-headers'); ?> <code><?php echo esc_html(http_headers_get_web_server_filename()); ?></code></p><?php
19 }
20 ?>
21 </div>
22 <?php
23 }
24 $http_headers_check = http_headers_check_php_requirements();
25 if ($http_headers_check !== true) {
26 ?>
27 <div class="notice notice-warning">
28 <h2><?php esc_html_e('Warning!', 'http-headers'); ?></h2>
29 <?php
30 if ($http_headers_check == -1) {
31 ?><p><?php esc_html_e('The following file was not found. Please make sure the file exists and has write permissions:', 'http-headers'); ?> <code><?php echo esc_html(http_headers_get_user_ini_filename()); ?></code></p><?php
32 } elseif ($http_headers_check == -2) {
33 ?><p><?php esc_html_e('Please make sure the following file has write permissions:', 'http-headers'); ?> <code><?php echo esc_html(http_headers_get_user_ini_filename()); ?></code></p><?php
34 }
35 ?>
36 </div>
37 <?php
38 }
39 ?>
40 <p><?php esc_html_e('Quick links', 'http-headers'); ?>:
41 <a href="<?php echo esc_url(get_admin_url()); ?>options-general.php?page=http-headers&amp;tab=advanced"><?php esc_html_e('Advanced settings', 'http-headers'); ?></a>,
42 <a href="<?php echo esc_url(get_admin_url()); ?>options-general.php?page=http-headers&amp;tab=manual"><?php esc_html_e('Manual setup', 'http-headers'); ?></a>,
43 <a href="<?php echo esc_url(get_admin_url()); ?>options-general.php?page=http-headers&amp;tab=inspect"><?php esc_html_e('Inspect headers', 'http-headers'); ?></a>
44 </p>
45 <?php
46 if (isset($_GET['header']) && !empty($_GET['header']))
47 {
48 include dirname(__FILE__) . '/header.php';
49 } elseif (isset($_GET['tab']) && $_GET['tab'] == 'advanced') {
50 include dirname(__FILE__) . '/advanced.php';
51 } elseif (isset($_GET['tab']) && $_GET['tab'] == 'manual') {
52 include dirname(__FILE__) . '/manual.php';
53 } elseif (isset($_GET['tab']) && $_GET['tab'] == 'inspect') {
54 include dirname(__FILE__) . '/inspect.php';
55 } elseif (isset($_GET['category'])) {
56 include dirname(__FILE__) . '/category.php';
57 } else {
58 include dirname(__FILE__) . '/dashboard.php';
59 }
60 ?>
61 </div>