Category: Short Notes


Quick Debugging Trick in WordPress

August 5th, 2011 — 1:13am

I always found it a pain when writing new plugins/themes in wordpress to have to turn on or off the WP_DEBUG flag to get errors to show. Plus often times I will be working on a site that others are also viewing or working on, so turning on the flag would disrupt their work. A really simple solution to this problems was to wrap a define statement for the WP_DEBUG flag in an if statement. For example:


if ($_GET['debug'] == 1) {
define("WP_DEBUG", 1);
}
else {
define("WP_DEBUG", 0);
}

The beauty of the code is that you can trigger debugging easily by adding ?debug=1 onto your uri. This saves you from having to change the wp-config.php file, as well as solves the issue of multiple users/developers.

Note this should only be done on a development site. Having this on a live WordPress install could open up your site to be more easily exploiting as you are giving your attackers access to the notifications, warnings and errors.

Comment » | Short Notes, Wordpress

FauquierCam.com Updated

February 1st, 2011 — 6:35pm

Today I launched the an updated version of FauquierCam.com. I redid the design of the page so it looks a lot cleaner, as well added a blog to showcase notable pictures and videos from the camera. You can check it out at: http://www.fauquiercam.com.

Comment » | Fauquier Cam, Short Notes

Featured on YUIblog.com

September 28th, 2010 — 9:18am

Today I have a guest post featured on Yahoo’s YUI Blog talking about implementing YUI components on the Car Rental Express website (the company I work for). It is a general overview of some of the components we utilize the most and why we chose to use them.

Comment » | Javascript, Short Notes, YUI

Back to top