Hi,
thanks for your question, and sorry for the trouble.
The code that you posted is a low-level API function that does always return the full table data. To only retrieve visible data, you’d have to apply the code from the _prepare_render_data method of the class-render.php file.
An alternative could be to hook into TablePress at the tablepress_table_render_data filter hook inside that function, to only retrieve/edit the visible rows.
Regards,
Tobias
I am having the same issue. I have some javascript that needs the full table data except hidden rows. I still need a hidden column though. Any chance you could show me what to change here to make that happen?
<script type='text/javascript'>
<?php
$table = TablePress::$controller->model_table->load('Master');
$js_array = json_encode($table[data]);
echo "var _tableArray = ". $js_array . ";\n";
?>
</script>
Hi,
thanks for your post, and sorry for the trouble.
Also, sorry for the long wait for a reply. As a I was on a long vacation without internet access the last couple weeks, I could not reply earlier.
That PHP code will print the full table. The information about the visibility is stored in $table['visibility'] so that you will need to take that into account.
Regards,
Tobias