Skip to content
Docs
Get RestroPress

Filter

rpress_non_setting_types

Updated
On this page

Filters the setting types that are skipped during sanitization.

Runs for each registered setting during the settings save. Fields whose type is in this list hold no value, so they are skipped. The default list is header, descriptive_text and hook.

Parameters#

ParameterTypeDescription
$non_setting_typesarrayList of field type names. Default header, descriptive_text, hook.

Return value#

array. List of field type names.

Example#

function my_non_setting_types( $non_setting_types ) {
	$non_setting_types[] = 'my_info_box';
	return $non_setting_types;
}
add_filter( 'rpress_non_setting_types', 'my_non_setting_types', 10, 1 );

Source#

Applied in:

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

See also#

Was this page helpful?