[wp-trac] [WordPress Trac] #44641: Customizing Button Text in Custom Media Manager Frame Doesn't Work Anymore

WordPress Trac noreply at wordpress.org
Wed Aug 14 07:28:21 UTC 2019


#44641: Customizing Button Text in Custom Media Manager Frame Doesn't Work Anymore
-------------------------------------+---------------------
 Reporter:  Kelderic                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.3
Component:  Media                    |     Version:  4.9.7
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------
Changes (by donmhico):

 * keywords:  needs-patch => has-patch needs-testing


Comment:

 I've attached a patch,
 [https://core.trac.wordpress.org/attachment/ticket/44641/44641.diff
 44641.diff], but i'm not sure if this is what we want. On one hand, it
 does change the button label in the initial frame displayed. However, when
 you try to go to different frames by clicking the menu nav links in the
 left panel. The button labels of the new loaded frames will then revert to
 using the default label.

 Now my question is, do we want the button label we set in the
 initialization of `wp.media()` -
 {{{
 var file_frame = wp.media.frame = wp.media({
         frame: 'post',
         state: 'gallery',
         library : { type : 'image'},
         button: {text: 'Edit Image Order'},  // <----- LINE IN QUESTION
         multiple: true
 });
 }}}

 used in all of the frames? Or we just want it to be in the initial opened
 frame?

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


More information about the wp-trac mailing list