Skip to content

Instantly share code, notes, and snippets.

@zackkatz
zackkatz / bc-texture-swatch
Created Jan 30, 2014
Force Bigcommerce to use larger images for texture swatches
View bc-texture-swatch
/**
* Convert tiny thumbnails to larger previews for product texture swatches
* @group Product
*
*/
jQuery('.textureContainer .thumbnail').attr('style', function() {
return jQuery(this).attr('style').replace('.thumbnail.png', '.preview.png');
});
@zackkatz
zackkatz / require-title.js
Created May 22, 2014
Require a title in the WordPress Edit Post screen
View require-title.js
$('body').on( 'submit.edit-post', '#post', function () {
// If the title isn't set
if( $("#title").val().length === 0 ) {
// Show the alert
alert('A title is required.');
// Hide the spinner
$('#major-publishing-actions .spinner').hide();
@zackkatz
zackkatz / debug-bar-gravity-forms-noconflict.php
Created Jul 12, 2014
The Debug Bar plugin breaks on Gravity Forms admin pages when No Conflict Mode is turned on. This plugin fixes that issue.
View debug-bar-gravity-forms-noconflict.php
<?php
/*
Plugin Name: Debug Bar for Gravity Forms No-Conflict Mode
Plugin URI: http://katz.co
Description: Enable debug bar when Gravity Forms has No Conflict Mode on.
Version: 1.0
Author: Katz Web Services, Inc.
Author URI: http://katz.co
*/
add_filter( 'gform_noconflict_scripts', 'debug_bar_add_gf_noconflict');
@zackkatz
zackkatz / edd-w3tc-fix-discount.php
Last active Aug 29, 2015
Prevent Easy Digital Downloads discounts from being cached by W3TC
View edd-w3tc-fix-discount.php
<?php
/**
* Plugin Name: EDD W3TC Fix Discount Codes
* Plugin URI: http://gravityview.co
* Description: Fix discount code caching issues for Easy Digital Downloads when using W3 Total Cache
* Version: 1.1
*/
if( function_exists( 'wp_suspend_cache_addition' ) ) {
@zackkatz
zackkatz / get-readme-content
Created Oct 15, 2014
Get readme response from the readme.txt configuration in EDD Software Licensing
View get-readme-content
/**
* Get readme response from the readme.txt configuration in EDD Software Licensing
*
* @param int $id Download ID
* @return array|boolean Readme array if exists; NULL if not exists
*/
function get_edd_sl_readme( $id = NULL ) {
if( !empty( $id ) && function_exists('_edd_sl_get_readme_data') ) {
@zackkatz
zackkatz / gravityview-change-entry-creator-show-all-users.php
Last active Aug 29, 2015
Show all users in the Change Entry Creator dropdown (instead of just 300)
View gravityview-change-entry-creator-show-all-users.php
<?php
/*
Plugin Name: GravityView - Show All Users in Change Entry Creator
Plugin URI: http://gravityview.co
Description: Show all users in the Change Entry Creator dropdown (instead of just 300)
Version: 1.1
Author: Katz Web Services, Inc.
Author URI: http://www.katzwebservices.com
Text Domain: gravityview
License: GPLv2 or later
View idx-plus-deactivate-logging.php
<?php
/*
* Plugin Name: IDX+ - Deactivate Logging
* Description: Disable logging for IDX+
* Version: 1.0
* Author: Katz Web Services, Inc.
* Author URI: http://www.idxplus.net
*/
add_action('init', 'modify_idx_plus_disable_logging');
@zackkatz
zackkatz / gravityview-datatables-alt-src.php
Created Oct 28, 2014
Use an alternative source for DataTables files.
View gravityview-datatables-alt-src.php
<?php
/*
* Plugin Name: GravityView - Use Alternate DataTables Sources
* Description: Use CDNJS.com sources for the DataTables library
* Version: 1.0
* Author: Katz Web Services, Inc.
* Author URI: https://gravityview.co
*/
class Replace_GV_DataTables_Scripts {
@zackkatz
zackkatz / gravityview-modify-search-labels.php
Last active Aug 29, 2015
GravityView - Modify Search Labels (Example Code)
View gravityview-modify-search-labels.php
<?php
/**
* Plugin Name: GravityView - Modify Search Labels (Example Code)
* Plugin URI: http://gravityview.co
* Description: Modify the text of Search Bar labels
* Version: 1.0
* Author: Katz Web Services, Inc.
* Author URI: http://gravityview.co
*/
@zackkatz
zackkatz / gravityview-pagination-add-anchor.php
Created Nov 30, 2014
Scroll to the View content when paging through search results.
View gravityview-pagination-add-anchor.php
<?php
/*
* Plugin Name: GravityView - Add Anchor to View Pagination
* Plugin URI: http://gravityview.co
* Description: Have GravityView pagination link to in-page anchor ID instead of top of page.
* Version: 1.0
* Author: Katz Web Services, Inc.
* Author URI: http://www.katzwebservices.com
*/