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

WordPress Trac noreply at wordpress.org
Wed Jun 20 21:20:21 UTC 2018


#44383: Deprecate the media_buttons_context filter with apply_filters_deprecated()
----------------------------------------+------------------------------
 Reporter:  birgire                     |       Owner:  zsiderov
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Media                       |     Version:  3.5
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by zsiderov):

 Thanks @birgire  and @audrasjb for the help! I have attached the new file.

 @birgire I wasn't sure what to do about the bug you mentioned about
 `$replacement` being used in `apply_filters_deprecated` and
 `_deprecated_hook` differently. I left it as `false` as this is what the
 is also mentioned in
 https://developer.wordpress.org/reference/functions/apply_filters_deprecated/

 Should this go as a separate PR if it needs to be changed? I can see the
 docs talking about it as being `false` as default argument. So if a change
 is going to be made - will the change need to be reflected in the docs as
 well? Alternatively both functions can check for `null` and `false` which
 will help with it since we only want to hit the `if` statement when this
 is only `true` - so this brings the question should we not be checking for
 `null` and `false` in the first place?

 I failed miserably again with viewing the error and creating a screenshot.
 My assumption was that when I open the `dashboard` in the browser and
 navigate to `Edit Post` I will see it as a message there 😎 My lack of
 knowledge of WordPress mechanics is pretty obvious there - not sure how to
 trigger it i.e. visit the Edit Post page in the back-end  😞

 What will you guys recommend to do first before continue with any other
 tickets? Create a `theme` and `plugin`? Something else? I really need to
 get familiar with WordPress mechanics and common behaviour first as this
 bug is just one line change and I have troubles making such a simple
 change let alone something more complex.

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


More information about the wp-trac mailing list