bp_xprofile_sanitize_field_default( mixed $field_default = '' )
Sanitize each field option default for saving to the database.
Description
Parameters
- $field_default
-
(Optional) Field defaults to sanitize.
Default value: ''
Return
(array|int)
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 );
}
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.3.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.