Making WordPress.org


Ignore:
Timestamp:
05/14/2018 10:34:09 PM (8 years ago)
Author:
ocean90
Message:

Plugin Directory: In social_meta_data() don't override the 2x banner if it exists as 2x.

See #2303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php

    r7204 r7208  
    274274        $banner = Template::get_plugin_banner();
    275275
    276         $banner['banner_2x'] = $banner['banner_2x'] ? $banner['banner'] : false;
     276        $banner['banner']    = $banner['banner'] ?? false;
     277        $banner['banner_2x'] = $banner['banner_2x'] ?? false;
    277278
    278279        printf( '<meta property="og:title" content="%s" />' . "\n", the_title_attribute( array( 'echo' => false ) ) );
     
    287288                printf( '<meta name="twitter:image" content="%s" />' . "\n", esc_url( $banner['banner_2x'] ) );
    288289        }
    289         if ( isset( $banner['banner'] ) ) {
     290        if ( $banner['banner'] ) {
    290291                printf( '<meta property="og:image" content="%s" />' . "\n", esc_url( $banner['banner'] ) );
    291292        }
Note: See TracChangeset for help on using the changeset viewer.