Skip to content

Commit

Permalink
#17 Adding unit tests and code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughdevore committed Aug 14, 2017
1 parent 7e4aba7 commit fbba5fb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Type/MediaItem/Mutation/MediaItemCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ public static function mutate( \WP_Post_Type $post_type_object ) {
$file_name = basename( $input['filePath'] );
$uploaded_file_url = $input['filePath'];

/**
* Check if the download_url method exists and include it if not
* This file also includes the wp_handle_sideload method
*/
if ( ! function_exists( 'download_url' ) ) {
require_once( ABSPATH . 'wp-admin/includes/file.php' );
}

/**
* If the mediaItem file is from a local server, use wp_upload_bits before saving it to the uploads folder
*/
Expand Down

0 comments on commit fbba5fb

Please sign in to comment.