Skip to content

Commit

Permalink
Inline documentation for the wp_insert_attachment_data filter hook,…
Browse files Browse the repository at this point in the history
… added in [27130].

Fixes #20547.

Built from https://develop.svn.wordpress.org/trunk@27138


git-svn-id: http://core.svn.wordpress.org/trunk@27005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
DrewAPicture committed Feb 8, 2014
1 parent 30c7a12 commit 8c9f796
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -4093,6 +4093,16 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {

// 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' ) );

/**
* 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 = wp_unslash( $data );

Expand Down

0 comments on commit 8c9f796

Please sign in to comment.