Skip to content

Instantly share code, notes, and snippets.

/**
* 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
*/
<?php
/*
* Supported on GravityView 1.6
*
* Add this to your theme's functions.php file
*
* Replace the string 'MY NEW LABEL' for your own
*/
<?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
*/
<?php
/**
* Disable the State Saving on your DataTables view
* @link https://datatables.net/reference/option/stateSave
*/
add_filter( 'gravityview_datatables_js_options', 'my_gv_state_save', 20, 2 );
/**
* @param array $config Holds the DataTables table configuration
* @param string $view_id The current view id
@zackkatz
zackkatz / gv-success-update-message.php
Created November 10, 2015 00:54 — forked from luistinygod/gv-success-update-message.php
GravityView: Change the Update Entry success message
<?php
/**
* Change the update entry success message, including the link
*
* @param $message string The message itself
* @param $view_id int View ID
* @param $entry array The Gravity Forms entry object
* @param $back_link string Url to return to the original entry
*/
function gv_my_update_message( $message, $view_id, $entry, $back_link ) {
@zackkatz
zackkatz / gravityview-pagination.php
Last active January 27, 2017 19:05 — forked from Jeradin/pagination for GravityView
Entry Next / Prev pagination for GravityView (NOT PRODUCTION READY)
<?php
/**
* Get single entry pagination links
* to use: echo gravityview_entry_pagination();
*/
/**
* NOT FINAL CODE. Use at your own risk! This will be incorporated soon into core.
*
* This will use GravityView filters to generate the entry links.
@zackkatz
zackkatz / gv_modify_notes_email_content.php
Last active March 29, 2018 04:13 — forked from rafaehlers/gv_modify_notes_email_content.php
Modify the body content of a note
<?php
add_action( 'plugins_loaded', function() {
add_filter( 'gravityview/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 );
}, 20 );
/**
* Modify the email content
*
* @param array $email_settings
<?php
add_filter( 'gravityview/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 );
/**
* Modify the values passed when sending a note email
* @see GVCommon::send_email
* @since 1.17
* @param array $email_settings Values being passed to the GVCommon::send_email() method: 'from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'entry', 'email_footer'
*
* @return array $email_settings
<?php
add_filter( 'gravityview_entries', function( $entries, $criteria, $passed_criteria, &$total ) {
$view_id = GravityView_frontend::getInstance()->get_context_view_id();
if ( $view_id != 97 /** Augmented View ID here */ ) {
return $entries;
}
$_subtract = $criteria;