Skip to content

Commit

Permalink
Don't show the username if it's restricted to a user
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Aug 31, 2024
1 parent aa0e0b1 commit cc9c6fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3129,7 +3129,7 @@ public function render_dashboard_widget_controls( $id, $widget = false ) {
if ( isset( $args['friend'] ) && $args['friend'] === $user->user_login ) {
echo ' selected="selected"';
}
echo '>' . esc_html( $user->display_name ) . '</option>';
echo '>' . esc_html( $user->display_name ) . ' (' . esc_html( $user->user_login ) . ')</option>';
}
echo '</select>';
echo '</label>';
Expand Down
6 changes: 3 additions & 3 deletions templates/admin/dashboard-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<a href="<?php echo esc_attr( $friend_user->get_local_friends_page_url() ); ?>" class="author-avatar">
<img src="<?php echo esc_url( $avatar ); ?>" width="16" height="16" />
</a>
<?php if ( isset( $args['friend_user'] ) ) : ?>
<a href="<?php echo esc_url( $friend_user->get_local_friends_page_url() ); ?>">
<strong><?php echo esc_html( $friend_user->display_name ); ?></strong>
<?php if ( $override_author_name && trim( str_replace( $override_author_name, '', $author_name ) ) === $author_name ) : ?>
<strong><?php echo esc_html( $friend_user->display_name ); ?></strong><?php if ( $override_author_name && trim( str_replace( $override_author_name, '', $author_name ) ) === $author_name ) : ?>
<?php echo esc_html( $override_author_name ); ?>
<?php endif; ?></a>:
<?php endif; ?>
</a>:
<a href="<?php echo esc_url( $friend_user->get_local_friends_page_url( $_post->ID ) ); ?>">
<?php
if ( $_post->post_title ) {
Expand Down

0 comments on commit cc9c6fe

Please sign in to comment.