Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#28991 closed defect (bug) (fixed)

Media Grid: Support for attachment_fields_to_edit in attachment details modal

Reported by: danielbachhuber's profile danielbachhuber Owned by: helen's profile helen
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: javascript Cc:

Description

I registered an input field using attachment_fields_to_editand expected to see it here: https://dl.dropboxusercontent.com/s/shnpw3dskrr9xhi/2014-07-22%20at%204.25%20PM.png

It appears as I expected here: https://dl.dropboxusercontent.com/s/g3w5itz92ko1iyf/2014-07-22%20at%204.26%20PM.png

Something I'm missing?

Attachments (1)

28991.diff (1.7 KB) - added by ericlewis 9 years ago.

Download all attachments as: .zip

Change History (10)

#1 @helen
9 years ago

  • Focuses javascript added
  • Keywords needs-patch added

Probably haven't wired it up.

#2 @helen
9 years ago

  • Summary changed from Missing support for attachment_fields_to_edit in the new single image edit view to Media Grid: Support for attachment_fields_to_edit in attachment details modal

@ericlewis
9 years ago

#3 @ericlewis
9 years ago

  • Keywords has-patch added; needs-patch removed

Thanks Daniel! In attachment:28991.diff, attach wp.media.view.AttachmentCompat as a subview of media.view.Attachment.Details.TwoColumn in the media grid edit attachment modal.

#4 follow-up: @robertburnfield
9 years ago

Glad to see this but need some server side hooks. Currently via the grid layout of media there appears to be no way to hook into this to add additional features. If you check wp-includes/media-templates.php there are no calls to attachment_fields_to_edit or any other filters/actions that could be used to inject additional content.

#5 @helen
9 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 29278:

Add support for attachment_fields_to_edit in the attachment details modal. props ericlewis. fixes #28991, see #24716.

#6 in reply to: ↑ 4 @helen
9 years ago

Replying to robertburnfield:

Currently via the grid layout of media there appears to be no way to hook into this to add additional features.

Sorry, didn't see this earlier - not sure what you're looking for. This is referring to the fields in the sidebar, not within the grid itself.

#7 follow-up: @pbearne
9 years ago

Hi Helen

It is the sidebar hook we wish to use

We will pull the trunk and try to hook this in

We couldn't see the filter in this patch can you confirm that is was hooked?

Paul

#8 in reply to: ↑ 7 @helen
9 years ago

Replying to pbearne:

We couldn't see the filter in this patch can you confirm that is was hooked?

I tested it before committing as a committer well should, if that's what you're questioning. Nothing happens in PHP because it's in Backbone, and the patch is minimal because the view already existed.

#9 @pbearne
9 years ago

Thanks

We have found the problem with our code ;-)

and learned a lot about backbone

ta

Note: See TracTickets for help on using tickets.