Created
May 1, 2015 15:21
-
-
Save luistinygod/d88e0141449b4b9476ed to your computer and use it in GitHub Desktop.
GravityView DataTables - Disable DataTables Search Filter and paging
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 | |
/* | |
* Plugin Name: GravityView - Disable DataTables Search Filter and paging | |
* Plugin URI: http://gravityview.co/extensions/datatables/ | |
* Description: Disable the DataTables search filter and paging input. | |
* Version: 1.0 | |
* Author: Katz Web Services, Inc. | |
* Author URI: http://www.katzwebservices.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
add_filter( 'gravityview_datatables_js_options', 'disable_gravityview_datatables_search', 10, 3 ); | |
/** | |
* Disable the DataTables search filter | |
* @param [type] $dt_config [description] | |
* @param [type] $view_id [description] | |
* @param [type] $post [description] | |
* @return [type] [description] | |
*/ | |
function disable_gravityview_datatables_search( $dt_config, $view_id, $post ) { | |
$dt_config['searching'] = false; | |
$dt_config['paging'] = false; | |
return $dt_config; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment