Skip to content
Docs
Get RestroPress

Action

rpress_tools_tab_{$active_tab}

Updated
On this page

Fires when a tab of the RestroPress Tools page is displayed.

The dynamic part is the active tab slug taken from the tab query argument after legacy slugs are mapped. Core tabs are health_check, data_repair, menu_utilities, order_utilities, customer_access, diagnostics, betas and import_export. Callbacks hooked here print the panel content for that tab, so adding a tab with rpress_tools_tabs requires a callback on the matching action.

Example#

function my_render_tools_tab() {
	echo '<div class="postbox"><div class="inside"><p>' . esc_html__( 'My tool panel.', 'my-plugin' ) . '</p></div></div>';
}
add_action( 'rpress_tools_tab_my_tab', 'my_render_tools_tab' );

Notes#

Replace {$active_tab} with a tab slug, for example rpress_tools_tab_data_repair. Core callbacks check the manage_shop_settings capability themselves; custom callbacks should do the same.

Source#

Fired from:

  • includes/admin/tools.php (line 54), in rpress_tools_page()

See also#

Was this page helpful?