mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 03:34:33 +00:00
Docs: Corrections and improvements to docblocks for global styles, global settings, theme.json parsing, and shortcodes.
See #57840 git-svn-id: https://develop.svn.wordpress.org/trunk@55711 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -974,14 +974,15 @@ class WP_Theme_JSON {
|
||||
* @since 5.8.0
|
||||
* @since 5.9.0 Removed the `$type` parameter`, added the `$types` and `$origins` parameters.
|
||||
*
|
||||
* @param array $types Types of styles to load. Will load all by default. It accepts:
|
||||
* - `variables`: only the CSS Custom Properties for presets & custom ones.
|
||||
* - `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.
|
||||
* @param array $options An array of options for now used for internal purposes only (may change without notice).
|
||||
* The options currently supported are 'scope' that makes sure all style are scoped to a given selector,
|
||||
* and root_selector which overwrites and forces a given selector to be used on the root node.
|
||||
* @param string[] $types Types of styles to load. Will load all by default. It accepts:
|
||||
* - `variables`: only the CSS Custom Properties for presets & custom ones.
|
||||
* - `styles`: only the styles section in theme.json.
|
||||
* - `presets`: only the classes for the presets.
|
||||
* @param string[] $origins A list of origins to include. By default it includes VALID_ORIGINS.
|
||||
* @param array $options An array of options for now used for internal purposes only (may change without notice).
|
||||
* The options currently supported are 'scope' that makes sure all style are scoped to a
|
||||
* given selector, and root_selector which overwrites and forces a given selector to be
|
||||
* used on the root node.
|
||||
* @return string The resulting stylesheet.
|
||||
*/
|
||||
public function get_stylesheet( $types = array( 'variables', 'styles', 'presets' ), $origins = null, $options = array() ) {
|
||||
@@ -1096,7 +1097,7 @@ class WP_Theme_JSON {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the global styles custom css.
|
||||
* Returns the global styles custom CSS.
|
||||
*
|
||||
* @since 6.2.0
|
||||
*
|
||||
@@ -1410,8 +1411,8 @@ class WP_Theme_JSON {
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param array $setting_nodes Nodes with settings.
|
||||
* @param array $origins List of origins to process presets from.
|
||||
* @param array $setting_nodes Nodes with settings.
|
||||
* @param string[] $origins List of origins to process presets from.
|
||||
* @return string The new stylesheet.
|
||||
*/
|
||||
protected function get_preset_classes( $setting_nodes, $origins ) {
|
||||
@@ -1447,8 +1448,8 @@ class WP_Theme_JSON {
|
||||
* @since 5.8.0
|
||||
* @since 5.9.0 Added the `$origins` parameter.
|
||||
*
|
||||
* @param array $nodes Nodes with settings.
|
||||
* @param array $origins List of origins to process.
|
||||
* @param array $nodes Nodes with settings.
|
||||
* @param string[] $origins List of origins to process.
|
||||
* @return string The new stylesheet.
|
||||
*/
|
||||
protected function get_css_variables( $nodes, $origins ) {
|
||||
@@ -1505,9 +1506,9 @@ class WP_Theme_JSON {
|
||||
* @since 5.8.0
|
||||
* @since 5.9.0 Added the `$origins` parameter.
|
||||
*
|
||||
* @param array $settings Settings to process.
|
||||
* @param string $selector Selector wrapping the classes.
|
||||
* @param array $origins List of origins to process.
|
||||
* @param array $settings Settings to process.
|
||||
* @param string $selector Selector wrapping the classes.
|
||||
* @param string[] $origins List of origins to process.
|
||||
* @return string The result of processing the presets.
|
||||
*/
|
||||
protected static function compute_preset_classes( $settings, $selector, $origins ) {
|
||||
@@ -1611,9 +1612,9 @@ class WP_Theme_JSON {
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param array $settings Settings to process.
|
||||
* @param array $preset_metadata One of the PRESETS_METADATA values.
|
||||
* @param array $origins List of origins to process.
|
||||
* @param array $settings Settings to process.
|
||||
* @param array $preset_metadata One of the PRESETS_METADATA values.
|
||||
* @param string[] $origins List of origins to process.
|
||||
* @return array Array of presets where each key is a slug and each value is the preset value.
|
||||
*/
|
||||
protected static function get_settings_values_by_slug( $settings, $preset_metadata, $origins ) {
|
||||
@@ -1653,9 +1654,9 @@ class WP_Theme_JSON {
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param array $settings Settings to process.
|
||||
* @param array $preset_metadata One of the PRESETS_METADATA values.
|
||||
* @param array $origins List of origins to process.
|
||||
* @param array $settings Settings to process.
|
||||
* @param array $preset_metadata One of the PRESETS_METADATA values.
|
||||
* @param string[] $origins List of origins to process.
|
||||
* @return array Array of presets where the key and value are both the slug.
|
||||
*/
|
||||
protected static function get_settings_slugs( $settings, $preset_metadata, $origins = null ) {
|
||||
@@ -1706,8 +1707,8 @@ class WP_Theme_JSON {
|
||||
* @since 5.8.0
|
||||
* @since 5.9.0 Added the `$origins` parameter.
|
||||
*
|
||||
* @param array $settings Settings to process.
|
||||
* @param array $origins List of origins to process.
|
||||
* @param array $settings Settings to process.
|
||||
* @param string[] $origins List of origins to process.
|
||||
* @return array The modified $declarations.
|
||||
*/
|
||||
protected static function compute_preset_vars( $settings, $origins ) {
|
||||
|
||||
Reference in New Issue
Block a user