Created
March 10, 2015 11:13
-
-
Save luistinygod/119735824defc936fd2d to your computer and use it in GitHub Desktop.
GravityView DataTables: Disable DataTables processing indicator ( WordPress plugin)
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 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