Tablepress Categories Shortcode Extension

November 13, 2024

Roadmap
  1. Via hooks into Tablepress, add a Tablepress version of WP's Post Categories meta box to the "Edit Table" page, between "Table Information" and "Table Content".

    (Post Categories meta box source: wp-admin/includes/meta-boxes.php, function post_categories_meta_box( $post, $box ))
    https://developer.wordpress.org/reference/functions/post_categories_meta_box/
  2. Via Hooks into Tablepress, add wp_insert_term() to protected function _table_to_post( array $table, int $post_id ) in model-table.php.
  3. Via Hooks into Tablepress, add function get_the_category( $post_id = false ) to protected function _post_to_table( WP_Post $post, string $table_id, bool $load_data ) in model-table.php.
  4. Via Hooks into Tablepress, add the necessary Category lines to public function sanitize( array $table ) in model-table.php.
  5. Via Hooks into Tablepress, add the necessary Category lines to public function filter_content( array $table ) in model-table.php.
  6. Via Hooks into Tablepress, add the necessary Category lines to public function save( array $table ) in model-table.php.
  7. Via Hooks into Tablepress, add the necessary Category lines to public function add( array $table, string $copy_or_add = 'add' ) in model-table.php.
  8. Via Hooks into Tablepress, add 'category' => '' to public function get_table_template() in model-table.php.
  9. Via Hooks into Tablepress, add the necessary Category lines to public function prepare_table() in model-table.php.
  10. Within the table-category extension, create the shortcode, , to display only those tables in a selected Category.
    1. The resulting multiple table render on the front end has to follow the styles / CSS available within the site’s own Tablepress installation, or have the ability to use custom CSS.
  11. Via Hooks into Tablepress, add a Category dropdown to the “All Tables” listing, to allow viewing of All Tables, Category 1, Category 2 … etc.
  12. Via Hooks into Tablepress, add Category to the import and export functions.