attachment_thumbnail_args

attachment_thumbnail_args

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('attachment_thumbnail_args') is found 1 times:

  • /wp-admin/includes/image.php line 674
    				 *     @type string $url   URL of the uploaded file.
    				 *     @type string $type  File type.
    				 * }
    				 */
    				$image_attachment = apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded );
    
    				$sub_attachment_id = wp_insert_attachment( $image_attachment, $uploaded['file'] );
    				add_post_meta( $sub_attachment_id, '_cover_hash', $hash );
    				$attach_data = wp_generate_attachment_metadata( $sub_attachment_id, $uploaded['file'] );
    				wp_update_attachment_metadata( $sub_attachment_id, $attach_data );
    				update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id );