Skip to content

Instantly share code, notes, and snippets.

@zackkatz
zackkatz / gravityview-datatables-modify-locale.php
Created February 19, 2015 23:54
Modify the locale used by GravityView DataTables extension
<?php
add_filter( 'gravityview/datatables/config/locale', 'modify_gravityview_datatables_locale', 10, 2 );
/**
* Modify the locale used in the DataTables translation
*/
function modify_gravityview_datatables_locale( $existing_locale, $translations ) {
// Define the Locale Code, as shown here: http://wpcentral.io/internationalization/
@zackkatz
zackkatz / gravityview-enable-the-content-filter-custom-field.php
Created February 23, 2015 18:56
Apply `the_content` filter to Custom Content fields in order to process `[embed]` shortcodes.
<?php
/** Modify the content returned from the Custom Content field */
add_filter( 'gravityview/fields/custom/content_after', 'gv_add_the_content_filter_to_custom_content_field' );
/**
* This example runs `the_content` filter on the content to process `[embed]` shortcodes.
*
* @param string $content Existing field content
* @return string Modified field content
/**
* Replace the link text with a PDF image.
*
* Only for an anchor link to a PDF file in field output.
*
* Place this code (after <?php) at the bottom of your theme's functions.php file to enable it.
*
* @param string $html Existing HTML output
* @param array $args Arguments passed to the function
*/
@zackkatz
zackkatz / idx-plus-remove-contact-form-disclaimer.php
Created March 3, 2015 00:53
How to remove the Contact Form disclaimer in IDX+
<?php
/**
* Removes the "We respect your online privacy and will never spam you..." text.
*
* Add the following to your functions.php file:
*/
add_filter( 'idx_plus_contact_form_disclaimer', '__return_empty_string' );
@zackkatz
zackkatz / idx-plus-replace-contact-form-disclaimer.php
Created March 3, 2015 01:13
Replace the Contact Form disclaimer text with your own text in IDX+
<?php
/**
* Removes the "We respect your online privacy and will never spam you..." text.
*
* Add the following to your functions.php file:
*/
add_filter( 'idx_plus_contact_form_disclaimer', 'modify_idx_plus_contact_form_disclaimer' );
/**
<?php
/*
Plugin Name: Gravity Forms MailChimp Custom Export
Plugin URI: http://gravityview.co/
Description: Custom plugin to force updated entries to be exported with the GF MailChimp add-on
Author: Katz Web Services, Inc.
Version: 1.1.0
Author URI: http://www.katzwebservices.com
Copyright 2014 Katz Web Services, Inc. (email: info@katzwebservices.com)
<?php
/*
* Supported on GravityView 1.6
*
* Add this to your theme's functions.php file
*
* Replace the string 'MY NEW LABEL' for your own
*/
@zackkatz
zackkatz / gravityview-featured-entries-always-show.php
Last active August 29, 2015 14:16
GravityView Featured Entries - Always show featured entries, even if search doesn't match.
@zackkatz
zackkatz / gravityview-recent-entries-widget-featured-entries-wrapper.php
Created March 6, 2015 05:28
GravityView - Wrap starred (featured) entries in a custom container
@zackkatz
zackkatz / gravityview-wpeditor-add-media.php
Created March 10, 2015 17:41
GravityView - Rich Text Editor: Enable Add Media
<?php
/**
* Enable the "Add Media" button in the Rich Text editor
* (Requires GravityView 1.7 or higher)
*/
function modify_gv_wp_editor_settings_add_media( $settings ) {
$settings['media_buttons'] = true;
return $settings;
}