bp_ps_Fields::set_display( $f, $filter )
Description
Source
File: bp-core/profile-search/bps-fields.php
public static function set_display ($f, $filter) { $format = isset ($f->format)? $f->format: 'none'; $enum = (isset ($f->options) && is_array ($f->options))? count ($f->options): 0; $selector = $format. ($enum? '/e': ''); if (!isset (self::$display[$selector][$filter])) return false; $display = self::$display[$selector][$filter]; if (is_string ($display)) { $f->display = $display; } else { $default = (isset ($f->type) && in_array ($f->type, $display))? $f->type: $display[0]; $choice = apply_filters ('bp_ps_field_display', $default, $f); $f->display = in_array ($choice, $display)? $choice: $default; } return true; }
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.