xprofile_filter_pre_validate_value_by_field_type( mixed $value, BP_XProfile_Field $field, BP_XProfile_Field_Type $field_type_obj )

Apply pre_validate_filter() filters as defined by the BP_XProfile_Field_Type classes before validating.


Parameters Parameters

$value

(mixed) (Required) Value passed to the bp_xprofile_set_field_data_pre_validate filter.

$field

(BP_XProfile_Field) (Required) Field object.

$field_type_obj

(BP_XProfile_Field_Type) (Required) Field type object.


Top ↑

Return Return

(mixed)


Source Source

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

function xprofile_filter_pre_validate_value_by_field_type( $value, $field, $field_type_obj ) {
	if ( method_exists( $field_type_obj, 'pre_validate_filter' ) ) {
		$value = call_user_func( array( $field_type_obj, 'pre_validate_filter' ), $value, $field->id );
	}

	return $value;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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