A collection of (mostly) WordPress-related snippets and references I’ve found useful and worth keeping where I can find them. Feel free to use what you like, and point me to some better snippets or references.
Force Private Post»
Have used this for user-created content that is not for public.
Custom Admin, Users, WP/CP | Type: PHP
Force Stylesheet Reload»
Useful during development, BUT DON'T FORGET to REMOVE before launch!
CSS | Type: CSS
G Suite MX setup (Generic)»
If you can’t find instructions for your domain host, use these general steps.
Gmail MX | Type: Other
Generate SALT / Auth Keys»
Add the keys in wp-config.php
Security, WP/CP | Type: PHP
Get Full Current URL»
$url = home_url(add_query_arg(array(),$wp->request));
WP/CP | Type: PHP
Gravity Forms Ready Classes»
Add classes to GF form fields; these are the most commonly used, but look at the others also.
CSS, Forms | Type: CSS
Gravity Forms: Setting Payments Number before Termination of Subscription»
A variation from the code found at the reference link, to accommodate different numbers of payments for different feeds.
eCommerce, Forms, WP/CP | Type: PHP
Hide Usernames from Hackers»
When hackers discover your username, they have half the equation for logging in.
Security, Users | Type: PHP
Horizontal AND vertical centering»
Can be just what you need when it's gotta be centered.
CSS | Type: CSS
Horizontal Nav Pipe»
Add 'pipe' between horizontal nav items, except last item.
CSS | Type: PHP