WordPress redirect logged in users
Nice WordPress snippet to redirect logged in users to any location. Also optionally redirect visitors who are not logged in to WordPress.
Resize Google Search iframe
I’ve integrated Google Custom Search at DigWP.com and Perishable Press. In doing so, I found it necessary to resize the google-search iframe in order to fit with the responsive layout.
Remove ‘Private’ from private post titles
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.
Browse your local files via browser
Ultra-quick tip for viewing/browsing files on your local machine in any browser.
WordPress: check if user is logged in
Here are some notes and examples of how to check if a user is logged in to WordPress.
PHP: Target IE less than 9
Recently I haven’t had time to bother with old versions of IE (less than 9), so I use the following PHP function to target IE 6, 7 and 8.
Whitelist POST access with .htaccess
Here is how to whitelist POST requests for a specific file. For example, you can protect chat, forum, and other heavily targeted scripts from malicious acitivity.
PHP: Get current URL
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.
1Password Dropbox Sync
Here is a simple trick for getting your 1Password data file to sync on any device.
Protect .svn files with .htaccess
For those using subversion, here is how to protect your svn files with .htaccess.
WordPress get all user emails
Quick snippet to get all user emails in WordPress.
Set X-UA-Compatible via .htaccess
It’s relatively well known that you can set X-UA-Compatible headers with HTML.. here is how to do it with a bit of .htaccess.