Only way to move info block above the table is to edit plugin file. In file ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 2671 find:
This filter is applied to an object (PHP’s StdObj), which is later printed as a table’s data attribute (json_encoded), and used to initialize the DataTables instance, and to describe other table settings and parameters that are used by the frontend JS library.
$object is the PHP StdObj which contains all the necessary fields for initializing the table
$tableId is the table identifier from the MySQL table (wp_wpdatatables)
thanks Milos - would I just paste that in functions as you wrote it? Or do I need to write a function calling wpdatatables_filter_table_description( $object, $tableId )?
Hi - how can I move the 'Showing X of X entries' (info block) to the top of the table?
Many thanks.
Hi mks222,
Thank you for the purchase.
Only way to move info block above the table is to edit plugin file. In file ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 2671 find:
and replace it with:
perfect - thank you! Any ideas on how not to overwrite when I update the plugin?
Hi mks222,
There is a solution not to overwrite this using filters. You can create your custom function that you have to add in function.php file of your theme.
wpdatatables_filter_table_description( $object, $tableId )
This filter is applied to an object (PHP’s StdObj), which is later printed as a table’s data attribute (json_encoded), and used to initialize the DataTables instance, and to describe other table settings and parameters that are used by the frontend JS library.
$object is the PHP StdObj which contains all the necessary fields for initializing the table
$tableId is the table identifier from the MySQL table (wp_wpdatatables)
thanks Milos - would I just paste that in functions as you wrote it? Or do I need to write a function calling wpdatatables_filter_table_description( $object, $tableId )?
Thanks.
Hi mks222,
You have to write function that will use this filter. You can add this function in function.php file of your theme.
great, thank you!