[wp-trac] [WordPress Trac] #57691: Short array syntax used in WP_HTML_Tag_Processor docs/examples
WordPress Trac
noreply at wordpress.org
Fri Feb 10 10:57:35 UTC 2023
#57691: Short array syntax used in WP_HTML_Tag_Processor docs/examples
--------------------------+-----------------------------
Reporter: aristath | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.2
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: docs
--------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"55304" 55304]:
{{{
#!CommitTicketReference repository="" revision="55304"
Docs: Replace short array syntax in `WP_HTML_Tag_Processor` documentation.
Per [https://developer.wordpress.org/coding-standards/wordpress-coding-
standards/php/#declaring-arrays WordPress PHP Coding Standards]:
> Using long array syntax ( `array( 1, 2, 3 )` ) for declaring arrays is
generally more readable than short array syntax ( `[ 1, 2, 3 ]` ),
particularly for those with vision difficulties. Additionally, it’s much
more descriptive for beginners.
>
> Arrays must be declared using long array syntax.
Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/47958 #47958 Docs: Don't
recommend using short array syntax in WP_HTML_Tag_Processor]
Follow-up to [55203], [55206].
Props aristath, poena.
Fixes #57691.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57691#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list