benecaster_settings_pages
Filters the settings page declarations shown in the show settings left navigation, allowing add-ons to add dedicated configuration pages. Declared pages appear in the nav below the core settings pages, in the order they were appended.
This is a Free filter. Two rendering tiers are available: Tier 1 uses a field-only PHP declaration — Benecaster renders the fields automatically with no JavaScript required, and values are stored as show post meta. Tier 2 fills the page’s SlotFill slot (BenecasterSettingsPage_{id}) with a custom React component for an interactive settings UI.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$pages |
array |
— | Array of settings page declaration arrays |
Returns:
array
Examples
Register custom Integrations page
add_filter( 'benecaster_settings_pages', function( $pages ) {
// Register a new "Integrations" page in show Settings.
$pages[] = [
'id' => 'integrations',
'label' => 'Integrations',
'icon' => 'plugins',
];
return $pages;
} );
Register add-on page with nav badge
add_filter( 'benecaster_settings_pages', function ( array $pages ): array {
$pages[] = [
'id' => 'my-addon',
'label' => __( 'My Add-on', 'my-addon' ),
'add_on' => 'my-addon',
];
return $pages;
} );
Notes
The id value is used as both the React key and the SlotFill slot name (BenecasterSettingsPage_{id}). Use benecaster_settings_sections to inject fields into an existing page rather than declaring a whole new page.
Affects
- Show Settings Navigation