Skip to content

Instantly share code, notes, and snippets.

@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
*/
@zackkatz
zackkatz / gravityview-prevent-row-striping.php
Created December 17, 2014 05:06
GravityView - Prevent Row Striping: Don't all `alt` class to alternating table rows.
<?php
/**
* Plugin Name: GravityView - Prevent Row Striping
* Plugin URI: https://gravityview.co
* Description: Disable alternate row stripes.
* Version: 1.0
* Author: Katz Web Services, Inc.
* Author URI: https://katz.co
*/
@zackkatz
zackkatz / gv-ratings-reviews-netflix-scale.php
Last active August 29, 2015 14:13
Use the Netflix scale in the GravityView Ratings & Reviews Extension
<?php
/**
* Change the titles displayed when hovering over a star to use the Netflix scale
* @param array $stars Star titles
* @return array Modified titles
*/
function gv_ratings_reviews_use_netflix_scale( $stars ) {
// Make sure to keep the array key numbers intact; they map with the star rating.
@zackkatz
zackkatz / gravityview-modify-no-results.php
Last active September 11, 2018 22:18
GravityView - Modify the text displayed when there are no results
<?php
add_filter( 'gravityview/template/text/no_entries', 'modify_gravityview_no_entries_text', 10, 3 );
/**
* Modify the text displayed when there are no entries. (Requires GravityView 2.0 or newer)
*
* Place this code (after <?php) at the bottom of your theme's functions.php file to enable it
*
* @param string $existing_text The existing "No Entries" text
@zackkatz
zackkatz / gravityview-enable-custom-css-class-for-widgets.php
Created January 29, 2015 01:02
Enable custom class for GravityView widgets. Requires GravityView 1.5.4 or higher.
<?php
/**
* Enable custom class for GravityView widgets. Requires GravityView 1.5.4 or higher.
*
* @param boolean False by default. Return true if you want to enable.
* @param GravityView_Widget Current instance of GravityView_Widget
*/
add_filter('gravityview/widget/enable_custom_class', '__return_true' );
<?php
/*
* Plugin Name: IDX+ - Insert Ribbon HTML Into Listings
* Description: Print the ribbon HTML inside the listing wrapper for search results
* Version: 1.0
* Author: Katz Web Services, Inc.
* Author URI: http://www.idxplus.net
*/
// Available since IDX+ 2.4
@zackkatz
zackkatz / gravityview-redirect-after-edit-entry.php
Last active November 30, 2017 04:47
Redirect after a GravityView entry is edited if the form ID matches defined cases
<?php
/**
* Add the following code to the end of your theme's functions.php file.
*
* Make sure it's inside the ?> if ?> is at the end of the file!!!
*
*/