Changeset 4622 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 01/10/2017 10:13:25 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r4514 r4622 20 20 public static function active_installs( $full = true, $post = null ) { 21 21 $post = get_post( $post ); 22 $count = get_post_meta( $post->ID, 'active_installs', true ) ;22 $count = get_post_meta( $post->ID, 'active_installs', true ) ?: 0; 23 23 24 24 if ( $count <= 10 ) { … … 131 131 } 132 132 133 $raw_sections = get_post_meta( $plugin->ID, 'sections', true ) ;133 $raw_sections = get_post_meta( $plugin->ID, 'sections', true ) ?: array(); 134 134 $raw_sections = array_unique( array_merge( $raw_sections, $default_sections ) ); 135 135 … … 216 216 public static function get_plugin_icon( $post = null, $output = 'raw' ) { 217 217 $plugin = get_post( $post ); 218 $raw_icons = get_post_meta( $plugin->ID, 'assets_icons', true ) ;218 $raw_icons = get_post_meta( $plugin->ID, 'assets_icons', true ) ?: array(); 219 219 220 220 $icon = $icon_2x = $svg = $generated = false; … … 295 295 296 296 $banner = $banner_2x = false; 297 $raw_banners = get_post_meta( $plugin->ID, 'assets_banners', true ) ;297 $raw_banners = get_post_meta( $plugin->ID, 'assets_banners', true ) ?: array(); 298 298 299 299 // Split in rtl and non-rtl banners. … … 449 449 450 450 if ( 'latest' == $version || 'latest-stable' == $version ) { 451 $version = get_post_meta( $post->ID, 'stable_tag', true ) ;451 $version = get_post_meta( $post->ID, 'stable_tag', true ) ?: 'trunk'; 452 452 } 453 453
Note: See TracChangeset
for help on using the changeset viewer.