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