Make WordPress Core


Ignore:
Timestamp:
04/14/2022 03:13:45 PM (2 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/class-custom-background.php

    r52978 r53183  
    511511        $filename = wp_basename( $file );
    512512
    513         // Construct the object array.
    514         $object = array(
     513        // Construct the attachment array.
     514        $attachment = array(
    515515            'post_title'     => $filename,
    516516            'post_content'   => $url,
     
    521521
    522522        // Save the data.
    523         $id = wp_insert_attachment( $object, $file );
     523        $id = wp_insert_attachment( $attachment, $file );
    524524
    525525        // Add the metadata.
Note: See TracChangeset for help on using the changeset viewer.