Changeset 2995
- Timestamp:
- 04/21/2016 08:07:36 PM (9 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
r2981 r2995 36 36 */ 37 37 public function publish( $post_id, $post ) { 38 $attachments = get_attached_media( 'application/zip', $post_id ); 39 40 // If there is no zip we have nothing to commit. Bail. 41 if ( empty( $attachments ) ) { 42 return; 43 } 44 45 $attachment = current( $attachments ); 38 46 $plugin_author = get_user_by( 'id', $post->post_author ); 39 47 … … 51 59 52 60 // Read zip and add/commit files to svn. 53 $attachments = get_attached_media( 'application/zip', $post_id );54 $attachment = current( $attachments );55 61 SVN::add( Filesystem::unzip( get_attached_file( $attachment->ID ) ) ); 56 62
Note: See TracChangeset
for help on using the changeset viewer.