xprofile_filter_format_field_value_by_type( mixed $field_value, string $field_type = '', string|int $field_id = '' )
Apply display_filter() filters as defined by BP_XProfile_Field_Type classes, when inside a bp_has_profile() loop.
Parameters Parameters
- $field_value
-
(mixed) (Required) Field value.
- $field_type
-
(string) (Optional) Field type.
Default value: ''
- $field_id
-
(string|int) (Optional) ID of the field.
Default value: ''
Return Return
(mixed)
Source Source
File: bp-xprofile/bp-xprofile-filters.php
function xprofile_filter_format_field_value_by_type( $field_value, $field_type = '', $field_id = '' ) { foreach ( bp_xprofile_get_field_types() as $type => $class ) { if ( $type !== $field_type ) { continue; } if ( method_exists( $class, 'display_filter' ) ) { $field_value = call_user_func( array( $class, 'display_filter' ), $field_value, $field_id ); } } return $field_value; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Added $field_id parameter. |
2.1.0 | Introduced. |