-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
77 lines (44 loc) · 2.58 KB
/
readme.txt
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
=== EFC Debug Plugin ===
Contributors: efc
Tags: debugging
Requires at least: 3.5
Tested up to: 3.7.1
Stable tag: 1.2
GitHub Plugin URI: efc/efc-debug
This is a very simple plugin to facilitate the display of debugging messages. Nothing fancy here.
== Description ==
This plugin will place a small menu with an umbrella toward the right side of the admin bar. Clicking on this menu reveals a hidden div where debug messages are available.
**Features**
Recognizes a variable number of arguments.
This plugin distinguishes between strings and other variables being reported. Any non-string will automatically be dumped with a print_r() so that all elements can be seen.
The umbrella in the admin bar will be on a red background if WP_DEBUG is true. This is an extra reminder to turn off debugging before putting code into production.
Always provides a copy of $wp_query and $ENV.
**Usage**
Include 'efc-debug-include.php' somewhere at the top of your functions.php (or other PHP file)...
`include_once(dirname(__FILE__).'/../../plugins/efc-debug/efc-debug-include.php');`
...note that you may well have to edit that line to include the proper reference to the file.
Then anywhere else in your code use this to add items to the debug report...
`if (function_exists('dbug_report')) dbug_report('message: ',$variable);`
When looking at your page, you can reveal the debug report by clicking on the umbrella in the adming bar.
*Example :*
Put this (edited for your directory structure) near the top of your code:
`include_once(dirname(__FILE__).'/../../plugins/efc-debug/efc-debug-include.php');`
Include as many arguments as you need:
`if (function_exists('dbug_report')) dbug_report('message: ',$variable);`
Don't forget you can use PHP magic constants too:
`if (function_exists('dbug_report')) dbug_report(__CLASS__, __METHOD__);`
**Notes**
This is really a plugin for developers. It will be of little use to regular WordPress users.
In fact, you should probably deactivate this plugin whenever you are not actively working on your site.
== Installation ==
To install the plugin follow these steps :
1. Download the efc-debug.zip file to your local machine.
1. Unzip the file.
1. Upload the "efc-debug" folder to your "/wp-content/plugins/" directory.
1. Activate the plugin through the 'Plugins' menu in WordPress (but only when you really need to be debugging).
== Frequently Asked Questions ==
= Aren't there better debugging plugins around? =
Sure! Many people swear by Debug Bar. Go check it out. For me, though, it was just too complex. I wanted something simple.
== Changelog ==
= 1.0 =
* First version.