Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#42350 closed defect (bug) (fixed)

Caption on media image widget can't be empty

Reported by: miyauchi's profile miyauchi Owned by: westonruter's profile westonruter
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.9
Component: Widgets Keywords: has-patch
Focuses: Cc:


If we insert a image which has a caption text and we try to clear the caption on the image details screen at the widgets page.
Then caption text always will be used from the value of $attachment->post_excerpt.
So, we can't be empty caption text at the image widget.

Is this behavior intentional?

I guess we should remove line 180.

Attachments (2)

42350.diff (529 bytes) - added by miyauchi 6 years ago.
42350.2.diff (2.5 KB) - added by westonruter 6 years ago.

Download all attachments as: .zip

Change History (5)

6 years ago

#1 @miyauchi
6 years ago

  • Keywords has-patch added

I added a patch to fix this problem.

#2 @westonruter
6 years ago

  • Milestone changed from Awaiting Review to 4.9
  • Owner set to westonruter
  • Status changed from new to accepted

Yeah, this makes sense to me.

6 years ago

#3 @westonruter
6 years ago

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

In 42030:

Widgets: Prevent showing underlying attachment excerpt as caption when empty caption value is supplied in Image widget.

Allow underlying attachment to display if caption is null.

Props miyauchi, westonruter.
See #39993.
Fixes #42350.

Note: See TracTickets for help on using tickets.