Filter
rpress_settings_sections_extensions
On this page
Filters the list of sections shown in the Extensions 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 Extensions 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#
| Parameter | Type | Description |
|---|---|---|
$sections | array | Associative array of section slug => section label. |
Return value#
array. The section slug => label array.
Example#
function my_add_extensions_section( $sections ) {
$sections['my_section'] = __( 'My Section', 'my-plugin' );
return $sections;
}
add_filter( 'rpress_settings_sections_extensions', 'my_add_extensions_section' );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 2290), inrpress_get_registered_settings_sections()
See also#
Was this page helpful?
