-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplugin-insight.php
executable file
·59 lines (51 loc) · 1.56 KB
/
plugin-insight.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
<?php
/*
Plugin Name: Plugin Insight
Description: Spits out $filters, $plugin_info & $plugins contents
Version: 1.1
Author: Chris Cagle
Author URI: http://www.cagintranet.com/
*/
# get correct id for plugin
$thisfile=basename(__FILE__, ".php");
# register plugin
register_plugin(
$thisfile, # ID of plugin, should be filename minus php
'Plugin Insight', # Title of plugin
'1.1', # Version of plugin
'Chris Cagle', # Author of plugin
'http://www.cagintranet.com/', # Author URL
'Spits out $filters, $plugin_info & $plugins contents', # Plugin Description
'plugins', # Page type of plugin
'myplugin_show' # Function that displays content
);
# activate hooks
add_action('plugins-sidebar','createSideMenu',array($thisfile,'Plugin Insight'));
function myplugin_show() {
global $plugin_info;
global $plugins;
global $filters;
echo '
<style type="text/css">
#load pre code {
display:block;font-size:11px;width:560px;line-height:13px;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */}
</style>
';
echo "<h3>Plugins Installed</h3>";
echo "<pre><code>";
print_r($plugin_info);
echo "</code></pre>";
echo "<h3>Hooks Called</h3>";
echo "<pre><code>";
print_r($plugins);
echo "</code></pre>";
echo "<h3>Filters Called</h3>";
echo "<pre><code>";
print_r($filters);
echo "</code></pre>";
}