Skip to content
Docs
Get RestroPress

Filter

rpress_settings_sections_misc

Updated
On this page

Filters the list of sections shown in the Misc 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 Misc 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. Default sections are Miscellaneous, Terms of Agreement and Realtime Updates.

Parameters#

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

Return value#

array. The section slug => label array.

Example#

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

Source#

Applied in:

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

See also#

Was this page helpful?