Changeset 3648
- Timestamp:
- 12/28/2011 06:30:22 PM (14 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
-
bbp-reply-template.php (modified) (1 diff)
-
bbp-topic-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-template.php
r3636 r3648 868 868 $reply_id = bbp_get_reply_id( $reply_id ); 869 869 870 // Check for anonymous user 871 if ( !bbp_is_reply_anonymous( $reply_id ) ) 870 // User is not a guest 871 if ( !bbp_is_reply_anonymous( $reply_id ) ) { 872 873 // Try to get a display name 872 874 $author_name = get_the_author_meta( 'display_name', bbp_get_reply_author_id( $reply_id ) ); 873 else 875 876 // Fall back to user login 877 if ( empty( $author_name ) ) { 878 $author_name = get_the_author_meta( 'user_login', bbp_get_reply_author_id( $reply_id ) ); 879 } 880 881 // User does not have an account 882 } else { 874 883 $author_name = get_post_meta( $reply_id, '_bbp_anonymous_name', true ); 884 } 885 886 // If nothing could be found anywhere, use Anonymous 887 if ( empty( $author_name ) ) 888 $author_name = __( 'Anonymous', 'bbpress' ); 875 889 876 890 return apply_filters( 'bbp_get_reply_author_display_name', esc_attr( $author_name ), $reply_id ); -
branches/plugin/bbp-includes/bbp-topic-template.php
r3637 r3648 1135 1135 1136 1136 // Check for anonymous user 1137 if ( !bbp_is_topic_anonymous( $topic_id ) ) 1137 if ( !bbp_is_topic_anonymous( $topic_id ) ) { 1138 1139 // Try to get a display name 1138 1140 $author_name = get_the_author_meta( 'display_name', bbp_get_topic_author_id( $topic_id ) ); 1139 else 1141 1142 // Fall back to user login 1143 if ( empty( $author_name ) ) { 1144 $author_name = get_the_author_meta( 'user_login', bbp_get_reply_author_id( $topic_id ) ); 1145 } 1146 1147 // User does not have an account 1148 } else { 1140 1149 $author_name = get_post_meta( $topic_id, '_bbp_anonymous_name', true ); 1141 1142 return apply_filters( 'bbp_get_topic_author_id', esc_attr( $author_name ), $topic_id ); 1150 } 1151 1152 // If nothing could be found anywhere, use Anonymous 1153 if ( empty( $author_name ) ) 1154 $author_name = __( 'Anonymous', 'bbpress' ); 1155 1156 return apply_filters( 'bbp_get_topic_author_display_name', esc_attr( $author_name ), $topic_id ); 1143 1157 } 1144 1158
Note: See TracChangeset
for help on using the changeset viewer.