[wp-trac] [WordPress Trac] #32417: Add new core media widget

WordPress Trac noreply at wordpress.org
Thu Feb 23 19:15:34 UTC 2017


#32417: Add new core media widget
-------------------------------------------------+-------------------------
 Reporter:  melchoyce                            |       Owner:  melchoyce
     Type:  feature request                      |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.8
Component:  Widgets                              |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests has-patch needs-    |     Focuses:  ui,
  refresh                                        |  administration
-------------------------------------------------+-------------------------

Comment (by westonruter):

 Replying to [comment:120 gonom9]:
 > @karmatosed Fixed the bug of ignoring changes of title and caption in
 both
 [https://core.trac.wordpress.org/attachment/ticket/32417/32417.16.diff
 32417.16.diff] and
 [https://gist.github.com/taggon/d381e421b743eb5f0e71d225ea18fffa the
 plugin].

 @gonom9 Is this the right approach? Is this not resulting in the title and
 caption being duplicated in the widget vs. what is stored in the
 attachment? To eliminate that duplication I reverted
 [https://github.com/xwp/wordpress-
 develop/pull/215/commits/0bb0f579d1a5ec686624981b9a1fc9ce12307eea that
 commit] and added a [https://github.com/xwp/wordpress-
 develop/pull/215/commits/dd038c5238a2f4e358222a6ac9d8e2a360cde8b7 new one]
 which takes a different approach to explicitly refresh the widget partial
 in the preview whenever the form is re-rendered. Note that this doesn't
 account for the case where a user may change an attachment's caption but
 then close the modal without hitting the Add button.

 Really this is starting to touch on #37887 where there is a problem
 previewing with the media modal. When a change is made in the media modal
 (such as to the caption) the change is written to the DB immediately. This
 will be somewhat unexpected in the customizer context because everything
 should be ''previewed'' until hitting Save & Publish.

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


More information about the wp-trac mailing list