Changeset 6871
- Timestamp:
- 03/13/2018 03:48:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php
r6303 r6871 13 13 add_action( 'personal_options_update', array( $this, 'save_custom_fields' ), 10, 2 ); 14 14 add_action( 'edit_user_profile_update', array( $this, 'save_custom_fields' ), 10, 2 ); 15 16 // Adjust display of user fields 17 add_filter( 'bbp_get_displayed_user_field', array( $this, 'modify_user_fields' ), 10, 3 ); 15 18 16 19 // Custom user contact methods. … … 105 108 update_user_option( $user_id, 'auto_topic_subscription', $auto_topic_subscription ); 106 109 } 110 111 public function modify_user_fields( $value, $field, $filter ) { 112 if ( $field === 'description' && $filter === 'display' ) { 113 if ( ! is_user_logged_in() ) { 114 $value = ''; 115 } else { 116 $value = bbp_rel_nofollow( $value ); 117 } 118 } 119 return $value; 120 } 107 121 108 122 /**
Note: See TracChangeset
for help on using the changeset viewer.