Skip to content

Instantly share code, notes, and snippets.

@zackkatz
Forked from luistinygod/gist:2ff8e39090d4e5f44615
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/80330bbfd7522d865172 to your computer and use it in GitHub Desktop.
Save zackkatz/80330bbfd7522d865172 to your computer and use it in GitHub Desktop.
<?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
*/
function my_gv_state_save( $config, $view_id ) {
$config['stateSave'] = false;
return $config;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment