[wp-trac] [WordPress Trac] #39628: add $post arg to display_media_states filter

WordPress Trac noreply at wordpress.org
Wed Jan 18 17:31:17 UTC 2017


#39628: add $post arg to display_media_states filter
-------------------------+-----------------------------
 Reporter:  pbiron       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 It would be good to pass {{{$post}}} to the {{{display_media_states}}}
 filter, for several reasons:

 1. so that we don't have to rely on {{{global $post}}} being set
 appropriately
 2. to mirror the {{{display_post_states}}} filter

 I started looking into this filter to get around a bug with the Logo state
 not being added when appropriate (see Ticket [ticket:39627]), and it took
 me a while to realize that I could key off of {{{global $post}}} to know
 whether Logo should be added to {{{$media_states}}}.

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


More information about the wp-trac mailing list