Skip to content

Instantly share code, notes, and snippets.

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/119735824defc936fd2d to your computer and use it in GitHub Desktop.
Save luistinygod/119735824defc936fd2d to your computer and use it in GitHub Desktop.
GravityView DataTables: Disable DataTables processing indicator ( WordPress plugin)
<?php
/*
* Plugin Name: GravityView - Disable DataTables processing indicator.
* Plugin URI: http://gravityview.co/extensions/datatables/
* Description: Disable the DataTables display of a 'processing' indicator when the table is being processed (e.g. a sort).
* 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
*/
/**
* Disable the DataTables processing option
*
* @link http://datatables.net/reference/option/processing
*
* @param array $dt_config DataTables init config
* @param string $view_id View ID
* @param WP_Post $post WordPress post object
* @return array
*/
function my_gravityview_datatables_disable_processing( $dt_config, $view_id, $post ) {
// if( 'MY_VIEW_ID' == $view_id ) {
$dt_config['processing'] = false;
// }
return $dt_config;
}
add_filter( 'gravityview_datatables_js_options', 'my_gravityview_datatables_disable_processing', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment