Web & Software Developer

Archive for “Code Graveyard”

The Code Graveyard is where I lay to rest snippets of code that I don’t use anymore. Some have lost their usefulness due to the evolving nature of the web, while others have been replaced with better code.

Send Localized PHP variables to jQuery

This was my way of localizing jQuery strings: 1. Set a variable for the localized string in PHP 2. Set that as a jQuery var, and send/hack it up to the head inside my wp_enqueue_scripts function right above the line to enqueue the .js script that needs to use the variable. My method, as is … Read more →

Remove Lazyest Gallery Admin Menu For All But Administrators

PURPOSE: Hide the ‘Lazyest Gallery’ menu item from WordPress admin panel Dashboard for everyone but the administrators. This doesn’t hide the entire ‘Lazyest Gallery’ menu item, but it does remove the “edit Gallery” pages. The result is that your subscribers, contributors, authors, and editors will not be able to edit your gallery, nor delete your … Read more →