Filter
rpress_get_option_{$key}
On this page
Filters the value returned by rpress_get_option() for one specific setting key.
Runs after the general rpress_get_option filter, with the option key in the hook name. Use it to override a single setting without testing the key yourself.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | mixed | The option value after the general filter. |
$key | string | The option key. |
$default | mixed | The default passed to rpress_get_option(). |
Return value#
mixed. The option value.
Example#
function my_currency_option( $value, $key, $default ) {
return 'USD';
}
add_filter( 'rpress_get_option_currency', 'my_currency_option', 10, 3 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 28), inrpress_get_option()
See also#
Was this page helpful?
