Filter
rpress_settings_emails
On this page
Filters the settings registered for the Emails tab.
Runs while RestroPress builds its registered settings. The array is keyed by section ID (main and order_notifications), and each section is an array of setting ID => field definition with keys such as id, name, desc, type and std. Add, remove or change fields to extend the tab.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$settings | array | Array of section ID => array of setting ID => field definition. |
Return value#
array. The section => settings array.
Example#
function my_add_emails_setting( $settings ) {
$settings['main']['my_extension_option'] = array(
'id' => 'my_extension_option',
'name' => esc_html__( 'My option', 'my-plugin' ),
'desc' => esc_html__( 'Explain what the option does.', 'my-plugin' ),
'type' => 'text',
);
return $settings;
}
add_filter( 'rpress_settings_emails', 'my_add_emails_setting', 10, 1 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 1118), inrpress_get_registered_settings()
See also#
Was this page helpful?
