Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28678 closed defect (bug) (fixed)

Document default attributes for wp_playlist_shortcode()

Reported by: drewapicture's profile DrewAPicture Owned by: taylorde's profile taylorde
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Media Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

The default attributes for wp_playlist_shortcode() should be documented.

Current Reference: http://developer.wordpress.org/reference/functions/wp_playlist_shortcode/

Contributors looking for a good starting place should take a look at the syntax for documenting function arguments.

For a good example of documenting shortcode attributes, see the phpDoc for wp_audio_shortcode() in trunk.

Attachments (2)

28678.patch (2.2 KB) - added by taylorde 10 years ago.
$attr documentation for wp_playlist_shortcode()
28678.2.patch (2.2 KB) - added by taylorde 10 years ago.

Download all attachments as: .zip

Change History (8)

@taylorde
10 years ago

$attr documentation for wp_playlist_shortcode()

#1 @taylorde
10 years ago

  • Keywords has-patch added; needs-patch removed

Uploaded a first pass at some documentation for $attr parameter of wp_playlist_shortcode().

#2 @DrewAPicture
10 years ago

  • Keywords needs-patch added; has-patch removed

Thanks for the patch. This is a really great start, nice work.

Just a few nits:

  • Looks like a couple of parameters are missing defaults at the end of the description
  • For the $order and $orderby parameters, we should check whether the 'asc'/'desc' values are case sensitive. In most other places in core they're full-caps, for instance.
  • In the $images parameter, the parenthesis example should be inside the period of the first sentence instead of on its own.

#3 @DrewAPicture
10 years ago

  • Owner set to taylorde
  • Status changed from new to assigned

@taylorde
10 years ago

#4 @taylorde
10 years ago

  • Keywords has-patch added; needs-patch removed

@drewapicture Appears that desc/asc gets string_to_uppered eventually, but thanks for the double check, that docs line was, ultimately incorrect. Fixed in the most recent patch.

#5 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 4.0

Hi, 28678.2.patch looks much better. Thanks for the effort!

#6 @DrewAPicture
10 years ago

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

In 28901:

Add documentation for the default playlist shortcode attributes in wp_playlist_shortcode().

Props taylorde.
Fixes #28678.

Note: See TracTickets for help on using tickets.