Skip to content

Commit

Permalink
Fix avatar collision on profile, post and edit screens
Browse files Browse the repository at this point in the history
  • Loading branch information
katag9k authored Sep 6, 2023
1 parent 346b0ec commit a05e5b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions co-authors-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,11 @@ public function filter_pre_get_avatar_data_url( $args, $id ) {
return $args;
}

// do not filter on the post list screen, profile screen and post takeover pop-up
if ( isset( $current_screen->base ) && ( 'post' === $current_screen->base || 'profile' === $current_screen->base || 'edit' === $current_screen->base ) ) {
return $args;
}


$coauthor = $this->get_coauthor_by( 'id', $id );
if ( false !== $coauthor && isset( $coauthor->type ) && 'guest-author' === $coauthor->type ) {
Expand Down

0 comments on commit a05e5b5

Please sign in to comment.