Skip to content
Docs
Get RestroPress

Filter

rpress_settings_{$tab}-{$section}_sanitize

Updated
On this page

Filters the posted settings of one tab section before they are merged and sanitized.

Runs right after the tab-level sanitize filter while the settings form is saved. The dynamic parts are the tab ID and section ID, joined by a hyphen, for example gateways-accounting. Use it for sections that save special data.

Parameters#

ParameterTypeDescription
$inputarrayThe submitted settings for the form.

Return value#

array. The submitted settings.

Example#

function my_misc_section_sanitize( $input ) {
	if ( isset( $input['my_terms_note'] ) ) {
		$input['my_terms_note'] = wp_kses_post( $input['my_terms_note'] );
	}
	return $input;
}
add_filter( 'rpress_settings_misc-site_terms_sanitize', 'my_misc_section_sanitize', 10, 1 );

Source#

Applied in:

  • includes/admin/settings/register-settings.php (line 1892), in rpress_settings_sanitize()

See also#

  • rpress_settings_%7B%24tab%7D_sanitize
Was this page helpful?