If you are developing a plugin on WordPress, you will need to debug your code as you go.
To enable debugging, go to your wp-config.php file.
Find the line…
Replace the line above with the following…
// Turns WordPress debugging on
// Tells WordPress to log everything to the /wp-content/debug.log file
// Doesn't force the PHP 'display_errors' variable to be on
// Hides errors from being displayed on-screen
Now you all warnings and errors will show up in the /wp-content/debug.log file, including WordPress warnings of deprecated functions.
You can write directly to this log from your plugin using the
//output some debug string
error_log( 'this works yo' );
//output some array/object
error_log( print_r( $some_obj_or_array, 1 ) );
Kudos to this post. It has some good plugin development tips, including how to enable debugging on WordPress.
Unfortunately, Gmail will not allow you to forward old email via a filter.
I found a way that you can transfer all email from one Gmail account to another, and it works but it’s a tad complicated.
If you want to simply forward old email, the solution from Digital Inspiration using Google Docs is better.
Continue reading “How to Auto-Forward Gmail Messages in Bulk”
Here are a pair of functions that will allow you to search an associative array for either a key or a value, using a string with a wildcard (*).
Continue reading “Search Associative Array with Wildcard in PHP”
When you check-in to SVN with
svn ci, the default editor opens to allow you to enter your commit message. My default editor was Emacs. I don’t use Emacs for anything else, and I found entering a simple message a tad frustrating as Emacs commands/shortcuts are different to what I use with Vim.
Continue reading “Change SVN editor to Vim or TextWrangler”
These days I seem to looking a lot a print_r output. For the uninitiated, print_r is a handy PHP function to allow you to print the contents of an array in a neat, readable format. Continue reading “Parse Print_r output and convert into CSV”