All posts ordered by popularity
While working on a recent book-sale script, I needed a way to test various request headers. This script is what I used to spoof just about everything except the IP address (which it seems is not possible to spoof via PHP/cURL).
Here is a code snippet that runs the first time a user logs in to their registered account. Useful for sending custom welcome emails, or whatever.
WordPress makes it clean and easy to enqueue custom stylesheets via the functions.php file. Here’s how to do it for user-agent stylesheets.
Quick code snippet for detecting all versions of good ’ol IE (Internet Explorer).
Nice lil slab of PHP to get the current URL. Useful for a wide variety of applications, nice one to have in the tool belt.
Here are some scrap PHP scripts leftover from my work on Dashboard Widgets Suite. These functions were considered specifically for use with the System Information Widget, and provide a variety of details about the current server configuration and software setup.
Quick WordPress snippet for getting the category ID from the category slug.
Here are some notes to help discern the subtle (and oft-confusing) differences between the WordPress functions, home_url and site_url (and their related “get” functions, get_home_url and get_site_url). We’ll look at the output of these functions and how they relate to the WordPress General Settings.
By default, WordPress prepends the string “Private: ” to all posts marked as “private”. Here’s a quick function to remove the private prefix and move on with your life.
Quick snippet for customizing or disabling the WordPress “read more” link for the_excerpt().
Here are some notes and markup examples for adding links to the W3C’s online HTML and CSS validators. This will enable your visitors to check any page on your site.
Here is a quick recipe for displaying linked images for images submitted with the User Submitted Posts plugin.