header.php
6.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
namespace W3TC;
if ( !defined( 'W3TC' ) )
die();
$config = Dispatcher::config();
$page = Util_Admin::get_current_page();
$licensing_visible = ( ( !Util_Environment::is_wpmu() || is_network_admin() ) &&
!ini_get( 'w3tc.license_key' ) &&
get_transient( 'w3tc_license_status' ) != 'host_valid' );
?>
<?php do_action( 'w3tc-dashboard-head' ) ?>
<div class="wrap" id="w3tc">
<h2 class="logo"><?php _e( 'W3 Total Cache <span>by W3 EDGE <sup>®</sup></span>', 'w3-total-cache' ); ?></h2>
<?php if ( !Util_Environment::is_w3tc_pro( $config ) ): ?>
<?php include W3TC_INC_OPTIONS_DIR . '/edd/buy.php' ?>
<?php endif ?>
<?php
switch ( $page ) {
case 'w3tc_general':
$anchors = array(
array( 'id' => 'general', 'text' => __( 'General', 'w3-total-cache' ) ),
array( 'id' => 'page_cache', 'text' => __( 'Page Cache', 'w3-total-cache' ) ),
array( 'id' => 'minify', 'text' => 'Minify' ),
array( 'id' => 'system_opcache', 'text' => __( 'Opcode Cache', 'w3-total-cache' ) ),
array( 'id' => 'database_cache', 'text' => __( 'Database Cache', 'w3-total-cache' ) ),
array( 'id' => 'object_cache', 'text' => __( 'Object Cache', 'w3-total-cache' ) ) );
if ( Util_Environment::is_w3tc_pro( $config ) )
$anchors[] = array( 'id' => 'fragment_cache', 'text' => __( 'Fragment Cache', 'w3-total-cache' ) );
$anchors = array_merge( $anchors, array(
array( 'id' => 'browser_cache', 'text' => __( 'Browser Cache', 'w3-total-cache' ) ),
array( 'id' => 'cdn', 'text' => __( '<abbr title="Content Delivery Network">CDN</abbr>', 'w3-total-cache' ) ),
array( 'id' => 'reverse_proxy', 'text' => __( 'Reverse Proxy', 'w3-total-cache' ) ) ) );
if ( Util_Environment::is_w3tc_enterprise() )
$anchors[] = array( 'id' => 'amazon_sns', 'text' => __( 'Amazon <abbr title="Simple Notification Service">SNS</abbr>', 'w3-total-cache' ) );
$anchors[] = array( 'id' => 'monitoring', 'text' => __( 'Monitoring', 'w3-total-cache' ) );
if ( $licensing_visible )
array( 'id' => 'licensing', 'text' => __( 'Licensing', 'w3-total-cache' ) );
$link_attrs = array_merge( $anchors, $custom_areas, array(
array( 'id' => 'miscellaneous', 'text' => __( 'Miscellaneous', 'w3-total-cache' ) ),
array( 'id' => 'debug', 'text' => __( 'Debug', 'w3-total-cache' ) ),
array( 'id' => 'settings', 'text' => __( 'Import / Export Settings', 'w3-total-cache' ) )
) );
$links = array();
foreach ( $link_attrs as $link ) {
$links[] = "<a href=\"#{$link['id']}\">{$link['text']}</a>";
}
$links[] = '<a href="#" class="button-self-test">Compatibility Test</a>';
?>
<p id="w3tc-options-menu">
<?php echo implode( ' | ', $links ); ?>
</p>
<?php
break;
?>
<?php
case 'w3tc_pgcache':
?>
<p id="w3tc-options-menu">
Jump to:
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#general"><?php _e( 'General', 'w3-total-cache' ); ?></a> |
<a href="#mirrors"><?php _e( 'Mirrors', 'w3-total-cache' ); ?></a> |
<a href="#advanced"><?php _e( 'Advanced', 'w3-total-cache' ); ?></a> |
<a href="#cache_preload"><?php _e( 'Cache Preload', 'w3-total-cache' ); ?></a> |
<a href="#purge_policy"><?php _e( 'Purge Policy', 'w3-total-cache' ); ?></a> |
<a href="#notes"><?php _e( 'Note(s)', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
case 'w3tc_minify':
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to: ', 'w3-total-cache' ); ?>
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#general"><?php _e( 'General', 'w3-total-cache' ); ?></a> |
<a href="#html_xml"><?php _e( '<acronym title="Hypertext Markup Language">HTML</acronym> & <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache' ); ?></a> |
<a href="#js"><?php _e( '<acronym title="JavaScript">JS</acronym>', 'w3-total-cache' ); ?></a> |
<a href="#css"><?php _e( '<acronym title="Cascading Style Sheet">CSS</acronym>', 'w3-total-cache' ); ?></a> |
<a href="#advanced"><?php _e( 'Advanced', 'w3-total-cache' ); ?></a> |
<a href="#notes"><?php _e( 'Note(s)', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
case 'w3tc_dbcache':
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to: ', 'w3-total-cache' ); ?>
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#general"><?php _e( 'General', 'w3-total-cache' ); ?></a> |
<a href="#advanced"><?php _e( 'Advanced', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
case 'w3tc_objectcache':
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to: ', 'w3-total-cache' ); ?>
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#advanced"><?php _e( 'Advanced', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
case 'w3tc_browsercache':
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to: ', 'w3-total-cache' ); ?>
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#general"><?php _e( 'General', 'w3-total-cache' ); ?></a> |
<a href="#css_js"><?php _e( '<acronym title="Cascading Style Sheet">CSS</acronym> & <acronym title="JavaScript">JS</acronym>', 'w3-total-cache' ); ?></a> |
<a href="#html_xml"><?php _e( '<acronym title="Hypertext Markup Language">HTML</acronym> & <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache' ); ?></a> |
<a href="#media"><?php _e( 'Media', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
case 'w3tc_mobile':
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to: ', 'w3-total-cache' ); ?>
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#manage"><?php _e( 'Manage User Agent Groups', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
case 'w3tc_referrer':
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to: ', 'w3-total-cache' ); ?>
<a href="#toplevel_page_w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
<a href="#manage"><?php _e( 'Manage Referrer Groups', 'w3-total-cache' ); ?></a>
</p>
<?php
break;
?>
<?php
}
?>