Skip to content

Instantly share code, notes, and snippets.

@zackkatz
zackkatz / bc-texture-swatch
Created January 30, 2014 21:39
Force Bigcommerce to use larger images for texture swatches
/**
* 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 17:40
Require a title in the WordPress Edit Post screen
$('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 July 12, 2014 19:56
The Debug Bar plugin breaks on Gravity Forms admin pages when No Conflict Mode is turned on. This plugin fixes that issue.
<?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 August 29, 2015 14:04
Prevent Easy Digital Downloads discounts from being cached by W3TC
<?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 October 15, 2014 21:36
Get readme response from the readme.txt configuration in EDD Software Licensing
/**
* 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 August 29, 2015 14:07
Show all users in the Change Entry Creator dropdown (instead of just 300)
<?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
@zackkatz
zackkatz / idx-plus-deactivate-logging.php
Created October 21, 2014 23:34
Disable logging for IDX+
<?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 October 28, 2014 23:33
Use an alternative source for DataTables files.
<?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 August 29, 2015 14:10
GravityView - Modify Search Labels (Example Code)
<?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 November 30, 2014 17:45
Scroll to the View content when paging through search results.
<?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
*/