[wp-trac] [WordPress Trac] #44641: Customizing Button Text in Custom Media Manager Frame Doesn't Work Anymore
WordPress Trac
noreply at wordpress.org
Wed Jul 25 12:16:47 UTC 2018
#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: Awaiting Review
Component: Media | Version: 4.9.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
= Summary
I have a plugin that calls up the Media Manager. I use the "gallery"
state, and customize the main button text via the `wp.media` arguments.
I've noticed a regression. The text in the primary button is no longer
overridden by the arguments that I pass.
= What I'm Doing (Code is simplified)
{{{
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
});
file_frame.open();
}}}
= What Should Happen
The text inside the primary button in the media manager modal should
change from "Create a new Gallery" to "Edit Image Order".
[[Image(https://imgur.com/faJevb7)]]
= What Actually Happens
The button ignores my arguments and retains its default text.
[[Image(https://imgur.com/6gLdtLv)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44641>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list