TablePress icon
Content & Editing

TablePress hooks reference

  • By Tobias Bäthge
  • v3.4.1
  • Updated

TablePress 3.4.1 has 13 actions and 90 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when TablePress fires an action
add_action( 'manage_tablepress_list_custom_column', function( $column_name, $item ) {
	// Your code runs here.
}, 10, 2 );

// Change a value TablePress is about to use
add_filter( 'tablepress_export_filename', function( $download_filename, $table, $table2, $export, $export_to_zip ) {
	// Change $download_filename here.
	return $download_filename;
}, 10, 5 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • controllers/controller-admin.php line 1054 · used in 3 places
    /**
     * Filters the download filename of the exported table.
     */
    apply_filters( 'tablepress_export_filename', $download_filename, $table['id'], $table['name'], $export['format'], $export_to_zip );
  • controllers/controller-admin_ajax.php line 271 · used in 3 places
    /**
     * This filter is documented in controllers/controller-frontend.php
     */
    apply_filters( 'tablepress_shortcode_table_default_shortcode_atts', $default_render_options );
  • controllers/controller-admin_ajax.php line 275 · used in 3 places
    /**
     * This filter is documented in controllers/controller-frontend.php
     */
    apply_filters( 'tablepress_shortcode_table_shortcode_atts', $render_options );
  • controllers/controller-admin.php line 930 · used in 2 places
    /**
     * This filter is documented in classes/class-controller.php
     */
    apply_filters( 'tablepress_admin_menu_parent_page', $posted_options['admin_menu_parent_page'] );
  • classes/class-render.php line 903 · used in 2 places
    /**
     * Filters whether line breaks in the cell content shall be replaced with HTML
     * br tags.
     */
    apply_filters( 'tablepress_apply_nl2br', true, $this->table['id'] );
  • classes/class-elementor-widget-table.php line 195 · used in 2 places
    /**
     * Filters the list of table IDs and names that is passed to the block editor,
     * and is then used in the dropdown of the TablePress table block.
     */
    apply_filters( 'tablepress_block_editor_tables_list', $tables );
  • controllers/controller-admin.php line 1072 · used in 2 places
    /**
     * Filters the exported table data.
     */
    apply_filters( 'tablepress_export_data', $export_data, $table, $export['format'], $export['csv_delimiter'] );
  • classes/class-css.php line 439 · used in 2 places
    /**
     * This filter is documented in models/model-table.php
     */
    apply_filters( 'tablepress_flush_caching_plugins_caches', true );
  • classes/class-css.php line 240 · used in 2 places
    /**
     * Filters whether the "Custom CSS" code shall be saved to a file on the
     * server.
     */
    apply_filters( 'tablepress_save_custom_css_to_file', true );
  • controllers/controller-frontend.php line 694 · used in 2 places
    /**
     * Filters the "Table could not be loaded" message.
     */
    apply_filters( 'tablepress_table_load_error_message', $message, $table_id, $table );
  • controllers/controller-frontend.php line 677 · used in 2 places
    /**
     * Filters the "Table not found" message.
     */
    apply_filters( 'tablepress_table_not_found_message', $message, $table_id );
  • views/class-all-tables-list-table.php line 416
    /**
     * This filter is documented in the WordPress function
     * WP_List_Table::bulk_actions() in wp-admin/includes/class-wp-list-table.php
     */
    apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
  • views/class-all-tables-list-table.php line 352
    /**
     * Fires inside each custom column of the TablePress list table.
     */
    do_action( 'manage_tablepress_list_custom_column', $column_name, $item );
  • controllers/controller-admin.php line 172
    /**
     * Filters whether the legacy editor button should be loaded on the post
     * editing screen.
     */
    apply_filters( 'tablepress_add_legacy_editor_button', true );
  • controllers/controller-admin.php line 97
    /**
     * Filters the TablePress admin menu entry name.
     */
    apply_filters( 'tablepress_admin_menu_entry_name', 'TablePress' );
  • classes/class-tablepress.php line 1110
    /**
     * Filters the dependencies of a TablePress script file.
     */
    apply_filters( 'tablepress_admin_page_script_dependencies', $dependencies, $name );
  • controllers/controller-admin.php line 756
    /**
     * Filters the available TablePres Views/Actions and their parameters.
     */
    apply_filters( 'tablepress_admin_view_actions', $this->view_actions );
  • controllers/controller-frontend.php line 605
    /**
     * Filters the JavaScript commands that invoke the DataTables JavaScript
     * library on all tables on the page.
     */
    apply_filters( 'tablepress_all_datatables_commands', $commands );
  • controllers/controller-frontend.php line 623
    /**
     * Filters the script/jQuery wrapper code for the DataTables commands calls.
     */
    apply_filters( 'tablepress_all_datatables_commands_wrapper', $script_template );
  • controllers/controller-frontend.php line 846
    /**
     * Filters the cache hit comment message.
     */
    apply_filters( 'tablepress_cache_hit_comment', "<!-- #{$render_options['html_id']} from cache -->" );
  • classes/class-render.php line 297
    /**
     * Filters the content of a single cell, after formulas have been evaluated,
     * the output has been sanitized, and Shortcodes have been evaluated.
     */
    apply_filters( 'tablepress_cell_content', $cell_content, $this->table['id'], $row_idx + 1, $col_idx + 1 );
  • classes/class-render.php line 787
    /**
     * Filters the CSS classes that are given to a single cell (HTML td element) of
     * a table.
     */
    apply_filters( 'tablepress_cell_css_class', $cell_class, $this->table['id'], $cell_content, $row_idx + 1, $col_idx + 1, $this->colspan[ $row_idx ], $this->rowspan[ $col_idx ] );
  • classes/class-render.php line 810
    /**
     * Filters the attributes for the table cell (HTML td or th element).
     */
    apply_filters( 'tablepress_cell_tag_attributes', $tag_attributes, $this->table['id'], $cell_content, $row_idx + 1, $col_idx + 1, $this->colspan[ $row_idx ], $this->rowspan[ $col_idx ] );
  • classes/class-render.php line 540
    /**
     * Filters the attributes of the HTML col tags in the HTML colgroup tag.
     */
    apply_filters( 'tablepress_colgroup_tag_attributes', $attributes, $this->table['id'], $col_idx + 1 );
  • controllers/controller-frontend.php line 287
    /**
     * Filters the "Custom CSS" code that is to be loaded as inline CSS.
     */
    apply_filters( 'tablepress_custom_css', $custom_css );
  • classes/class-css.php line 164
    /**
     * Filters the file path on the server from which the "Custom CSS" file is
     * loaded.
     */
    apply_filters( 'tablepress_custom_css_file_name', $path, $file, $type );
  • classes/class-css.php line 150
    /**
     * Filters the URL from which the "Custom CSS" file is loaded.
     */
    apply_filters( 'tablepress_custom_css_url', $url, $file, $type );
  • controllers/controller-frontend.php line 219
    /**
     * Filters the "Custom CSS" version number that is appended to the enqueued CSS
     * files
     */
    apply_filters( 'tablepress_custom_css_version', TablePress::$model_options->get( 'custom_css_version' ) );
  • controllers/controller-frontend.php line 557
    /**
     * Filters the JavaScript command that invokes the DataTables JavaScript
     * library on one table.
     */
    apply_filters( 'tablepress_datatables_command', $command, $html_id, $parameters, $table_id, $js_options, $name );
  • controllers/controller-frontend.php line 593
    /**
     * Filters the JavaScript code for the DataTables JavaScript library that
     * initializes the automatically detected date/time formats via moment.js.
     */
    apply_filters( 'tablepress_datatables_datetime_command', $datatables_datetime_command, $this->datatables_datetime_formats );
  • controllers/controller-frontend.php line 329
    /**
     * Filters the dependencies for the DataTables JavaScript library.
     */
    apply_filters( 'tablepress_datatables_js_dependencies', $dependencies );
  • controllers/controller-frontend.php line 314
    /**
     * Filters the URL from which the DataTables JavaScript library file is loaded.
     */
    apply_filters( 'tablepress_datatables_js_url', $js_url, $js_file );
  • controllers/controller-frontend.php line 428
    /**
     * Filters the language file path for the DataTables JavaScript library.
     */
    apply_filters( 'tablepress_datatables_language_file', $orig_language_file, $datatables_locale, TABLEPRESS_ABSPATH );
  • controllers/controller-frontend.php line 467
    /**
     * Filters the language strings for the DataTables JavaScript library's
     * features.
     */
    apply_filters( 'tablepress_datatables_language_strings', $datatables_strings, $datatables_locale );
  • controllers/controller-frontend.php line 410
    /**
     * Filters the locale/language for the DataTables JavaScript library.
     */
    apply_filters( 'tablepress_datatables_locale', $js_options['datatables_locale'], $table_id );
  • controllers/controller-frontend.php line 529
    /**
     * Filters the parameters that are passed to the DataTables JavaScript library.
     */
    apply_filters( 'tablepress_datatables_parameters', $parameters, $table_id, $html_id, $js_options );
  • controllers/controller-frontend.php line 233
    /**
     * Filters the URL from which the TablePress Default CSS file is loaded.
     */
    apply_filters( 'tablepress_default_css_url', $unfiltered_default_css_url );
  • controllers/controller-frontend.php line 722
    /**
     * Filters whether the "datatables_custom_commands" Shortcode parameter is
     * disabled.
     */
    apply_filters( 'tablepress_disable_custom_commands_shortcode_parameter', true );
  • models/model-table.php line 389
    /**
     * Fires after a new table has been added.
     */
    do_action( 'tablepress_event_added_table', $table_id );
  • models/model-table.php line 757
    /**
     * Fires after the ID of a table has been changed.
     */
    do_action( 'tablepress_event_changed_table_id', $new_id, $old_id );
  • models/model-table.php line 441
    /**
     * Fires after an existing table has been copied.
     */
    do_action( 'tablepress_event_copied_table', $new_table_id, $table_id );
  • models/model-table.php line 526
    /**
     * Fires after all tables have been deleted.
     */
    do_action( 'tablepress_event_deleted_all_tables' );
  • models/model-table.php line 491
    /**
     * Fires after a table has been deleted.
     */
    do_action( 'tablepress_event_deleted_table', $table_id );
  • models/model-table.php line 466
    /**
     * Fires before a table is deleted.
     */
    do_action( 'tablepress_event_pre_delete_table', $table_id );
  • models/model-table.php line 301
    /**
     * Fires before a table is saved.
     */
    do_action( 'tablepress_event_pre_save_table', $table['id'] );
  • models/model-table.php line 343
    /**
     * Fires after a table has been saved.
     */
    do_action( 'tablepress_event_saved_table', $table['id'] );
  • models/model-options.php line 141
    /**
     * Fires after the options have been saved.
     */
    do_action( 'tablepress_event_updated_options', $old_options );
  • classes/class-tablepress.php line 154
    /**
     * Filters whether TablePress should exit early, e.g. during wp-login.php,
     * XML-RPC, and WP-Cron requests.
     */
    apply_filters( 'tablepress_exit_early', $exit_early );
  • classes/class-export.php line 92
    /**
     * Filters the available export formats.
     */
    apply_filters( 'tablepress_exporters', $this->exporters );
  • controllers/controller-frontend.php line 90
    /**
     * Filters whether TablePress should load its frontend CSS files on all pages.
     * For block themes, the default behavior is to only load the CSS files when a
     * table is encountered on the page. If Elementor is active, the CSS is also
     * loaded on the editor page.
     */
    apply_filters( 'tablepress_frontend_legacy_css_loading', ! wp_is_block_theme() || ( isset( $_GET['elementor-preview'] ) && is_plugin_active( 'elementor/elementor.php' ) ) );
  • controllers/controller-frontend.php line 780
    /**
     * Filters the ID of the table HTML element.
     */
    apply_filters( 'tablepress_html_id', $render_options['html_id'], $table_id, $count );
  • classes/class-import.php line 211
    /**
     * Filters whether common URL mistakes shall be fixed automatically.
     */
    apply_filters( 'tablepress_import_fix_common_url_mistakes', true );
  • classes/class-import-legacy.php line 91
    /**
     * Filters the data that is to be imported.
     */
    apply_filters( 'tablepress_import_table_data', $data, $format );
  • models/model-table.php line 250
    /**
     * Filters all table IDs that are loaded.
     */
    apply_filters( 'tablepress_load_all_tables', $table_ids );
  • classes/class-tablepress.php line 228
    /**
     * Filters name of the class that shall be loaded.
     */
    apply_filters( 'tablepress_load_class_name', $class_name );
  • classes/class-tablepress.php line 202
    /**
     * Filters the full path of a file that shall be loaded.
     */
    apply_filters( 'tablepress_load_file_full_path', $full_path, $file, $folder );
  • classes/class-tablepress.php line 180
    /**
     * Fires after TablePress is loaded.
     */
    do_action( 'tablepress_loaded' );
  • models/model-options.php line 392
    /**
     * Filters a user's TablePress capabilities.
     */
    apply_filters( 'tablepress_map_meta_caps', $caps, $cap, $user_id, $args );
  • models/model-post.php line 57
    /**
     * Filters the "Custom Post Type" that TablePress uses for storing tables in
     * the database.
     */
    apply_filters( 'tablepress_post_type', $this->post_type );
  • models/model-post.php line 78
    /**
     * Filters the arguments for the registration of the "Custom Post Type" that
     * TablePress uses.
     */
    apply_filters( 'tablepress_post_type_args', $post_type_args );
  • classes/class-render.php line 503
    /**
     * Filters the class attribute for the HTML caption element of the table.
     */
    apply_filters( 'tablepress_print_caption_class', "tablepress-table-caption tablepress-table-caption-id-{$this->table['id']}", $this->table['id'] );
  • classes/class-render.php line 491
    /**
     * Filters the content for the HTML caption element of the table.
     */
    apply_filters( 'tablepress_print_caption_text', '', $this->table );
  • classes/class-render.php line 528
    /**
     * Filters whether the HTML colgroup tag shall be added to the table output.
     */
    apply_filters( 'tablepress_print_colgroup_tag', false, $this->table['id'] );
  • classes/class-render.php line 419
    /**
     * Filters the class attribute for the printed table description.
     */
    apply_filters_deprecated( 'tablepress_print_description_css_class', array( "tablepress-table-description tablepress-table-description-id-{$this->table['id']}", $this->table['id'] ), 'TablePress 1.13.0', 'tablepress_table_description_tag_attributes' );
  • classes/class-render.php line 404
    /**
     * Filters the HTML tag that wraps the printed table description.
     */
    apply_filters( 'tablepress_print_description_html_tag', 'span', $this->table['id'] );
  • classes/class-render.php line 380
    /**
     * Filters the class attribute for the printed table name.
     */
    apply_filters_deprecated( 'tablepress_print_name_css_class', array( "tablepress-table-name tablepress-table-name-id-{$this->table['id']}", $this->table['id'] ), 'TablePress 1.13.0', 'tablepress_table_name_tag_attributes' );
  • classes/class-render.php line 365
    /**
     * Filters the HTML tag that wraps the printed table name.
     */
    apply_filters( 'tablepress_print_name_html_tag', 'h2', $this->table['id'] );
  • classes/class-render.php line 634
    /**
     * Filters the content for the summary attribute of the HTML table element.
     */
    apply_filters( 'tablepress_print_summary_attr', $summary, $this->table );
  • classes/class-render.php line 842
    /**
     * Filters the CSS classes that are given to a row (HTML tr element) of a
     * table.
     */
    apply_filters( 'tablepress_row_css_class', $row_classes, $this->table['id'], $row_cells, $row_idx + 1, $this->table['data'][ $row_idx ] );
  • classes/class-render.php line 857
    /**
     * Filters the attributes for the table row (HTML tr element).
     */
    apply_filters( 'tablepress_row_tag_attributes', $tr_attributes, $this->table['id'], $row_idx + 1, $this->table['data'][ $row_idx ] );
  • classes/class-tablepress.php line 117
    /**
     * Fires before TablePress is loaded.
     */
    do_action( 'tablepress_run' );
  • controllers/controller-frontend.php line 935
    /**
     * Filters the available/default attributes for the [table-info] Shortcode.
     */
    apply_filters( 'tablepress_shortcode_table_info_default_shortcode_atts', $default_shortcode_atts );
  • controllers/controller-frontend.php line 1067
    /**
     * Filters the output of the [table-info] Shortcode.
     */
    apply_filters( 'tablepress_shortcode_table_info_output', $output, $table, $shortcode_atts );
  • controllers/controller-frontend.php line 954
    /**
     * Filters whether the output of the [table-info] Shortcode is
     * overwritten/short-circuited.
     */
    apply_filters( 'tablepress_shortcode_table_info_overwrite', false, $shortcode_atts );
  • controllers/controller-frontend.php line 944
    /**
     * Filters the attributes that were passed to the [table-info] Shortcode.
     */
    apply_filters( 'tablepress_shortcode_table_info_shortcode_atts', $shortcode_atts );
  • controllers/controller-admin.php line 270
    /**
     * Filters whether the table block preview should be loaded via a
     * <ServerSideRender> in the block editor.
     */
    apply_filters( 'tablepress_show_block_editor_preview', true );
  • classes/class-tablepress.php line 910
    /**
     * Filters the outcome of the check whether the site uses the block editor.
     */
    apply_filters( 'tablepress_site_uses_block_editor', $site_uses_block_editor );
  • classes/class-render.php line 347
    /**
     * Filters the trigger keywords for "colspan" and "rowspan"
     */
    apply_filters( 'tablepress_span_trigger_keywords', $this->span_trigger, $this->table['id'] );
  • classes/class-render.php line 316
    /**
     * Filters the table after processing the table content handling.
     */
    apply_filters( 'tablepress_table_content_render_data', $this->table, $orig_table, $this->render_options );
  • controllers/controller-frontend.php line 708
    /**
     * Filters the "Table data is corrupted" message.
     */
    apply_filters( 'tablepress_table_corrupted_message', $message, $table_id, $table['json_error'] );
  • classes/class-render.php line 603
    /**
     * Filters the CSS classes that are given to the HTML table element.
     */
    apply_filters( 'tablepress_table_css_classes', $css_classes, $this->table['id'] );
  • classes/class-render.php line 429
    /**
     * Filters the attributes for the table description (HTML span element, by
     * default).
     */
    apply_filters( 'tablepress_table_description_tag_attributes', $description_attributes, $this->table, $this->render_options );
  • classes/class-render.php line 190
    /**
     * Filters the table after evaluating formulas in the table.
     */
    apply_filters( 'tablepress_table_evaluate_data', $this->table, $orig_table, $this->render_options );
  • classes/class-render.php line 671
    /**
     * Filters the generated HTML code for the table, without HTML elements around
     * it.
     */
    apply_filters( 'tablepress_table_html', $table_html, $this->table, $this->render_options );
  • controllers/controller-frontend.php line 1055
    /**
     * Filters the "table info field not found" message.
     */
    apply_filters( 'tablepress_table_info_not_found_message', $output, $table, $field, $format );
  • classes/class-tablepress.php line 134
    /**
     * Filters the string that is used as the [table-info] Shortcode.
     */
    apply_filters( 'tablepress_table_info_shortcode', self::$shortcode_info );
  • controllers/controller-frontend.php line 889
    /**
     * Filters the JavaScript options for the table.
     */
    apply_filters( 'tablepress_table_js_options', $js_options, $table_id, $render_options );
  • classes/class-render.php line 390
    /**
     * Filters the attributes for the table name (HTML h2 element, by default).
     */
    apply_filters( 'tablepress_table_name_tag_attributes', $name_attributes, $this->table, $this->render_options );
  • models/model-table.php line 1089
    /**
     * Filters the Table Options before they are merged with the default Table
     * Options.
     */
    apply_filters( 'tablepress_table_options_before_merge', $table_options, $default_table['options'], $remove_old_options, $post_id );
  • classes/class-render.php line 693
    /**
     * Filters the generated HTML code for the table and HTML elements around it.
     */
    apply_filters( 'tablepress_table_output', $output, $this->table, $this->render_options );
  • classes/class-render.php line 127
    /**
     * Filters the table before the render process.
     */
    apply_filters( 'tablepress_table_raw_render_data', $this->table, $this->render_options );
  • classes/class-render.php line 261
    /**
     * Filters the table after processing the table visibility information.
     */
    apply_filters( 'tablepress_table_render_data', $this->table, $orig_table, $this->render_options );
  • controllers/controller-frontend.php line 808
    /**
     * Filters the render options for the table.
     */
    apply_filters( 'tablepress_table_render_options', $render_options, $table );
  • classes/class-tablepress.php line 126
    /**
     * Filters the string that is used as the [table] Shortcode.
     */
    apply_filters( 'tablepress_table_shortcode', self::$shortcode );
  • classes/class-render.php line 655
    /**
     * Filters the attributes for the table (HTML table element).
     */
    apply_filters( 'tablepress_table_tag_attributes', $table_attributes, $this->table, $this->render_options );
  • models/model-table.php line 835
    /**
     * Filters the default template/structure of an empty table.
     */
    apply_filters( 'tablepress_table_template', $table );
  • controllers/controller-frontend.php line 200
    /**
     * Filters whether the TablePress Default CSS code shall be loaded.
     */
    apply_filters( 'tablepress_use_default_css', true );
  • classes/class-evaluate.php line 43
    /**
     * Filters whether the Legacy Table Evaluate class shall be used.
     */
    apply_filters( 'tablepress_use_legacy_table_evaluate_class', false );
  • classes/class-import.php line 523
    /**
     * Filters whether the Legacy Table Import class shall be used.
     */
    apply_filters( 'tablepress_use_legacy_table_import_class', false );
  • controllers/controller-admin.php line 654
    /**
     * Filters the data that is passed to the current TablePress View.
     */
    apply_filters( 'tablepress_view_data', $data, $action );
  • controllers/controller-frontend.php line 111
    /**
     * Filters whether the WordPress search shall also search TablePress tables.
     */
    apply_filters( 'tablepress_wp_search_integration', true );
  • tablepress.php line 101
    do_action( 'tb_tp_fs_loaded' );

Generated from TablePress's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: