Changeset 7075
- Timestamp:
- 04/10/2018 04:24:17 AM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r7072 r7075 390 390 if ( ! $icon || 'publish' !== $plugin->post_status ) { 391 391 $generated = true; 392 $icon = $svg =self::get_geopattern_icon_url( $plugin );392 $icon = self::get_geopattern_icon_url( $plugin ); 393 393 } 394 394 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-api-update-updater.php
r7072 r7075 127 127 $banners['1x'] = $raw_banners['banner']; 128 128 } 129 if ( $banners ) {130 $banners['default'] = $banners['2x'] ?? $banners['1x'];131 }132 129 133 130 // RTL Banners (get_plugin_banner 'raw_with_rtl' returns these) … … 137 134 if ( !empty( $raw_banners['banner_rtl'] ) ) { 138 135 $banners_rtl['1x'] = $raw_banners['banner_rtl']; 139 }140 if ( $banners_rtl ) {141 $banners_rtl['default'] = $banners_rtl['2x'] ?? $banners_rtl['1x'];142 136 } 143 137 … … 151 145 if ( !empty( $raw_icons['svg'] ) ) { 152 146 $icons['svg'] = $raw_icons['svg']; 147 } 148 if ( !empty( $raw_icons['generated'] ) ) { 149 // Geopattern SVG will be in 'icon': 150 $icons['default'] = $raw_icons['icon']; 153 151 154 // We don't need to set the 1x field when it's the SVG. 155 if ( isset( $icons['1x'] ) && $icons['1x'] == $icons['svg'] ) { 156 unset( $icons['1x'] ); 157 } 158 } 159 if ( $icons ) { 160 $icons['default'] = $icons['svg'] ?? ( $icons['2x'] ?? $icons['1x'] ); 152 // Don't set the `1x` field when it's a geopattern icon 153 unset( $icons['1x'] ); 161 154 } 162 155
Note: See TracChangeset
for help on using the changeset viewer.