This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
wp-optimize-admin.php
125 lines (92 loc) · 4.01 KB
/
wp-optimize-admin.php
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
<?php
# --------------------------------------- #
# prevent file from being accessed directly
# --------------------------------------- #
if ( ! defined( 'WPINC' ) ) {
die;
}
?>
<?php
$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'wp_optimize_optimize';
?>
<!--
<h2 class="nav-tab-wrapper">
<a href="?page=WP-Optimize&tab=wp_optimize_optimize" class="nav-tab <?php echo $active_tab == 'wp_optimize_optimize' ? 'nav-tab-active' : ''; ?>">
<?php
global $wpdb;
$sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
//$php_version_info = substr(PHP_OS, 0, 3);
_e('Optimizer', 'wp-optimize');
if (defined('WPO_VERSION')){
echo ' '.WPO_VERSION.' - ';
_e('MYSQL', 'wp-optimize');
echo ' '.$sqlversion.' - ';
echo PHP_OS;
} //end if
?></a>
<a href="?page=WP-Optimize&tab=wp_optimize_settings" class="nav-tab <?php echo $active_tab == 'wp_optimize_settings' ? 'nav-tab-active' : ''; ?>"><?php _e('Settings', 'wp-optimize') ?></a>
<a href="?page=WP-Optimize&tab=wp_optimize_credits" class="nav-tab <?php echo $active_tab == 'wp_optimize_credits' ? 'nav-tab-active' : ''; ?>"><?php _e('Info', 'wp-optimize') ?></a>
</h2> -->
<div id='wpo_cssmenu'>
<ul>
<li <?php echo $active_tab == 'wp_optimize_optimize' ? 'class="active"' : ''; ?> ><a href="?page=WP-Optimize&tab=wp_optimize_optimize"><span>
<?php
global $wpdb;
$sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
//$php_version_info = substr(PHP_OS, 0, 3);
_e('Optimizer', 'wp-optimize');
if (defined('WPO_VERSION')){
echo ' '.WPO_VERSION.' - ';
_e('MYSQL', 'wp-optimize');
echo ' '.$sqlversion.' - ';
echo PHP_OS;
} //end if
?></span></a></li>
<li <?php echo $active_tab == 'wp_optimize_tables' ? 'class="active"' : ''; ?>><a href="?page=WP-Optimize&tab=wp_optimize_tables"><span><?php _e('Tables', 'wp-optimize') ?></span></a></li>
<li <?php echo $active_tab == 'wp_optimize_settings' ? 'class="active"' : ''; ?>><a href="?page=WP-Optimize&tab=wp_optimize_settings"><span><?php _e('Settings', 'wp-optimize') ?></span></a></li>
<li <?php echo $active_tab == 'wp_optimize_credits' ? 'class="active"' : ''; ?>><a href='?page=WP-Optimize&tab=wp_optimize_credits'><span><?php _e('Info', 'wp-optimize') ?></span></a></li>
</ul>
</div>
<div class="wrap">
<?php
//echo '<div id="message" class="updated fade">';
//echo '<strong>'.$text.'</strong></div>';
//echo '</div>';
?>
<?php
if (! defined('WPO_PLUGIN_MAIN_PATH'))
define('WPO_PLUGIN_MAIN_PATH', plugin_dir_path( __FILE__ ));
if( $active_tab == 'wp_optimize_optimize' ) {
if (file_exists(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-main.php')) {
include_once(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-main.php');
}
else {
echo 'File is missing';
}
}
if( $active_tab == 'wp_optimize_tables' ) {
if (file_exists(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-tables.php')) {
include_once(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-tables.php');
}
else {
echo 'File is missing';
}
}
if( $active_tab == 'wp_optimize_settings' ) {
if (file_exists(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-settings.php')) {
include_once(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-settings.php');
}
else {
echo 'File is missing';
}
}
if( $active_tab == 'wp_optimize_credits' ) {
if (file_exists(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-credits.php')) {
include_once(WPO_PLUGIN_MAIN_PATH. 'wp-optimize-credits.php');
}
else {
echo 'File is missing';
}
}
?>
</div>