Ticket #23399: wp_insert_attachment_data.diff
File wp_insert_attachment_data.diff, 1.2 KB (added by , 12 years ago) |
---|
-
wp-includes/post.php
3906 3906 * @uses $user_ID 3907 3907 * @uses do_action() Calls 'edit_attachment' on $post_ID if this is an update. 3908 3908 * @uses do_action() Calls 'add_attachment' on $post_ID if this is not an update. 3909 * @uses apply_filters() Calls 'wp_insert_attachment_data' passing $data, $object prior to database update or insert. 3909 3910 * 3910 3911 * @param string|array $object Arguments to override defaults. 3911 3912 * @param string $file Optional filename. … … 4009 4010 $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' ) ); 4010 4011 $data = stripslashes_deep( $data ); 4011 4012 4013 $data = apply_filters('wp_insert_attachment_data', $data, $object); 4014 4012 4015 if ( $update ) { 4013 4016 $wpdb->update( $wpdb->posts, $data, array( 'ID' => $post_ID ) ); 4014 4017 } else {