mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Docs: Update code examples formatting in WP_HTML_Tag_Processor documentation.
Per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#description documentation standards], code samples should be created by indenting every line of the code by 4 spaces, with a blank line before and after. This matches the format used by the rest of core. Follow-up to [55203], [55304], [55718], [55724]. Props juanmaguitar, coffee2code, azaozz, costdev, dmsnell, johnbillion, SergeyBiryukov. Fixes #58028. git-svn-id: https://develop.svn.wordpress.org/trunk@55727 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -66,15 +66,13 @@ class WP_Theme_JSON {
|
||||
*
|
||||
* They are a unkeyed array of values such as:
|
||||
*
|
||||
* ```php
|
||||
* array(
|
||||
* array(
|
||||
* 'slug' => 'unique-name-within-the-set',
|
||||
* 'name' => 'Name for the UI',
|
||||
* <value_key> => 'value'
|
||||
* ),
|
||||
* )
|
||||
* ```
|
||||
* array(
|
||||
* array(
|
||||
* 'slug' => 'unique-name-within-the-set',
|
||||
* 'name' => 'Name for the UI',
|
||||
* <value_key> => 'value'
|
||||
* ),
|
||||
* )
|
||||
*
|
||||
* This contains the necessary metadata to process them:
|
||||
*
|
||||
@@ -2532,19 +2530,17 @@ class WP_Theme_JSON {
|
||||
/**
|
||||
* For metadata values that can either be booleans or paths to booleans, gets the value.
|
||||
*
|
||||
* ```php
|
||||
* $data = array(
|
||||
* 'color' => array(
|
||||
* 'defaultPalette' => true
|
||||
* )
|
||||
* );
|
||||
* $data = array(
|
||||
* 'color' => array(
|
||||
* 'defaultPalette' => true
|
||||
* )
|
||||
* );
|
||||
*
|
||||
* static::get_metadata_boolean( $data, false );
|
||||
* // => false
|
||||
* static::get_metadata_boolean( $data, false );
|
||||
* // => false
|
||||
*
|
||||
* static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
|
||||
* // => true
|
||||
* ```
|
||||
* static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
|
||||
* // => true
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user