WordPress.org

Make WordPress Core

Changeset 40314


Ignore:
Timestamp:
03/23/2017 06:12:01 AM (14 months ago)
Author:
westonruter
Message:

Customize: Harden site_icon control template to account for when full image size is missing.

Props aussieguy123, westonruter.
See #36749.
Fixes #40010.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-site-icon-control.php

    r37964 r40314  
    6868
    6969                            <div class="favicon">
    70                                 <img src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
     70                                <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
    7171                            </div>
    7272                            <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
    7373                        </div>
    74                         <img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
     74                        <img class="app-icon-preview" src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
    7575                    </div>
    7676                <# } #>
Note: See TracChangeset for help on using the changeset viewer.