Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#23695 closed enhancement (fixed)

Add orientation information to gallery items

Reported by: obenland Owned by: SergeyBiryukov
Priority: normal Milestone: 3.6
Component: Gallery Version:
Severity: normal Keywords: has-patch commit
Cc: lancewillett, nacin

Description

It would be highly beneficial for Twenty Thirteen to have information about image orientation for the way it implements galleries on index (#23649). Adding it in gallery_shortcode() would make it available to all themes, and would make it easier to style images in different orientations differently.

Plugins like Jetpack currently do their own orientation detection, something that could easily become obsolete.

Attachments (1)

23695.diff (823 bytes) - added by obenland 3 months ago.

Download all attachments as: .zip

Change History (8)

Patch looks good. Assuming we don't need escaping for the class value since the two possible values are hard-coded?

Noting a quick "just looked at it, seems fine" from Nacin in IRC today. We'd like to get this in before freeze so we can finalize Twenty Thirteen's gallery handling and avoid adding custom code to the theme.

  • Keywords commit added
  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 23649:

Add orientation information to gallery items. props obenland. fixes #23695.

  • Type changed from defect (bug) to enhancement

comment:6 follow-up: ↓ 7   TobiasBg2 months ago

Should the CSS classes maybe be prefixed with "orientation-" or something similar?

comment:7 in reply to: ↑ 6   SergeyBiryukov2 months ago

Replying to TobiasBg:

Should the CSS classes maybe be prefixed with "orientation-" or something similar?

A quick IRC discussion: https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2013-03-08&sort=asc#m571516

Note: See TracTickets for help on using tickets.