Filter
rpress_settings_tabs
On this page
Filters the top-level tabs shown on the RestroPress settings page.
Runs in rpress_get_settings_tabs when the settings page navigation is built. The array maps a tab slug to its label and starts with General, Payment Gateways, Emails, Styles, Taxes and Privacy, followed by Extensions and Licenses when settings are registered for them, and Misc. Adding a tab here only adds the navigation entry; the tab needs settings registered through rpress_registered_settings under the same slug to display anything.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$tabs | array | Associative array of tab slug => tab label. |
Return value#
array. The tab slug => label array.
Example#
function my_add_settings_tab( $tabs ) {
$tabs['my_tab'] = __( 'My Tab', 'my-plugin' );
return $tabs;
}
add_filter( 'rpress_settings_tabs', 'my_add_settings_tab' );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 2232), inrpress_get_settings_tabs()
See also#
Was this page helpful?
