Created
May 7, 2015 17:51
-
-
Save luistinygod/2ff8e39090d4e5f44615 to your computer and use it in GitHub Desktop.
GravityView DataTables - Disable the stateSave option
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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