[wp-trac] [WordPress Trac] #44383: Deprecate the media_buttons_context filter with apply_filters_deprecated()

WordPress Trac noreply at wordpress.org
Sat Jun 16 10:26:59 UTC 2018


#44383: Deprecate the media_buttons_context filter with apply_filters_deprecated()
--------------------------+----------------------------------------
 Reporter:  birgire       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  3.5
 Severity:  normal        |   Keywords:  needs-patch good-first-bug
  Focuses:                |
--------------------------+----------------------------------------
 Within the {{{media_buttons()}}} function, in the {{{wp-
 admin/includes/media.php}}} file, we have the deprecated filter:
 {{{
 /**
  * Filters the legacy (pre-3.5.0) media buttons.
  *
  * Use {@see 'media_buttons'} action instead.
  *
  * @since 2.5.0
  * @deprecated 3.5.0 Use {@see 'media_buttons'} action instead.
  *
  * @param string $string Media buttons context. Default empty.
  */
  $legacy_filter = apply_filters( 'media_buttons_context', '' );

 }}}

 I think we should consider using the
 [https://developer.wordpress.org/reference/functions/apply_filters_deprecated/
 apply_filters_deprecated()] instead, with the {{{$messages}}} input,
 explaining it further that an action should be used instead.

 Similar deprecation ticket: #44341

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


More information about the wp-trac mailing list