wp_insert_attachment_data

wp_insert_attachment_data

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_insert_attachment_data') is found 1 times:

  • /wp-includes/post.php line 4746
    4742
    4743
    4744
    4745
    4746
    4747
    4748
    4749
    4750
    4751
    4752
         * @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data
         *                                   as originally passed to wp_insert_post().
         * @param bool  $update              Whether this is an existing attachment post being updated.
         */
        $data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr, $update );
    } else {
        /**
         * Filters slashed post data just before it is inserted into the database.
         *
         * @since 2.7.0
         * @since 5.4.1 The `$unsanitized_postarr` parameter was added.

See this hook used in plugins: