@@ 324-335 (lines=12) @@ | ||
321 | } |
|
322 | ||
323 | // Second fall back, Site Logo. |
|
324 | if ( empty( $image ) && ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) ) { |
|
325 | $image_id = jetpack_get_site_logo( 'id' ); |
|
326 | $logo = wp_get_attachment_image_src( $image_id, 'full' ); |
|
327 | if ( |
|
328 | isset( $logo[0], $logo[1], $logo[2] ) |
|
329 | && ( _jetpack_og_get_image_validate_size( $logo[1], $logo[2], $width, $height ) ) |
|
330 | ) { |
|
331 | $image['src'] = $logo[0]; |
|
332 | $image['width'] = $logo[1]; |
|
333 | $image['height'] = $logo[2]; |
|
334 | } |
|
335 | } |
|
336 | ||
337 | // Third fall back, Core Site Icon, if valid in size. Added in WP 4.3. |
|
338 | if ( empty( $image ) && ( function_exists( 'has_site_icon' ) && has_site_icon() ) ) { |
|
@@ 338-349 (lines=12) @@ | ||
335 | } |
|
336 | ||
337 | // Third fall back, Core Site Icon, if valid in size. Added in WP 4.3. |
|
338 | if ( empty( $image ) && ( function_exists( 'has_site_icon' ) && has_site_icon() ) ) { |
|
339 | $image_id = get_option( 'site_icon' ); |
|
340 | $icon = wp_get_attachment_image_src( $image_id, 'full' ); |
|
341 | if ( |
|
342 | isset( $icon[0], $icon[1], $icon[2] ) |
|
343 | && ( _jetpack_og_get_image_validate_size( $icon[1], $icon[2], $width, $height ) ) |
|
344 | ) { |
|
345 | $image['src'] = $icon[0]; |
|
346 | $image['width'] = $icon[1]; |
|
347 | $image['height'] = $icon[2]; |
|
348 | } |
|
349 | } |
|
350 | ||
351 | // Final fall back, blank image. |
|
352 | if ( empty( $image ) ) { |