Debugging WordPress

When working on a plugin or theme, have you ever went to your browser to test some changes, only to be greeted by the dreaded blank white screen? Sometimes the bug in your code is immediately apparent, but what about the times when it’s not? Wouldn’t it be useful if you could see the PHP errors, instead of a blank screen?

The good news is: you can. Just add this simple constant to your wp-config.php file:

define('WP_DEBUG_DISPLAY', true);

Be aware that it’s a bad idea to do this on a production server, as some errors may betray dangerous information, such as system paths or database credentials.

What if you need to see errors on a production server, or you need a record of the errors? You can have them output to a log file (wp-content/debug.log).

define('WP_DEBUG_LOG', true);

You can use either statement alone, or both at the same time.

PHP Simple HTML DOM Parser

It’s always fun to obtain data from REST APIs and parse the XML or JSON response. Twitter, for sure, wouldn’t be what it is today if not for the thriving community of developers building applications that tie-in with the API. But what do you…

BlogBuzz May 29, 2010

14 Mac Applications I Use Every Day

I made the switch to Mac OS X a little over two years ago when I bought my first MacBook (which is still working fine as my main computer, I might add). I find that my workflow has improved, and I’m more efficient in…

Facebook Privacy Scanning Bookmarklet

Unless you’ve been living under an internet-devoid rock, you have probably noticed the recent uproar over Facebook “privacy.” The social media giant made some changes, with various confusing privacy implications that have everyone panicking. By default applications can access some personal details (that you…

Apple, Amazon, Napster, Netflix Sued Over Online Music Distribution Patent

Ars Technica is reporting on a new development in the tech patent lawsuit war. Apple, along with Amazon, Netflix, Napster, Microsoft, Rhapsody and a few others, is being sued by Sharing Sound LLC over their infringement of the patent “Distribution of musical products by…

CloudApp: Share Files Fast

CloudApp is a nifty application that lets you quickly and easily share files. All you have to do is drag a file onto the menu bar. Once the file is uploaded to the “Cloud,” a short URL to the file is automatically copied to…

BlogBuzz May 22, 2010

Coming in WordPress 3.0: Custom Editor Stylesheets

I generally prefer to write my posts with WordPress’s visual editor, as it gives me a better idea of what the post will look like as I write it than the HTML view does. But it still looks different than the final post will…

Google Font API

Google is taking on projects like sIFR and Cufón with their new Google Font API. A simple line of JavaScript lets you load a font family from their directory of open source fonts, allowing you to safely reference it within your CSS. Here is…