bp_xprofile_sanitize_field_default( mixed $field_default = '' )

Sanitize each field option default for saving to the database.


Description Description


Parameters Parameters

$field_default

(Optional) Field defaults to sanitize.

Default value: ''


Top ↑

Return Return

(array|int)


Top ↑

Source Source

File: bp-xprofile/bp-xprofile-filters.php

function bp_xprofile_sanitize_field_default( $field_default = '' ) {
	if ( is_array( $field_default ) ) {
		return array_map( 'intval', $field_default );
	} else {
		return intval( $field_default );
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.