Skip to content

Instantly share code, notes, and snippets.

@luistinygod
Created May 7, 2015 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save luistinygod/2ff8e39090d4e5f44615 to your computer and use it in GitHub Desktop.
Save luistinygod/2ff8e39090d4e5f44615 to your computer and use it in GitHub Desktop.
GravityView DataTables - Disable the stateSave option
<?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