[wp-trac] [WordPress Trac] #33616: Add 'insertIntoPost' and 'uploadedToThisPost' to post type labels

WordPress Trac noreply at wordpress.org
Sun Aug 30 16:32:02 UTC 2015


#33616: Add 'insertIntoPost' and 'uploadedToThisPost' to post type labels
-------------------------------+-----------------------------
 Reporter:  flixos90           |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.0
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 I noticed that among the media strings in `wp_enqueue_media()`, there are
 two strings which should be part of the post type labels which are
 provided/generated when registering a post type.

 In particular, I'm talking about the strings for inserting media into a
 post/page(`insertIntoPost`) as well as for showing media uploaded to a
 post/page (`uploadedToThisPost`).

 The `wp_enqueue_media()` function already receives the featured image
 labels from the current post type object, so I think it would be
 consistent to add the above two strings to the post type object as well
 and receive them from there, and we could get rid of the check whether
 that post type is hierarchical. This furthermore ensures that developers
 don't need to use a filter any more if they want to change these labels.

 When adding the labels to the post type object, I would change the names a
 bit though, to reflect the other labels' structure, for example call them
 `insert_into_item` and `uploaded_to_this_item` respectively.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33616>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list