@@ 376-387 (lines=12) @@ | ||
373 | } |
|
374 | ||
375 | // Second fall back, Site Logo. |
|
376 | if ( empty( $image ) && ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) ) { |
|
377 | $image_id = jetpack_get_site_logo( 'id' ); |
|
378 | $logo = wp_get_attachment_image_src( $image_id, 'full' ); |
|
379 | if ( |
|
380 | isset( $logo[0], $logo[1], $logo[2] ) |
|
381 | && ( _jetpack_og_get_image_validate_size( $logo[1], $logo[2], $width, $height ) ) |
|
382 | ) { |
|
383 | $image['src'] = $logo[0]; |
|
384 | $image['width'] = $logo[1]; |
|
385 | $image['height'] = $logo[2]; |
|
386 | } |
|
387 | } |
|
388 | ||
389 | // Third fall back, Core Site Icon, if valid in size. |
|
390 | if ( empty( $image ) && has_site_icon() ) { |
|
@@ 390-401 (lines=12) @@ | ||
387 | } |
|
388 | ||
389 | // Third fall back, Core Site Icon, if valid in size. |
|
390 | if ( empty( $image ) && has_site_icon() ) { |
|
391 | $image_id = get_option( 'site_icon' ); |
|
392 | $icon = wp_get_attachment_image_src( $image_id, 'full' ); |
|
393 | if ( |
|
394 | isset( $icon[0], $icon[1], $icon[2] ) |
|
395 | && ( _jetpack_og_get_image_validate_size( $icon[1], $icon[2], $width, $height ) ) |
|
396 | ) { |
|
397 | $image['src'] = $icon[0]; |
|
398 | $image['width'] = $icon[1]; |
|
399 | $image['height'] = $icon[2]; |
|
400 | } |
|
401 | } |
|
402 | ||
403 | // Final fall back, blank image. |
|
404 | if ( empty( $image ) ) { |