Tag: hooks
-
Using Anonymous Functions for Filters and Actions
The more customization that you do when building a WordPress site, the more you will find that you have a lot of functions hooked to actions and filters. Sometimes these functions might be quite simple, returning just a single line of text or replacing a single word. Is there an easy way to make this…
-
Do not modify plugin files
This is an important best practice – never, ever modify plugin files directly. Rule 1: there is never a good reason to do this. Rule 2: refer to rule 1.
-
A random word and number combination for passwords
One of the earliest code snippets provided on this site was one that discussed how to create an easier random password. This post discussed two examples: one that showed how to create a random password of only upper and lower case letters and one that always set a specific word. I understand that some sites…
-
Add a sortable date user registered column to the Users > All Users page
If you manage a site that has a lot of registrations, sometimes it is helpful to show the date the user registered as a custom column in the WordPress admin page Users > All Users. I have shown in another post how you can add that data as well as other data to this table.…
-
Create different styles for “success” and “error” messages
This is an idea that has been floated by a few users, which means there is probably a need for it. As is usually the case, I don’t like to make wholesale changes to the codebase that effects users in a way that requires them to make a change to accommodate an update. So I…