Here is a nice copy/paste .htaccess snippet to help block SQL-injection attacks. It can be added as-is to your .htaccess file to help protect against SQL injection and other types of malicious activity. This code is a not a replacement for proper data sanitization, but it does help to add another layer of security to […]
This is especially useful for those bulk photography missions, where you’ve got folders of hundreds of generic useless file names that were created by a camera or mobile device. This quick tutorial explains how to easily batch rename all the files contained in any folder. All that is required is Mac’s built-in Finder app.
Working on WordPress development and testing HTML forms in Chrome browser, I ran into the following error: This page isn't working Chrome detected unusual code on this page and blocked it to protect your personal information (for example, passwords, phone numbers, and credit cards). ERR_BLOCKED_BY_XSS_AUDITOR
Another mystery solved! For several years now, I’ve used Coda for coding, SFTP, and related tasks. Downloading files from the server is a common task, but for some reason you always have to click “Reverse Publish Selected Files” several times before the download will start. It’s not a big deal, but I’ve always thought it […]
Here is a nice copy/paste .htaccess snippet to help block file-injection attacks. It can be added as-is to your .htaccess file to help protect against file injection and other types of malicious activity. This code is a not a replacement for proper data sanitization, but it does help to add another layer of security to […]
Depending on your WordPress configuration, plugins, and so forth, your site may be suffering from “self-pings”. Self-pings are pingbacks from your own domain, which are not necessary and look kind of silly displayed alongside other, actual pingbacks. If your site is haunted by self-pings, here is a quick code snippet to stop them.
Quick code snippet showing basic use of the WordPress template_redirect action hook. This is provided as a quick copy/paste reference for WordPress developers. This hook is useful for customizing any functionality requiring full query information.
Most good themes include a screenshot, primarily to be displayed on the Themes screen in the WP Admin Area. Of course, theme screenshots can be displayed anywhere, even on the frontend.
I’m surprised that WordPress doesn’t provide a function for getting the site creation date. Knowing when the site was set up can be useful for all sorts of things. Copyright dates. Bragging rights. Whatever. If you want to display the date your site was first installed, here is one way to do it.
Normally the “Screen Options” tab is an awesome little WordPress feature. Located on various screens in the WP Admin Area, the Screen Options tab toggles open any available settings. Like which meta boxes to display, layout columns, editor auto-height, and other options depending on which screen you are viewing. But there may be cases where […]
WordPress makes it easy to get the current user’s role(s) by using wp_get_current_user(). But what if you want to get all roles from all users. Like a list of every role that is used on your site. Well good news, WordPress provides a global object named $wp_roles that provides the information. So if you’re looking […]