Filter
rpress_get_settings
On this page
Filters all stored RestroPress settings.
Runs at the end of rpress_get_settings(), after the single rpress_settings option is read (and migrated from the older per-tab options when it is empty). The array is the flat list of setting key => stored value.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$settings | array | Associative array of all stored settings. |
Return value#
array. The settings array.
Example#
function my_settings_defaults( $settings ) {
if ( ! isset( $settings['my_extension_flag'] ) ) {
$settings['my_extension_flag'] = 'yes';
}
return $settings;
}
add_filter( 'rpress_get_settings', 'my_settings_defaults', 10, 1 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 124), inrpress_get_settings()
See also#
Was this page helpful?
