• Resolved christer_f

    (@christer_f)


    Using the documented function tablepress_get_table() it is possible to programmatically get a table as an HTML string with. For various reasons I need to get tables to process them in PHP and wonder if there is a “stable” function for this. Currently I use the following function:

    $table = TablePress::$model_table->load( $id, true, true );

    This returns the table as a PHP structure. But this function is not documented and the question is how stable this is with respect to future updates to TablePress.

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    Yes, you are fine here. Using TablePress::$model_table->load() is the recommended way for this. I don’t have plans to remove/rename that function (and if I were, I would add a backward-compatibility layer).

    Best wishes,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Get table as json or PHP structure’ is closed to new replies.