Skip to content

Commit

Permalink
An undefined variable in the byline class, for #1547
Browse files Browse the repository at this point in the history
  • Loading branch information
benlk committed Nov 8, 2018
1 parent ff3f26a commit deefc30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/byline_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ public function __toString() {
* This supports both Largo_Byline and Largo_CoAuthors_Byline
*/
function avatar() {

// only do avatars if it's a single post
if ( ! is_single() ) {
$output = '';
$output = ' ';
} else {
$output = '';
$author_email = get_the_author_meta( 'email', $this->author_id );
if ( $this->author->type == 'guest-author' && get_the_post_thumbnail( $this->author->ID ) ) {
if ( isset( $this->author ) && $this->author->type == 'guest-author' && get_the_post_thumbnail( $this->author->ID ) ) {
$output = get_the_post_thumbnail( $this->author->ID, array( 60,60 ) );
$output = str_replace( 'attachment-32x32', 'avatar avatar-32 photo', $output );
$output = str_replace( 'wp-post-image', '', $output );
Expand Down

0 comments on commit deefc30

Please sign in to comment.