Changeset 5318 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php
- Timestamp:
- 04/11/2017 06:37:04 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php
r5267 r5318 11 11 $post = get_post(); 12 12 13 $zip_ url = '';13 $zip_files = array(); 14 14 foreach ( get_attached_media( 'application/zip', $post ) as $zip_file ) { 15 $zip_url = wp_get_attachment_url( $zip_file->ID ); 16 break; 15 $zip_files[ $zip_file->post_date ] = wp_get_attachment_url( $zip_file->ID ); 17 16 } 18 if ( ! $zip_url ) { 19 $zip_url = get_post_meta( $post->ID, '_submitted_zip', true ); 17 uksort( $zip_files, function( $a, $b ) { 18 return strtotime( $a ) < strtotime( $b ); 19 } ); 20 21 if ( $zip_url = get_post_meta( $post->ID, '_submitted_zip', true ) ) { 22 // Back-compat only. 23 $zip_files[ 'User provided URL' ] = $zip_url; 20 24 } 21 25 22 if ($zip_url ) {26 foreach ( $zip_files as $zip_date => $zip_url ) { 23 27 printf( '<p>' . __( '<strong>Zip file:</strong> %s', 'wporg-plugins' ) . '</p>', 24 sprintf( ' <a href="%s">%s</a>', esc_url( $zip_url ), esc_html( $zip_url ) )28 sprintf( '%s <a href="%s">%s</a>', esc_html( $zip_date ), esc_url( $zip_url ), esc_html( $zip_url ) ) 25 29 ); 26 30 } 27 31 28 if ( 'pending' != $post->post_status ) {32 if ( 'pending' != $post->post_status && 'new' != $post->post_status ) { 29 33 echo "<ul> 30 34 <li><a href='https://plugins.trac.wordpress.org/log/{$post->post_name}/'>" . __( 'Development Log', 'wporg-plugins' ) . "</a></li> … … 33 37 </ul>'; 34 38 } 35 if ( $post->post_excerpt && in_array( $post->post_status, array( ' pending', 'approved' ) ) ) {39 if ( $post->post_excerpt && in_array( $post->post_status, array( 'new', 'pending', 'approved' ) ) ) { 36 40 echo '<p>' . strip_tags( $post->post_excerpt ) . '</p>'; 37 41 } … … 41 45 42 46 $type = 'Notice'; 43 if ( $post->post_status == ' draft' || $post->post_status == 'pending' ) {47 if ( $post->post_status == 'new' || $post->post_status == 'pending' ) { 44 48 $type = 'Request'; 45 49 }
Note: See TracChangeset
for help on using the changeset viewer.