Skip to content
Docs
Get RestroPress

Filter

rpress_settings_sections_taxes

Updated
On this page

Filters the list of sections shown in the Taxes settings tab.

Runs when the settings sections are first built, before the combined rpress_settings_sections filter. The array maps a section slug to its label; the labels become the sub-navigation of the Taxes tab. A section only shows settings that are registered for that tab and section slug through the rpress_registered_settings filter. The result is cached in a static variable for the rest of the request.

Parameters#

ParameterTypeDescription
$sectionsarrayAssociative array of section slug => section label.

Return value#

array. The section slug => label array.

Example#

function my_add_taxes_section( $sections ) {
	$sections['my_section'] = __( 'My Section', 'my-plugin' );
	return $sections;
}
add_filter( 'rpress_settings_sections_taxes', 'my_add_taxes_section' );

Source#

Applied in:

  • includes/admin/settings/register-settings.php (line 2287), in rpress_get_registered_settings_sections()

See also#

Was this page helpful?