Make WordPress Core


Ignore:
Timestamp:
03/25/2017 03:25:48 PM (8 years ago)
Author:
swissspidy
Message:

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

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

Merges [40314] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/customize/class-wp-customize-site-icon-control.php

    r37964 r40332  
    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.