Skip to content

Commit

Permalink
Revert "Fixes CoAuthors Plus & Elementor Archive Pages conflict. #905"
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones authored Jul 31, 2023
1 parent 1753147 commit 991ffc9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions co-authors-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ function current_user_can_set_authors() {
*/
public function fix_author_page( $selection ) {

global $wp_query, $authordata, $post;
global $wp_query, $authordata;

if ( ! isset( $wp_query ) ) {
return;
Expand All @@ -1208,12 +1208,7 @@ public function fix_author_page( $selection ) {
return;
}

if ( ! isset( $post->post_author ) ) {
$author = $this->get_coauthor_by( 'user_nicename', $author_name );
} else {
$author = $this->get_coauthor_by( 'id', $post->post_author );
}

$author = $this->get_coauthor_by( 'user_nicename', $author_name );
if ( is_object( $author ) ) {
$authordata = $author; //phpcs:ignore
$term = $this->get_author_term( $authordata );
Expand Down

0 comments on commit 991ffc9

Please sign in to comment.