Docs: Various docblock fixes in `WP_Theme_JSON` class, as per documentation standards.
Follow-up to [54408]. See #55646. Built from https://develop.svn.wordpress.org/trunk@54411 git-svn-id: http://core.svn.wordpress.org/trunk@53970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
be3c6666d9
commit
cd0a4ee190
|
@ -683,7 +683,7 @@ class WP_Theme_JSON {
|
|||
* @param string $selector Original selector.
|
||||
* @param string $to_append Selector to append.
|
||||
* @param string $position A position sub-selector should be appended. Default 'right'.
|
||||
* @return string
|
||||
* @return string The new selector.
|
||||
*/
|
||||
protected static function append_to_selector( $selector, $to_append, $position = 'right' ) {
|
||||
$new_selectors = array();
|
||||
|
@ -799,7 +799,7 @@ class WP_Theme_JSON {
|
|||
*
|
||||
* @param array $tree Input to process.
|
||||
* @param array $schema Schema to adhere to.
|
||||
* @return array Returns the modified $tree.
|
||||
* @return array The modified $tree.
|
||||
*/
|
||||
protected static function remove_keys_not_in_schema( $tree, $schema ) {
|
||||
$tree = array_intersect_key( $tree, $schema );
|
||||
|
@ -865,7 +865,7 @@ class WP_Theme_JSON {
|
|||
* - `styles`: only the styles section in theme.json.
|
||||
* - `presets`: only the classes for the presets.
|
||||
* @param array $origins A list of origins to include. By default it includes VALID_ORIGINS.
|
||||
* @return string Stylesheet.
|
||||
* @return string The resulting stylesheet.
|
||||
*/
|
||||
public function get_stylesheet( $types = array( 'variables', 'styles', 'presets' ), $origins = null ) {
|
||||
if ( null === $origins ) {
|
||||
|
@ -1011,12 +1011,11 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the CSS layout rules for a particular block from theme.json layout definitions.
|
||||
* Gets the CSS layout rules for a particular block from theme.json layout definitions.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @param array $block_metadata Metadata about the block to get styles for.
|
||||
*
|
||||
* @return string Layout styles for the block.
|
||||
*/
|
||||
protected function get_layout_styles( $block_metadata ) {
|
||||
|
@ -1286,7 +1285,7 @@ class WP_Theme_JSON {
|
|||
*
|
||||
* @param string $selector CSS selector.
|
||||
* @param array $declarations List of declarations.
|
||||
* @return string CSS ruleset.
|
||||
* @return string The resulting CSS ruleset.
|
||||
*/
|
||||
protected static function to_ruleset( $selector, $declarations ) {
|
||||
if ( empty( $declarations ) ) {
|
||||
|
@ -1304,7 +1303,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Given a settings array, it returns the generated rulesets
|
||||
* Given a settings array, returns the generated rulesets
|
||||
* for the preset classes.
|
||||
*
|
||||
* @since 5.8.0
|
||||
|
@ -1477,7 +1476,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Transform a slug into a CSS Custom Property.
|
||||
* Transforms a slug into a CSS Custom Property.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
|
@ -1490,7 +1489,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Given the block settings, it extracts the CSS Custom Properties
|
||||
* Given the block settings, extracts the CSS Custom Properties
|
||||
* for the presets and adds them to the $declarations array
|
||||
* following the format:
|
||||
*
|
||||
|
@ -1504,7 +1503,7 @@ class WP_Theme_JSON {
|
|||
*
|
||||
* @param array $settings Settings to process.
|
||||
* @param array $origins List of origins to process.
|
||||
* @return array Returns the modified $declarations.
|
||||
* @return array The modified $declarations.
|
||||
*/
|
||||
protected static function compute_preset_vars( $settings, $origins ) {
|
||||
$declarations = array();
|
||||
|
@ -1522,7 +1521,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Given an array of settings, it extracts the CSS Custom Properties
|
||||
* Given an array of settings, extracts the CSS Custom Properties
|
||||
* for the custom values and adds them to the $declarations
|
||||
* array following the format:
|
||||
*
|
||||
|
@ -1534,7 +1533,7 @@ class WP_Theme_JSON {
|
|||
* @since 5.8.0
|
||||
*
|
||||
* @param array $settings Settings to process.
|
||||
* @return array Returns the modified $declarations.
|
||||
* @return array The modified $declarations.
|
||||
*/
|
||||
protected static function compute_theme_vars( $settings ) {
|
||||
$declarations = array();
|
||||
|
@ -1791,7 +1790,7 @@ class WP_Theme_JSON {
|
|||
*
|
||||
* @param array $theme_json The tree to extract setting nodes from.
|
||||
* @param array $selectors List of selectors per block.
|
||||
* @return array
|
||||
* @return array An array of setting nodes metadata.
|
||||
*/
|
||||
protected static function get_setting_nodes( $theme_json, $selectors = array() ) {
|
||||
$nodes = array();
|
||||
|
@ -1845,7 +1844,7 @@ class WP_Theme_JSON {
|
|||
*
|
||||
* @param array $theme_json The tree to extract style nodes from.
|
||||
* @param array $selectors List of selectors per block.
|
||||
* @return array
|
||||
* @return array An array of style nodes metadata.
|
||||
*/
|
||||
protected static function get_style_nodes( $theme_json, $selectors = array() ) {
|
||||
$nodes = array();
|
||||
|
@ -2231,7 +2230,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Merge new incoming data.
|
||||
* Merges new incoming data.
|
||||
*
|
||||
* @since 5.8.0
|
||||
* @since 5.9.0 Duotone preset also has origins.
|
||||
|
@ -2350,7 +2349,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns whether a presets should be overridden or not.
|
||||
* Determines whether a presets should be overridden or not.
|
||||
*
|
||||
* @since 5.9.0
|
||||
* @deprecated 6.0.0 Use {@see 'get_metadata_boolean'} instead.
|
||||
|
@ -2438,7 +2437,7 @@ class WP_Theme_JSON {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get a `default`'s preset name by a provided slug.
|
||||
* Gets a `default`'s preset name by a provided slug.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-beta3-54410';
|
||||
$wp_version = '6.1-beta3-54411';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue