Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#25661 closed defect (bug) (fixed)

Inline Docs: Document shortcode attribute arrays

Reported by: johnbillion Owned by: DrewAPicture
Priority: normal Milestone: 3.9
Component: Shortcodes Version:
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

The various shortcodes in core accept numerous attributes, but these aren't documented in the inline docs for the callback functions. Upcoming patch fixes that.

Attachments (2)

25661.diff (10.6 KB ) - added by johnbillion 13 years ago.
25661.2.diff (10.5 KB ) - added by DrewAPicture 13 years ago.
Second pass + standards tweaks

Download all attachments as: .zip

Change History (14)

@johnbillion
13 years ago

#1 @johnbillion
13 years ago

  • Keywords has-patch added

Patch.

#2 @johnbillion
13 years ago

For those interested, my colleague Scott has written a plugin which adds autosuggest functionality for shortcodes. We're hoping to add support for the shortcode attributes too by reading the docblock, hence this patch.

#3 follow-up: @SergeyBiryukov
13 years ago

$output = '' and $html = '' should probably be moved above the docblocks.

#4 in reply to: ↑ 3 @DrewAPicture
13 years ago

Replying to SergeyBiryukov:

$output = '' and $html = '' should probably be moved above the docblocks.

Actually, a couple of weeks ago we opted to take the approach of leaving the original value in the hook call and referencing a nonexistent variable in the phpdoc. So rather than creating a one-time variable, we'd just continue to pass '' and reference $html in the doc block.

#5 @DrewAPicture
13 years ago

  • Summary Inline Docs: Array notation documentation for shortcode attributesInline Docs: Document shortcode attribute arrays

#6 @scottsweb
13 years ago

  • Cc scottsweb added

#7 @jdgrimes
13 years ago

  • Cc jdg@… added

#8 @kpdesign
13 years ago

  • Owner set to DrewAPicture
  • Status newreviewing

@DrewAPicture
13 years ago

Second pass + standards tweaks

#9 @DrewAPicture
13 years ago

  • Milestone Awaiting Review3.9

I'd like to get this in for 3.9 – I think it would certainly set a good example for documenting shortcodes going forward.25661.2.diff brings a few descriptions and tags up to standard, and tweaks a few other things.

#10 @johnbillion
13 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 26915:

Inline documentation for core shortcode attributes.

Props DrewAPicture, johnbillion.
Fixes #25661.

This ticket was mentioned in IRC in #wordpress-dev by johnbillion. View the logs.


13 years ago

#12 @DrewAPicture
12 years ago

  • Component Inline DocsShortcodes
  • Focuses docs added
Note: See TracTickets for help on using tickets.