wp_create_file_in_uploads

wp_create_file_in_uploads

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.3.1

do_action('wp_create_file_in_uploads') is found 5 times:

  • /wp-admin/includes/ajax-actions.php line 4017
    				break;
    			}
    
    			/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    			$cropped    = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
    			$attachment = $wp_site_icon->create_attachment_object( $cropped, $attachment_id );
    			unset( $attachment['ID'] );
    
    			// Update the attachment.
    			add_filter( 'intermediate_image_sizes_advanced', array( $wp_site_icon, 'additional_sizes' ) );
    			$attachment_id = $wp_site_icon->insert_attachment( $attachment, $cropped );
    
  • /wp-admin/includes/ajax-actions.php line 4045
    			 */
    			do_action( 'wp_ajax_crop_image_pre_save', $context, $attachment_id, $cropped );
    
    			/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    			$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
    
    			$parent_url      = wp_get_attachment_url( $attachment_id );
    			$parent_basename = wp_basename( $parent_url );
    			$url             = str_replace( $parent_basename, wp_basename( $cropped ), $parent_url );
    
    			$size       = wp_getimagesize( $cropped );
    
  • /wp-admin/includes/class-custom-image-header.php line 908
    				wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
    			}
    
    			/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    			$image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication.
    
    			$url    = str_replace( wp_basename( $url ), wp_basename( $image ), $url );
    			$width  = $width / $oitar;
    			$height = $height / $oitar;
    		} else {
    			$oitar = 1;
    
  • /wp-admin/includes/class-custom-image-header.php line 1067
    			wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
    		}
    
    		/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    		$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
    
    		$attachment = $this->create_attachment_object( $cropped, $attachment_id );
    
    		if ( ! empty( $_POST['create-new-attachment'] ) ) {
    			unset( $attachment['ID'] );
    		}
    
  • /wp-admin/includes/class-custom-image-header.php line 1411
    			wp_send_json_error( array( 'message' => __( 'Image could not be processed. Please go back and try again.' ) ) );
    		}
    
    		/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    		$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
    
    		$attachment = $this->create_attachment_object( $cropped, $attachment_id );
    
    		$previous = $this->get_previous_crop( $attachment );
    
    		if ( $previous ) {