PluginProbe
Custom 404 Pro / trunk
Custom 404 Pro vtrunk
3.15.2 3.15.4 3.15.5 3.15.6 3.16.0 3.15.1 3.15.0 3.14.1 3.14.0 3.13.0 trunk 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.5 1.1.6 1.2.0 1.3.10 1.3.12 1.3.5 All 100 releases
custom-404-pro / admin / views / settings.php

settings.php in Custom 404 Pro trunk, at admin/views/settings.php

39 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Settings page view.
4 *
5 * @package Custom_404_Pro
6 */
7
8 $c4p_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
9 $active_tab = empty( $c4p_tab ) ? 'global-redirect' : $c4p_tab;
10
11 ?>
12
13 <div class="wrap">
14 <h2><?php esc_html_e( 'Settings', 'custom-404-pro' ); ?></h2>
15 <h2 class="nav-tab-wrapper">
16 <a href="?page=c4p-settings&tab=global-redirect" class="nav-tab <?php echo ( 'global-redirect' === $active_tab || '' === $active_tab ) ? 'nav-tab-active' : ''; ?>">
17 <?php esc_html_e( 'Redirect', 'custom-404-pro' ); ?>
18 </a>
19 <a href="?page=c4p-settings&tab=general" class="nav-tab <?php echo 'general' === $active_tab ? 'nav-tab-active' : ''; ?>">
20 <?php esc_html_e( 'General', 'custom-404-pro' ); ?>
21 </a>
22 </h2>
23 </div>
24
25 <?php
26
27 switch ( $active_tab ) {
28 case '':
29 include 'settings-global-redirect.php';
30 break;
31 case 'global-redirect':
32 include 'settings-global-redirect.php';
33 break;
34 case 'general':
35 include 'settings-general.php';
36 break;
37 }
38 ?>
39