Commit Graph

3 Commits

Author SHA1 Message Date
Sergey Biryukov
09cc873d3a 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.
Built from https://develop.svn.wordpress.org/trunk@55304


git-svn-id: http://core.svn.wordpress.org/trunk@54837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-10 10:59:25 +00:00
Andrew Ozz
7bc792bb73 Fix couple of typos in inline docs.
Props: ironprogrammer.
See #57575.
Built from https://develop.svn.wordpress.org/trunk@55206


git-svn-id: http://core.svn.wordpress.org/trunk@54739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 02:14:19 +00:00
Andrew Ozz
be73904dc7 Introduce HTML API with HTML Tag Processor
This commit pulls in the HTML Tag Processor from the Gutenbeg repository.

The Tag Processor attempts to be an HTML5-spec-compliant parser that provides the ability in PHP to find specific HTML tags and then add, remove, or update attributes on that tag. It provides a safe and reliable way to modify the attribute on HTML tags.

More information: https://github.com/WordPress/wordpress-develop/pull/3920.

Props: antonvlasenko, bernhard-reiter, costdev, dmsnell, felixarntz, gziolo, hellofromtonya, zieladam, flixos90, ntsekouras, peterwilsoncc, swissspidy, andrewserong, onemaggie, get_dave, aristath, scruffian, justlevine, andraganescu, noisysocks, dlh, soean, cbirdsong, revgeorge, azaozz.
Fixes #57575.
Built from https://develop.svn.wordpress.org/trunk@55203


git-svn-id: http://core.svn.wordpress.org/trunk@54736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 01:05:17 +00:00