# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: \includes\users
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 129 | 129 | * @return string|bool Value of the field if it exists, else false |
| 130 | 130 | */ |
| 131 | 131 | function bbp_get_displayed_user_field( $field = '' ) { |
| 132 | | $bbp = bbpress(); |
| | 132 | |
| 133 | 133 | $value = false; |
| 134 | 134 | |
| 135 | | // Return field if exists |
| 136 | | if ( isset( $bbp->displayed_user->$field ) ) |
| 137 | | $value = esc_attr( sanitize_text_field( $bbp->displayed_user->$field ) ); |
| | 135 | if ( !empty( $field ) ) { |
| | 136 | |
| | 137 | $bbp = bbpress(); |
| | 138 | |
| | 139 | // Return field if exists |
| | 140 | if ( isset( $bbp->displayed_user->$field ) ) |
| | 141 | $value = $bbp->displayed_user->$field; |
| 138 | 142 | |
| | 143 | } |
| | 144 | |
| 139 | 145 | // Return empty |
| 140 | 146 | return apply_filters( 'bbp_get_displayed_user_field', $value, $field ); |
| 141 | 147 | } |