Changeset 13505 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php
- Timestamp:
- 04/12/2024 03:37:30 AM (11 months 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
r13113 r13505 115 115 $zip_files = array(); 116 116 foreach ( get_attached_media( 'application/zip', $post ) as $zip_file ) { 117 $zip_files[ $zip_file->post_date ] = array( wp_get_attachment_url( $zip_file->ID ), $zip_file ); 117 $zip_files[ $zip_file->post_date ] = array( 118 wp_get_attachment_url( $zip_file->ID ), 119 $zip_file, 120 get_attached_file( $zip_file->ID ) 121 ); 118 122 } 119 123 … … 126 130 echo '<ul class="plugin-zip-files">'; 127 131 foreach ( $zip_files as $zip_date => $zip ) { 128 list( $zip_url, $zip_file ) = $zip; 129 $zip_size = size_format( filesize( get_attached_file( $zip_file->ID ) ), 1 ); 130 $zip_preview = Template::preview_link_zip( $slug, $zip_file->ID ); 131 $zip_pcp = Template::preview_link_zip( $slug, $zip_file->ID, 'pcp' ); 132 list( $zip_url, $zip_file, $file_on_disk ) = $zip; 133 134 if ( ! file_exists( $file_on_disk ) ) { 135 continue; 136 } 137 138 $zip_size = size_format( filesize( $file_on_disk ), 1 ); 139 $zip_preview = Template::preview_link_zip( $slug, $zip_file->ID ); 140 $zip_pcp = Template::preview_link_zip( $slug, $zip_file->ID, 'pcp' ); 132 141 133 142 printf(
Note: See TracChangeset
for help on using the changeset viewer.