Skip to content

Commit 07852bb

Browse files
committedNov 5, 2014
Don't look for images if we already found one
Oops. :)
1 parent 4ef1240 commit 07852bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎functions.opengraph.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function jetpack_og_get_image( $width = 200, $height = 200, $max_images = 4 ) {
155155
}
156156

157157
// Attempt to find something good for this post using our generalized PostImages code
158-
if ( class_exists( 'Jetpack_PostImages' ) ) {
158+
if ( !$image && class_exists( 'Jetpack_PostImages' ) ) {
159159
$post_images = Jetpack_PostImages::get_images( $post->ID, array( 'width' => $width, 'height' => $height ) );
160160
if ( $post_images && !is_wp_error( $post_images ) ) {
161161
$image = array();

0 commit comments

Comments
 (0)
Please sign in to comment.