Skip to content

Instantly share code, notes, and snippets.

@luistinygod
Created May 1, 2015 15:21
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 luistinygod/d88e0141449b4b9476ed to your computer and use it in GitHub Desktop.
Save luistinygod/d88e0141449b4b9476ed to your computer and use it in GitHub Desktop.
GravityView DataTables - Disable DataTables Search Filter and paging
<?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