Changeset 12175 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
- Timestamp:
- 11/01/2022 05:41:04 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
r11770 r12175 203 203 */ 204 204 public function approved( $post_id, $post ) { 205 $attachments = get_attached_media( 'application/zip', $post_id );206 205 $plugin_author = get_user_by( 'id', $post->post_author ); 207 206 … … 214 213 /* 215 214 Temporarily disable SVN prefill from ZIP files 215 $attachments = get_attached_media( 'application/zip', $post_id ); 216 216 if ( $attachments ) { 217 217 $attachment = end( $attachments ); … … 229 229 SVN::import( $dir, 'http://plugins.svn.wordpress.org/' . $post->post_name, sprintf( 'Adding %1$s by %2$s.', $post->post_title, $plugin_author->user_login ) ); 230 230 231 // Delete zips.232 foreach ( $attachments as $attachment ) {233 wp_delete_attachment( $attachment->ID, true );234 }235 236 231 // Grant commit access. 237 232 Tools::grant_plugin_committer( $post->post_name, $plugin_author ); … … 255 250 $original_permalink = $post->post_name; 256 251 $submission_date = get_the_modified_date( 'F j, Y', $post_id ); 257 258 // Delete zips.259 foreach ( get_attached_media( 'application/zip', $post_id ) as $attachment ) {260 wp_delete_attachment( $attachment->ID, true );261 }262 252 263 253 // Change slug to 'rejected-plugin-name-rejected' to free up 'plugin-name'.
Note: See TracChangeset
for help on using the changeset viewer.