Skip to content
Docs
Get RestroPress

Action

rpress_settings_tab_top

Updated
On this page

Fires at the top of a settings tab, before its fields, for the main section.

Runs inside the settings form before the sections are printed, only when the current section is main. The active tab ID is passed, so a callback should compare it to target one tab. Echo markup directly.

Parameters#

ParameterTypeDescription
$active_tabstringThe ID of the active settings tab.

Example#

function my_settings_tab_top( $active_tab ) {
	if ( 'gateways' !== $active_tab ) {
		return;
	}
	echo '<p class="description">' . esc_html__( 'Test mode charges no cards.', 'my-plugin' ) . '</p>';
}
add_action( 'rpress_settings_tab_top', 'my_settings_tab_top', 10, 1 );

Source#

Fired from:

  • includes/admin/settings/display-settings.php (line 124), in rpress_options_page()

See also#

Was this page helpful?