WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 34 of 35

Dealing with translation spam

How I respond to “translation spam”, which happens when greasy organizations ask permission to translate your script, extension, plugin, etc.

Remove Linked Image Borders in IE

Internet Explorer has a nasty habit of displaying honking blue borders on linked images. This post shows a quick way to disable them using a slice of jQuery.

WordPress: Simple Image Upload with jQuery

Some of my free WordPress plugins enable users to select and upload files from their local machine. The uploaded images are handled by WordPress and added to the Media Library. The technique is very basic and easy to implement, requiring only a few snippets added to your WordPress site.

WordPress: Display all comment fields when user is logged in

By default WordPress hides the Author/Name, Email, and URL fields on comment forms when the user is logged in. This is because WordPress automatically gets the related information directly from the user profile. But what if you need to do some testing or troubleshooting and want to display all the fields? Here is a plug-&-play […]

Protect Against File Injection

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 […]

Batch Rename Files on Mac

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.

Display All PHP Errors on Screen

When working on a PHP project, I usually log any errors to a file (error log), but on some projects it’s necessary to display any errors right there on the page. Here is the code that I use to make it happen.

Free up screen space on EDD settings pages

Easy Digital Downloads recently added a giant logo to all of their settings pages in the WordPress Admin Area. That’s great for them, but users are left with about an inch less of screen space. So now when visiting EDD settings, customers, downloads, etc., you have less vertical space with which to work. This quick […]

Coda Tip: Fix Reverse Publish Not Working

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 […]

Video Tutorials: Running WordPress on Shared Hosting

After months of hard work, I am pleased to announce the launch of my new video course on running WordPress on shared hosting. This course shows you how to get your own WordPress-powered site up and running as quickly and inexpensively as possible. It walks through the entire process step-by-step, with helpful visuals and examples […]

Find All URLs in a String with PHP

While developing my WordPress chat plugin, SAC Pro, I needed a way to get all URLs from a string. This enabled me to find any URLs that were included in chat messages, so I could apply HTML formatting and convert the raw URLs into actual clickable hyperlinks.

Affinity Photo: Transparent Gradient

I switched from Photoshop to Affinity Photo several years ago. Although the overall image editing process is very similar to Photoshop, there are some things that Affinity Photo does differently. For example, doing a simple gradient transparency. Seems easy but it took me quite a while to figure out how to do it. So am […]