wp_update_attachment_metadata

wp_update_attachment_metadata

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('wp_update_attachment_metadata') is found 1 times:

  • /wp-includes/post.php line 6811
    6807
    6808
    6809
    6810
    6811
    6812
    6813
    6814
    6815
    6816
    6817
         *
         * @param array $data          Array of updated attachment meta data.
         * @param int   $attachment_id Attachment post ID.
         */
        $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID );
        if ( $data ) {
            return update_post_meta( $post->ID, '_wp_attachment_metadata', $data );
        } else {
            return delete_post_meta( $post->ID, '_wp_attachment_metadata' );
        }
    }

See this hook used in plugins: