Code Snippets.
A growing library of copy-paste solutions for WordPress, performance, security, and infrastructure.
Scheduled Post Revisions Purge
A PHP snippet for Scheduled Post Revisions Purge.
Secure Session Token Management with WP_Http_Cookie
A PHP snippet for Secure Session Token Management with WP_Http_Cookie.
Throttling Actions Using wp_using_ext_object_cache()
A PHP snippet for Throttling Actions Using wp_using_ext_object_cache().
Track Custom Referrals Using Cookies with WP_Http_Cookie
A PHP snippet for Track Custom Referrals Using Cookies with WP_Http_Cookie.
Restrict Image Size Uploads
Explanation:
Detect if DIVI Builder is Running
Check for Divi in jQuery.
Only One Login Session
A PHP snippet for Only One Login Session.
Install Node.js and npm using Homebrew on OS X and macOS
First, install Homebrew.
Add Extra Media Type Filters to the WordPress Media Manager
A PHP snippet for Add Extra Media Type Filters to the WordPress Media Manager.
Get all Metakeys
A PHP snippet for Get all Metakeys.
Improve WP Query performance
A PHP snippet for Improve WP Query performance.
Jetpack: Add Related Posts to your RSS feed
A PHP snippet for Jetpack: Add Related Posts to your RSS feed.
Jetpack Custom Fallback Image
A PHP snippet for Jetpack Custom Fallback Image.
Limit Tags to 3 per Post
A PHP snippet for Limit Tags to 3 per Post.
PostmarkApp Headers for Gravity Forms
A PHP snippet for PostmarkApp Headers for Gravity Forms.