[wp-trac] [WordPress Trac] #34522: Incorrect docblock for embed_defaults filter

WordPress Trac noreply at wordpress.org
Sat Oct 31 13:33:22 UTC 2015


#34522: Incorrect docblock for embed_defaults filter
----------------------------------------+------------------------------
 Reporter:  swissspidy                  |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Embeds                      |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  docs
----------------------------------------+------------------------------
Description changed by swissspidy:

Old description:

> The `embed_defaults` filter passes width and height in an array (using
> `compact`), and the url as a second param. The docblock lists three
> params though.
>
> It should be made clear that an array is passed to the filter callback.
> See the [https://make.wordpress.org/core/handbook/best-practices/inline-
> documentation-standards/php/#1-1-parameters-that-are-arrays Parameters
> That Are Arrays] section of the inline documentation standards.

New description:

 The `embed_defaults` filter passes width and height in an array (using
 `compact`), and the url as a second param. The docblock lists three params
 though.

 It should be made clear that only two paerams are passed to the filter
 callback.

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34522#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list