Make WordPress Core


Ignore:
Timestamp:
04/14/2022 03:13:45 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/import.php

    r49936 r53183  
    104104    }
    105105
    106     // Construct the object array.
    107     $object = array(
     106    // Construct the attachment array.
     107    $attachment = array(
    108108        'post_title'     => wp_basename( $upload['file'] ),
    109109        'post_content'   => $upload['url'],
     
    115115
    116116    // Save the data.
    117     $id = wp_insert_attachment( $object, $upload['file'] );
     117    $id = wp_insert_attachment( $attachment, $upload['file'] );
    118118
    119119    /*
Note: See TracChangeset for help on using the changeset viewer.