Filter
rpress_settings_{$tab}_sanitize
On this page
Filters the posted settings of one tab before they are merged and sanitized.
Runs while the settings form is saved, when the request carries a referrer that identifies the tab. The dynamic part is the tab ID. The array is the raw submitted rpress_settings input; return it after adding or changing keys, for example to store data outside the main option.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$input | array | The submitted settings for the form. |
Return value#
array. The submitted settings.
Example#
function my_taxes_tab_sanitize( $input ) {
if ( isset( $input['my_tax_label'] ) ) {
$input['my_tax_label'] = sanitize_text_field( $input['my_tax_label'] );
}
return $input;
}
add_filter( 'rpress_settings_taxes_sanitize', 'my_taxes_tab_sanitize', 10, 1 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 1890), inrpress_settings_sanitize()
See also#
rpress_settings_%7B%24tab%7D-%7B%24section%7D_sanitizerpress_settings_sanitize
Was this page helpful?
