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 →

Show Product Tags as Links

This is for use with WP e-Commerce plugin. Use this code if you want to show the “Product Tags” as links. It works in the single product page container in wpsc-single_product.php. A Caveat to Using Tag Links In WP e-Commerce One drawback is that, as of WP e-Commerce version 3.8.8, it does not support pagination … Read more →