Skip to content

Commit

Permalink
fix default image option
Browse files Browse the repository at this point in the history
  • Loading branch information
quasel committed May 18, 2017
1 parent cccdd95 commit 684e8eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions classes/class-pods-page-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ static public function get_field_photo( $settings, $property ) {
'url' => pods( get_post_type(), get_the_ID() )->display( $field_url )
);

if ( ! isset( $content->url ) && isset( $settings->default_img_src ) ) {
$content = array(
'id' => $settings['default_img'],
'url' => $settings['default_img_src'],
);
}

return $content;
}

Expand Down

0 comments on commit 684e8eb

Please sign in to comment.