wp_generate_attachment_metadata, $metadata, $attachment_id, update

wp_generate_attachment_metadata, $metadata, $attachment_id, update

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: gutenberg.23.6.2

apply_filters('wp_generate_attachment_metadata, $metadata, $attachment_id, update') is found 1 times:

  • /lib/media/class-gutenberg-rest-attachments-controller.php line 860
    		 * @param int    $attachment_id Attachment ID.
    		 * @param string $context       Context: 'create' or 'update'.
    		 */
    		// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
    		$metadata = apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id, 'update' );
    
    		wp_update_attachment_metadata( $attachment_id, $metadata );
    
    		$response_request = new WP_REST_Request(
    			WP_REST_Server::READABLE,
    			rest_get_route_for_post( $attachment_id )