Skip to content

Commit

Permalink
Merge pull request #973 from Automattic/hotfix-check-get_current_scre…
Browse files Browse the repository at this point in the history
…en-exists
  • Loading branch information
GaryJones authored Aug 19, 2023
2 parents 8a7de62 + d9ae2b4 commit 1fd7a39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions co-authors-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -1860,8 +1860,8 @@ public function filter_pre_get_avatar_data_url( $args, $id ) {
}

// Do not filter when on the user screen
$current_screen = get_current_screen();
if ( isset( $current_screen->parent_base ) && 'users' == $current_screen->parent_base ) {
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
if ( ! is_null( $current_screen ) && isset( $current_screen->parent_base ) && 'users' === $current_screen->parent_base ) {
return $args;
}

Expand Down

0 comments on commit 1fd7a39

Please sign in to comment.