PHP code snippet to test whether a user has a valid Gravatar or not. The only input needed is the user’s email address. It uses MD5 hashing and URI response headers.
Code snippet for modifying bbPress forum participants capabilities. With this snippet active, your forum participants will be able to trash (but not delete) their own topics and replies.
Controllers are an important part of Laravel MVC (Model, View, CONTROLLER). They are useful for organizing request-handling logic and help to keep the entire code structured and maintainable. This post is a brief primer on Laravel controllers.
WordPress posts by default have an excerpt meta box where you can manually type in a custom excerpt. Pages don’t have this feature out-of-the-box. If you would like to enable excerpts on your WordPress pages, use the code in this post.
WooCommerce products don’t have authors because the plugin developers think this is irrelevant. But a site may need this feature sometimes. The code snippet shared here helps bring back the feature to allow author assignment in the product edit area.
An SQL SELECT statement may often return thousands of rows. And when building sites, we usually don’t want to dump all those rows onto a single page (for speed and UX reasons). Instead, we split the results across multiple pages via PAGINATION.