CSS Selectors and Default Styles for the WordPress Admin Area
Here are the CSS selectors used by WordPress in the Admin Area. Note that things are changing relatively quickly in the WP Admin Area, so chances are there are additional selectors and styles that have been added, and likely some changes made to the current list. So this collection of default CSS selectors and styles […]
Replace JavaScript Smooth Scroll with CSS
In the past, we had to resort to JavaScript to smoothly scroll to on-page target destinations. Fortunately things have evolved and we can now save some extra kilobytes by replacing (relatively) heavy handed JavaScript and jQuery techniques with just a few bytes of CSS.
Recursive Download Files with Wget
Quick note for future reference. GNU’s Wget enables you to download files and resources directly via Terminal/shell. The big tip here is the r option, which tells Wget to download the target files recursively. For example, if you want to download an entire site:
PHP Check if Safe Mode is On
Quick snippet to check if PHPs “safe mode” is enabled on the current machine. This technique uses the ini_get() function checking the safe_mode option. Simple and self-explanatory:
Block Wayback Machine
If your website has been online for any length of time, it probably has been crawled and stored in the Internet Archive, AKA the Wayback Machine. That means your web pages will be available even if your site is taken offline. To remove any pages that already have been archived, you need to contact the […]
PHP Simple Random String Generator
Here is a simple function for generating a random string via PHP. Oh I can hear it now, all the “random-things” experts out there crying out in pain because the function doesn’t return actual true random numbers. And they are right, true “randomness” is difficult to measure and achieve, especially with PHP. So for this […]
Quick Apache/.htaccess Snippet to Secure the WordPress Login Page
For WordPress sites where I am the only person logging in, I like to add the following Apache/.htaccess snippet to allow my IP address only, and deny access to all others. So when anyone tries to access the WP Login Page and they are not not coming from my IP address, they are denied with […]
SMS Text API Services
I’ve been wanting to build a “server uptime” app that optionally sends a text message to alert users if certain conditions are met. I can build the app part myself, but needed a solid way to send the SMS messages. In my pursuit of a solution for this, came across several reasonably priced solutions. Thought […]
Fix “Function Not Found” Error in WordPress Must-Use Plugins
Posting these notes in case they are useful to anyone looking for related information. This may or may not be related to must-use plugins. I am still testing on vanilla WordPress installation. Update: after some further experimenting, it looks like the issue was resolved by uploading a fresh set of WordPress core files. So try […]
Whitelist File Names via Apache/.htaccess
I’ve posted tons of tutorials showing how to block things with Apache/.htaccess. Generally blocking involves defining a list and then forbidding access to it. In this quick post, we’re going to change it up, by defining a list and forbidding access to anything that is not included. The list can be anything, IP addresses, request […]
WordPress Remove Query Strings from Scripts and Styles
I’ve had this post sitting here unpublished for a while now. Thought it’s finally time to post and share with anyone who may be looking for it. Basically here are two ways to remove query strings from the URLs of any registered scripts and styles. Let’s take a look..
Customize WordPress Allowed Tags for Comments
By default, the WordPress comment form enables users to include basic HTML tags in their comments. This includes tags like <p></p>, <br />, <strong></strong>, and so forth. These basic tags suffice to add basic formatting in most cases. But for some setups, more tags may be needed.