Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#22577 closed defect (bug) (fixed)

'attachment_fields_to_save' is not fired from the new "Add media" modal

Reported by: Chouby Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:


In WP 3.5 RC1, it seems that the filter 'attachment_fields_to_save' is never fired from the new "Add media" modal.

In WP 3.4, it was called when clicking on "save all changes" (the button does not exist anymore) and when clicking "insert into post" (this does not work in WP 3.5 RC1).

Attachments (1)

22577.diff (521 bytes) - added by koopersmith 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 @ocean903 years ago

  • Milestone changed from Awaiting Review to 3.5
  • Owner set to koopersmith
  • Status changed from new to reviewing

@koopersmith3 years ago

comment:2 @koopersmith3 years ago

  • Keywords has-patch added

Correctly access the nonce to save attachment fields. The nonce was moved from l10n to settings when we introduced an ajaxurl setting as well.

Audited the file for any other instances of this bug; this is the only case.

comment:3 @nacin3 years ago

  • Keywords commit added

Tested. Logged the ajax request and fired filters before and after. Thumbs up.

comment:4 @ryan3 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 22842:

Correctly access the nonce to save attachment fields. Fixes firing attachment_fields_to_save.

Props koopersmith
fixes #22577

Note: See TracTickets for help on using tickets.