Changeset 3888
- Timestamp:
- 08/31/2016 03:41:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php
r3864 r3888 107 107 $result['download_link'] = Template::download_link( $post ); 108 108 109 $result['screenshots'] = array(); 110 $descriptions = get_post_meta( $post->ID, 'screenshots', true ); 111 $screen_shots = get_post_meta( $post->ID, 'assets_screenshots', true ) ?: array(); 112 113 /* 114 * Find the image that corresponds with the text. 115 * The image numbers are stored within the 'resolution' key. 116 */ 117 foreach ( $screen_shots as $image ) { 118 $result['screenshots'][ $image['resolution'] ] = array( 119 'src' => Template::get_asset_url( $post->post_name, $image ), 120 'caption' => array_key_exists( $image['resolution'], $descriptions ) ? $descriptions[ $image['resolution'] ] : '' 121 ); 122 } 123 109 124 $result['tags'] = array(); 110 125 if ( $terms = get_the_terms( $post->ID, 'plugin_category' ) ) { … … 121 136 array_push( $versions, 'trunk' ); 122 137 } 123 foreach ( $versions as $version ) { 138 foreach ( $versions as $version ) { 124 139 $result['versions'][ $version ] = Template::download_link( $post, $version ); 125 140 } … … 223 238 <a href="https://profiles.wordpress.org/<?php echo $reviewer->user_nicename; ?>" class="reviewer-name"><?php 224 239 echo $reviewer->display_name; 225 240 226 241 if ( $reviewer->display_name != $reviewer->user_login ) { 227 242 echo " <small>({$reviewer->user_login})</small>";
Note: See TracChangeset
for help on using the changeset viewer.