Changeset 11238
- Timestamp:
- 11/05/2016 12:23:02 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-template.php
r10944 r11238 204 204 function bp_field_has_data() { 205 205 global $profile_template; 206 return $profile_template->field_has_data; 206 207 /** 208 * Filters whether or not the XProfile field has data to display. 209 * 210 * @since 2.7.0 211 * 212 * @param bool $value Whether or not there is data to display. 213 * @param object $profile_template Profile template object. 214 * @param string $value Profile field being displayed. 215 * @param string $value Profile field ID being displayed. 216 */ 217 return apply_filters( 'bp_field_has_data', $profile_template->field_has_data, $profile_template, $profile_template->field, $profile_template->field->id ); 207 218 } 208 219 … … 219 230 global $profile_template; 220 231 221 if ( ! empty( $profile_template->field_has_data ) ) { 222 return true; 223 } 224 225 return false; 232 /** 233 * Filters whether or not the XProfile field has public data to display. 234 * 235 * @since 2.7.0 236 * 237 * @param bool $value Whether or not there is public data to display. 238 * @param object $profile_template Profile template object. 239 * @param string $value Profile field being displayed. 240 * @param string $value Profile field ID being displayed. 241 */ 242 return apply_filters( 'bp_field_has_public_data', ( ! empty( $profile_template->field_has_data ) ), $profile_template, $profile_template->field, $profile_template->field->id ); 226 243 } 227 244
Note: See TracChangeset
for help on using the changeset viewer.