Inline documentation for the wp_insert_attachment_data
filter hook, added in [27130].
Fixes #20547. git-svn-id: https://develop.svn.wordpress.org/trunk@27138 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aa502ff35a
commit
75c028e042
@ -4093,6 +4093,16 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
|
|||||||
|
|
||||||
// expected_slashed (everything!)
|
// expected_slashed (everything!)
|
||||||
$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' ) );
|
$data = compact( array( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' ) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter attachment post data before it is updated in or added
|
||||||
|
* to the database.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @param array $data Array of sanitized attachment post data.
|
||||||
|
* @param array $object Array of un-sanitized attachment post data.
|
||||||
|
*/
|
||||||
$data = apply_filters( 'wp_insert_attachment_data', $data, $object );
|
$data = apply_filters( 'wp_insert_attachment_data', $data, $object );
|
||||||
$data = wp_unslash( $data );
|
$data = wp_unslash( $data );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user