Changeset 8672 for trunk/src/bp-xprofile/bp-xprofile-functions.php
- Timestamp:
- 07/23/2014 01:42:48 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-xprofile/bp-xprofile-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-functions.php
r8670 r8672 294 294 return false; 295 295 296 // Special-case support for integer 0 for the number field type297 if ( $is_required && ! is_integer( $value ) && $value !== '0' && ( empty( $value ) || ! is_array( $value ) && ! strlen( trim( $value ) ) ) ) {298 return false;299 }300 301 296 $field = new BP_XProfile_Field( $field_id ); 302 297 $field_type = BP_XProfile_Field::get_type( $field_id ); 303 298 $field_type_obj = bp_xprofile_create_field_type( $field_type ); 299 300 /** 301 * Filter the raw submitted profile field value. 302 * 303 * Use this filter to modify the values submitted by users before 304 * doing field-type-specific validation. 305 * 306 * @since BuddyPress (2.1.0) 307 * 308 * @param mixed $value Value passed to xprofile_set_field_data() 309 * @param BP_XProfile_Field $field Field object. 310 * @param BP_XProfile_Field_Type $field_type_obj Field type object. 311 */ 312 $value = apply_filters( 'bp_xprofile_set_field_data_pre_validate', $value, $field, $field_type_obj ); 313 314 // Special-case support for integer 0 for the number field type 315 if ( $is_required && ! is_integer( $value ) && $value !== '0' && ( empty( $value ) || ! is_array( $value ) && ! strlen( trim( $value ) ) ) ) { 316 return false; 317 } 304 318 305 319 /**
Note: See TracChangeset
for help on using the changeset viewer.