Storing current page WP list table HTML data into a PHP variable
I am trying to store my render post table HTML data of just the table into a PHP variable after the table is completely loaded.
I've tried to store:
$table = new Custom_Table_Example_List_Table();
$tablehtml = $table-display();
But this returns an array, not the full rendered table.. (e.g table.../table
).
I have tried using JS var table = $(#tableid").html
and with document.write
to fire, but keeps coming back as undefined. But if I tie it to a click action of a button, the HTML data shows fine.
It may seem as if I would need to capture the data AFTER the system knows that the table and jQuery is loaded fully.
Topic parse wp-list-table jquery Wordpress
Category Web