diff --git a/co-authors-plus.php b/co-authors-plus.php index 3ea6cc68..1001594e 100755 --- a/co-authors-plus.php +++ b/co-authors-plus.php @@ -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; }