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

WordPress Trac noreply at wordpress.org
Mon Jun 18 18:28:48 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                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by zsiderov):

 You are ⭐️ Thanks for the help @audrasjb 😊 I have attached the new diff.

 I couldn't trigger the message notification for a screenshot 😞 The things
 I have tried are below.

 {{{
 add_action('media_buttons_context','jcorgbuttons');

 function jcorgbuttons($context) {
         return $context.="<a href='javascript:void(0)'>Hello</a>";
 }
 }}}

 and :

 {{{
 function add_my_media_button() {
   echo '<a href="#" id="insert-my-media" class="button">Add my media</a>';
 }

 add_action('media_buttons', 'add_my_media_button', 15);
 }}}

 I am open to suggestions.

 Thanks,
 Zhivko

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


More information about the wp-trac mailing list