-
Notifications
You must be signed in to change notification settings - Fork 13
/
ceo-debug.php
61 lines (59 loc) · 1.96 KB
/
ceo-debug.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
<?php
// Show Config Variables for right now
// var_dump(ceo_pluginfo());
function ceo_check_directory($dirpath) {
$output = '';
if (is_dir(ceo_pluginfo($dirpath))) {
$output = '<span style="color:green;">'.__('Directory Exists,','comiceasel').'</span>';
if (is_writable(ceo_pluginfo($dirpath))) {
$output .= ' <span style="color:green;">'.__('and is writable.','comiceasel').'</span>';
} else {
$output .= ' <span style="color:red;">'.__('and is not writable.','comiceasel').'</span>';
}
} else {
$output = '<span style="color:red;">'.__('Directory does not exist,','comiceasel').'</span>';
}
return $output;
}
?>
<div class="wrap">
<h2><?php _e('Comic Easel - Debug','comiceasel'); ?></h2>
<table class="widefat">
<thead>
<tr>
<th colspan="3"><?php _e('System Info','comiceasel'); ?></th>
</tr>
</thead>
<tr><td>error</td><td><?php echo ceo_pluginfo('error'); ?></td></tr>
<tr><td>base_url</td><td><?php echo ceo_pluginfo('base_url'); ?></td></tr>
<tr><td>base_path</td><td><?php echo ceo_pluginfo('base_path'); ?><br /><?php echo ceo_check_directory('base_path'); ?></td></tr>
<tr><td>theme_url</td><td><?php echo ceo_pluginfo('theme_url'); ?></td></tr>
<tr><td>theme_path</td><td><?php echo ceo_pluginfo('theme_path'); ?></td></tr>
<tr><td>style_url</td><td><?php echo ceo_pluginfo('style_url'); ?></td></tr>
<tr><td>style_path</td><td><?php echo ceo_pluginfo('style_path'); ?></td></tr>
<tr><td>plugin_url</td><td><?php echo ceo_pluginfo('plugin_url'); ?></td></tr>
<tr><td>plugin_path</td><td><?php echo ceo_pluginfo('plugin_path'); ?></td></tr>
</table>
</div>
<br />
<table class="widefat">
<thead>
<tr>
<th colspan = "3">
<?php _e('Variables', 'comiceasel'); ?>
</th>
</tr>
</thead>
<?php
$ceo_options = ceo_pluginfo();
foreach ($ceo_options as $key => $val) {
if (!isset($ceo_options[$key]) || !$val) { $val = 'Empty or False'; }
if ($val == '1') $val = 'True';
?>
<tr>
<td><?php echo $key; ?></td>
<td><?php echo $val; ?></td>
</tr>
<?php }
?>
</table>