mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Coding Standards: Rename the $object variable to $attachment in several files.
This brings some consistency with a similar fragment in `Custom_Image_Heade::step_2_manage_upload()`, `WP_Site_Icon::insert_attachment()`, `media_handle_upload()`, and clarifies the type of the data. Follow-up to [52946], [53137]. See #55327, #54728. git-svn-id: https://develop.svn.wordpress.org/trunk@53183 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -103,8 +103,8 @@ function wp_import_handle_upload() {
|
||||
return $upload;
|
||||
}
|
||||
|
||||
// Construct the object array.
|
||||
$object = array(
|
||||
// Construct the attachment array.
|
||||
$attachment = array(
|
||||
'post_title' => wp_basename( $upload['file'] ),
|
||||
'post_content' => $upload['url'],
|
||||
'post_mime_type' => $upload['type'],
|
||||
@@ -114,7 +114,7 @@ function wp_import_handle_upload() {
|
||||
);
|
||||
|
||||
// Save the data.
|
||||
$id = wp_insert_attachment( $object, $upload['file'] );
|
||||
$id = wp_insert_attachment( $attachment, $upload['file'] );
|
||||
|
||||
/*
|
||||
* Schedule a cleanup for one day from now in case of failed
|
||||
|
||||
Reference in New Issue
Block a user