Skip to content

Commit

Permalink
New styles (works in WordPress 5.8)
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 17, 2022
1 parent cf100a2 commit 3e935bd
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions lib/compat/wordpress-6.0/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,46 @@ class WP_Theme_JSON_Gutenberg extends WP_Theme_JSON_5_9 {
),
);

/**
* The valid properties under the styles key.
*
* @var array
*/
const VALID_STYLES = array(
'border' => array(
'color' => null,
'radius' => null,
'style' => null,
'width' => null,
),
'color' => array(
'background' => null,
'gradient' => null,
'text' => null,
),
'filter' => array(
'duotone' => null,
),
'layout' => array(
'position' => null,
),
'spacing' => array(
'margin' => null,
'padding' => null,
'blockGap' => 'top',
),
'typography' => array(
'fontFamily' => null,
'fontSize' => null,
'fontStyle' => null,
'fontWeight' => null,
'letterSpacing' => null,
'lineHeight' => null,
'textDecoration' => null,
'textTransform' => null,
),
);

/**
* Returns the current theme's wanted patterns(slugs) to be
* registered from Pattern Directory.
Expand Down

0 comments on commit 3e935bd

Please sign in to comment.