@@ 360-371 (lines=12) @@ | ||
357 | } |
|
358 | ||
359 | // Second fall back, Site Logo. |
|
360 | if ( empty( $image ) && ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) ) { |
|
361 | $image_id = jetpack_get_site_logo( 'id' ); |
|
362 | $logo = wp_get_attachment_image_src( $image_id, 'full' ); |
|
363 | if ( |
|
364 | isset( $logo[0], $logo[1], $logo[2] ) |
|
365 | && ( _jetpack_og_get_image_validate_size( $logo[1], $logo[2], $width, $height ) ) |
|
366 | ) { |
|
367 | $image['src'] = $logo[0]; |
|
368 | $image['width'] = $logo[1]; |
|
369 | $image['height'] = $logo[2]; |
|
370 | } |
|
371 | } |
|
372 | ||
373 | // Third fall back, Core Site Icon, if valid in size. |
|
374 | if ( empty( $image ) && has_site_icon() ) { |
|
@@ 374-385 (lines=12) @@ | ||
371 | } |
|
372 | ||
373 | // Third fall back, Core Site Icon, if valid in size. |
|
374 | if ( empty( $image ) && has_site_icon() ) { |
|
375 | $image_id = get_option( 'site_icon' ); |
|
376 | $icon = wp_get_attachment_image_src( $image_id, 'full' ); |
|
377 | if ( |
|
378 | isset( $icon[0], $icon[1], $icon[2] ) |
|
379 | && ( _jetpack_og_get_image_validate_size( $icon[1], $icon[2], $width, $height ) ) |
|
380 | ) { |
|
381 | $image['src'] = $icon[0]; |
|
382 | $image['width'] = $icon[1]; |
|
383 | $image['height'] = $icon[2]; |
|
384 | } |
|
385 | } |
|
386 | ||
387 | // Final fall back, blank image. |
|
388 | if ( empty( $image ) ) { |