Ticket #1890: plug in.diff
File plug in.diff, 1.4 KB (added by , 7 years ago) |
---|
-
wp-content/plugins/plugin-directory/class-template.php
221 221 * @return mixed 222 222 */ 223 223 public static function get_plugin_icon( $post = null, $output = 'raw' ) { 224 $plugin = get_post( $post ); 225 $raw_icons = get_post_meta( $plugin->ID, 'assets_icons', true ) ?: array(); 224 $plugin = get_post( $post ); 225 226 if ( in_array( $plugin->post_status, ['disabled', 'closed'], true ) ) { 227 return false; 228 } 226 229 230 $raw_icons = get_post_meta( $plugin->ID, 'assets_icons', true ) ?: array(); 227 231 $icon = $icon_2x = $svg = $generated = false; 232 228 233 foreach ( $raw_icons as $file => $info ) { 229 234 switch ( $info['resolution'] ) { 230 235 case '256x256': … … 289 294 } 290 295 291 296 /** 292 * Retrieve the Plugin Icondetails for a plugin.297 * Retrieve the Plugin banner details for a plugin. 293 298 * 294 299 * @static 295 300 * … … 300 305 public static function get_plugin_banner( $post = null, $output = 'raw' ) { 301 306 $plugin = get_post( $post ); 302 307 308 if ( in_array( $plugin->post_status, ['disabled', 'closed'], true ) ) { 309 return false; 310 } 311 303 312 $banner = $banner_2x = false; 304 313 $raw_banners = get_post_meta( $plugin->ID, 'assets_banners', true ) ?: array(); 305 314