Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56206 closed enhancement (fixed)

Add missing `@since` notes to `gallery_shortcode` documentation`

Reported by: desrosj's profile desrosj Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Gallery Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

The gallery_shortcode() function was introduced in version 2.5. It looks like there are some @since tags that could be added for the gallery_shortcode() function to improve the historical documentation.

A few I identified looking through the version control blame trying to track something else down:

  • In [27302] the HTML elements used for the itemtag, icontag and captiontag attributes were changed when HTML5 support was added through add_theme_support().
  • #24979/[25665] introduced a link attribute in 3.7.
  • #6368/[7496] switched to actually using the $attr parameter to shape the output of the shortcode, introduced several new attributes in including size, itemtag, icontag, captiontag, and columns, and also changed the markup from <div> tags to <dl>, <dt> and <dd> tags, etc. for 2.8.

Attachments (2)

56206.diff (1.8 KB) - added by ben.greeley 2 years ago.
56206.2.diff (1.9 KB) - added by ben.greeley 2 years ago.
Newest patch with changes

Download all attachments as: .zip

Change History (9)

#1 @desrosj
2 years ago

A good function to use as an example is add_theme_support() (source), which has over a dozen @since tags for historical context.

This ticket was mentioned in PR #3076 on WordPress/wordpress-develop by bengreeley.


2 years ago
#2

  • Keywords has-patch added; needs-patch removed

Adds @since for all major functionality and versions for the gallery_shortcode() functionality.

Trac ticket: https://core.trac.wordpress.org/ticket/56206

@ben.greeley
2 years ago

#3 @mukesh27
2 years ago

  • Milestone changed from Future Release to 6.1

PR look good to me.

Set 6.1 milestone for visibility

#4 follow-up: @audrasjb
2 years ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

I spotted a few small issues in the proposed PR. Adding another commit to fix them.

#5 in reply to: ↑ 4 @ben.greeley
2 years ago

@audrasjb Thank you for making those edits. I've uploaded a patch with the changes included.

@ben.greeley
2 years ago

Newest patch with changes

#6 @audrasjb
2 years ago

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

In 54172:

Docs: Add missing @since history in Gallery Shortcode function.

Props bengreeley, audrasjb, desrosj, mukesh27.
Fixes #56206.
See #55646.

Note: See TracTickets for help on using tickets.