[wp-trac] [WordPress Trac] #37255: Update attachment functions to accept a post object in addition to ID

WordPress Trac noreply at wordpress.org
Mon Nov 9 22:58:21 UTC 2020


#37255: Update attachment functions to accept a post object in addition to ID
-------------------------------------------------+-------------------------
 Reporter:  wido                                 |       Owner:
                                                 |  johnbillion
     Type:  enhancement                          |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.7
Component:  Media                                |     Version:  4.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-dev-   |     Focuses:
  note                                           |
-------------------------------------------------+-------------------------

Comment (by manfcarlo):

 Replying to [comment:19 johnbillion]:
 > Allowing these functions to accept either a post ID or a post object is
 a good idea. This should be the case for ''any'' function that accepts a
 post ID.
 Hi, I've just been alerted to this ticket from the mention at #51373. I
 see the main focus of this ticket has been attachment-related functions,
 but are you suggesting with the quoted comment that the ticket should be
 broadened to functions in other areas as well? `get_post_meta` is just one
 I can think of off the top of my head.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/37255#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list