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.
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
How to Initialize jQuery Scripts»
tops the javascript error that doesn't recognize '$' as a valid function.
Javascript, jQuery | Type: Javascript
HTML5 Toggle Search»
First, add HTML5 support to functions.php
CSS3, Search, WP/CP | Type: CSS
Incorporating Dashicons into Content and Templates»
Two approaches for adding dashicons in HTML, using WordPress native CSS. <h2 class="dashicons-before dashicons-smiley">A Cheerful Headline</h2> <h2><span class="dashicons dashicons-smiley"></span> A Cheerful Headline</h2> Both would appear like this: A Cheerful Headline…
WP/CP | Type: PHP