This tutorial describes several important strategies for securing contact forms and scripts that make use of PHP’s mail() functionality. If your script is sending email based on user input, these tips will help to keep things safe and secure.
This technique is a bit esoteric and mostly for my own reference. Feel free to try the code if it makes sense to you; otherwise, maybe just move on to the next code snippet. Just not enough time in the day to explain everything.
This tutorial explains how to get the current Post Author outside of the WordPress Loop.
This WordPress snippet disables all author-archive views. This may be useful to prevent user enumeration scans, and also may help to minimize duplicate content (for SEO purposes).
If you can’t use .htaccess to disable caching at the server-level, here is an alternate HTML-only method that disables Cache-Control, Pragma, and Expires headers via <meta /> tags.
Quick .htaccess snippet to disable browser caching by modifying Cache-Control, Pragma, and Expires headers. Strictly plug-n-play.
Monitoring any changes made to your files is a super-useful security technique. Lots of applications, including forensics, diagnostics, and being cool. Here is a quick way to set it up directly via simple cron job.
In this tutorial, you’ll learn two ways to get the most recent comments on your WordPress-powered site. The first method uses get_comments(),and the second method uses the newer WP_Comment_Query class.
This tutorial provides four techniques for linking WordPress attachment pages back to their parent posts. Adding such a link makes it easy for users to view an image or other attachment, and then quickly navigate back to the original gallery in the parent post.
Here are two ways to vertically center a block-level element using CSS. The first method uses CSS flexbox, while the second method uses CSS transform.
The readme.txt file plays a central role when developing WordPress plugins, especially when hosting them at the WordPress.org Plugin Directory. In this post I share some esoteric readme.txt tricks that plugin and theme developers may find useful. You also may want to read about how to add your plugin to the WP Plugin Repository (i.e., […]
Here are some sweet code snippets for getting various types of server information. Includes more functions for getting and/or checking various types of WordPress, PHP, and SQL data. Strictly plug-&-play for quick reference and copy/paste usage.