Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#14411 closed enhancement (fixed)

Add wp-caption-text to caption class for Gallery Shortcode

Reported by: chipbennett's profile chipbennett Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Gallery Keywords: has-patch
Focuses: Cc:


wp-includes\media.php - line 855

Replace <{$captiontag} class='gallery-caption'>

with <{$captiontag} class='gallery-caption wp-caption-text'>

Adding wp-caption-text to the class declaration for Gallery image captions will facilitate styling media-manager-inserted images consistently, without having to define multiple style declarations. Since existing Gallery shortcode users will have already defined gallery-caption, this declaration should remain.

Attachments (1)

media.php.diff (489 bytes) - added by chipbennett 13 years ago.
Diff created from root, rather than from wp-includes

Download all attachments as: .zip

Change History (8)

#1 @chipbennett
13 years ago

  • Keywords has-patch added

This is my first attempt at creating a patch. Please advise if I've done anything incorrectly.

#2 @filosofo
13 years ago

You should generate the patch file from WP's root, instead of a sub-directory such as wp-includes (as you did here). Doing so makes it easy for the committer to apply the patch.

13 years ago

Diff created from root, rather than from wp-includes

#3 follow-up: @chipbennett
13 years ago

Re-generated the patch. How is it now?

#4 @nacin
13 years ago

  • Milestone changed from Awaiting Review to 3.1

#5 @iandstewart
13 years ago

  • Cc ian@… added

Sounds good to me. I can see allowing themers to style both single-image and gallery-image captions in one fell swoop with a single class being pretty useful.

#6 in reply to: ↑ 3 @lancewillett
13 years ago

  • Cc lance@… added

Replying to chipbennett:

Re-generated the patch. How is it now?

Patch look good. I think this will be come in handy.

#7 @nacin
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.