Today I noticed pieces of code to hook into a logger scattered throughout Gravity Forms, when I was trying to track down an issue. Here’s some quick and dirty code which hooks into the logging methods and writes to the PHP error log:
Tag Archives: php
Clickable stack traces with Netbeans
I’m clearly in a fickle mood this month, as I’ve changed my PHP editor again, this time to Netbeans (thanks to the tireless nagging of @JJJ)… so far, so good. I particularly love being able to jump to declarations quickly and easily. One hurdle I overcame today, and I’d be interested to know if there’s …
Clickable stack traces with PHP Xdebug and Sublime Text (other editors/IDEs are available)
Have a look at this. Ugly, isn’t it? But so so useful.
Laying out a grid in WordPress
For a recent project, I needed to lay items out in a series of grids, sometimes three columns, sometimes more. The CSS provided by the designer looked something like this: I could have used jQuery, or some of the more advanced CSS selectors, to achieve this, but here’s what I created as a custom WordPress …
Installing ImageMagick on MacPorts and imagick on PECL
Over the last few hours I’ve installed ImageMagick on MacPorts (super easy), and imagick on PECL (not so much). Xentek‘s post on ImageMagick and imagick was a great help, and got me past the first brick wall I hit (passing in the ImageMagick prefix to prevent it complaining about Wand-config)… but then I couldn’t get …
Continue reading “Installing ImageMagick on MacPorts and imagick on PECL”
PHP error logs with MacPorts on OSX
I’ve recently had to switch laptops while my main machine is in for repair (again), and this has reminded me of an issue I seem to encounter with MacPorts PHP. I make extensive use of the PHP function error_log during development, to track variables and ensure that things within the code are as I expect. …
Interspersing your post listing with date headers in WordPress
Update: OK, so at least one person wanted it as a plugin, so feel free to download Intermittent Date Headers. Here’s a code snippet that’s not really worth making into a plugin. It’s designed to put date headers into your main post listing page. As an example, you could end up with: Heading: March, 2008 Post: dated …
Continue reading “Interspersing your post listing with date headers in WordPress”
I’ve made a useless WordPress plugin…
…which you might find useful if you develop plugins with system requirements, like a particular version of PHP. This plugin is a simple proof of concept for a method of messaging the user when they activate a plugin.
Exclude Pages now hides child pages where appropriate
Exclude Pages (my WordPress plugin which allows you to remove pages from site navigation) now handles child pages more gracefully. Previously, when you excluded a page any child page would drop down a level, taking it’s place… not what I wanted, and not something I’d noticed because I was only dealing with single level navigation …
Continue reading “Exclude Pages now hides child pages where appropriate”