Skip to content
Docs
Get RestroPress

Filter

rpress_settings_section_privacy

Updated
On this page

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

Runs when the settings sections are built. The default contains a single export_erase section labelled Export & Erase. Note the singular section in this hook name, unlike the other per-tab section filters.

Parameters#

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

Return value#

array. The section slug => label array.

Example#

function my_add_privacy_section( $sections ) {
	$sections['my_privacy'] = __( 'My Privacy Options', 'my-plugin' );
	return $sections;
}
add_filter( 'rpress_settings_section_privacy', 'my_add_privacy_section' );

Notes#

The hook name uses section (singular), while the others use sections.

Source#

Applied in:

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

See also#

Was this page helpful?