Skip to content

Commit

Permalink
Merge pull request #10 from WordPress/master
Browse files Browse the repository at this point in the history
Update master branch from original repo
  • Loading branch information
fluiddot authored Jan 4, 2021
2 parents 8458b75 + e892c21 commit 77abb11
Show file tree
Hide file tree
Showing 131 changed files with 5,923 additions and 7,096 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ packages/block-serialization-spec-parser/parser.js
packages/e2e-tests/plugins
packages/react-native-editor/bundle
vendor
wordpress
!.*.js
12 changes: 4 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module.exports = {
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:eslint-comments/recommended',
],
plugins: [ 'import' ],
globals: {
wp: 'off',
},
Expand All @@ -54,6 +53,7 @@ module.exports = {
allowedTextDomain: 'default',
},
],
'@wordpress/no-unsafe-wp-apis': 'off',
'no-restricted-syntax': [
'error',
// NOTE: We can't include the forward slash in our regex or
Expand Down Expand Up @@ -124,14 +124,10 @@ module.exports = {
},
overrides: [
{
files: [ 'packages/**/*.js' ],
excludedFiles: [
'**/*.@(android|ios|native).js',
...developmentFiles,
],
files: [ '**/*.@(android|ios|native).js', ...developmentFiles ],
rules: {
'import/no-extraneous-dependencies': 'error',
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
},
},
{
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ gutenberg.zip
*.log
phpcs.xml
yarn.lock
/wordpress
/artifacts

.cache
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "stylelint-config-wordpress",
"extends": "@wordpress/stylelint-config",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": null,
Expand Down
22 changes: 11 additions & 11 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### WordPress - Web publishing software

Copyright 2011-2020 by the contributors
Copyright 2011-2021 by the contributors

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,14 +34,14 @@ and
Copyright 2003-2010 by the contributors

WordPress is released under the GPL

---

### GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

Everyone is permitted to copy and distribute verbatim copies
Expand Down Expand Up @@ -135,17 +135,17 @@ portion of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:


**a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.


**b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.


**c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
Expand Down Expand Up @@ -182,20 +182,20 @@ the scope of this License.
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:


**a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,


**b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the
terms of Sections 1 and 2 above on a medium customarily used for
software interchange; or,


**c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the
Expand Down Expand Up @@ -370,7 +370,7 @@ when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
to redistribute it under certain conditions; type `show c'
for details.

The hypothetical commands \`show w' and \`show c' should show the
Expand All @@ -385,7 +385,7 @@ if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
(which makes passes at compilers) written
by James Hacker.

signature of Ty Coon, 1 April 1989
Expand Down
8 changes: 8 additions & 0 deletions docs/designers-developers/developers/themes/theme-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ Every context has the same structure, divided in two sections: `settings` and `s
{
"some/context": {
"settings": {
"border": [ ... ],
"color": [ ... ],
"custom": [ ... ],
"spacing": [ ... ],
"typography": [ ... ]
},
"styles": {
"border": { ... },
"color": { ... },
"typography": { ... }
}
Expand All @@ -79,6 +81,9 @@ The settings section has the following structure and default values:
{
"some/context": {
"settings": {
"border": {
"customRadius": false /* true to opt-in */
},
"color": {
"custom": true, /* false to opt-out, as in add_theme_support('disable-custom-colors') */
"customGradient": true, /* false to opt-out, as in add_theme_support('disable-custom-gradients') */
Expand Down Expand Up @@ -241,6 +246,9 @@ Each block declares which style properties it exposes. This has been coined as "
{
"some/context": {
"styles": {
"border": {
"radius": "value"
},
"color": {
"background": "value",
"gradient": "value",
Expand Down
6 changes: 5 additions & 1 deletion lib/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class WP_Theme_JSON {
*/
const SCHEMA = array(
'styles' => array(
'border' => array(
'radius' => null,
),
'color' => array(
'background' => null,
'gradient' => null,
Expand Down Expand Up @@ -246,7 +249,7 @@ class WP_Theme_JSON {
),
'borderRadius' => array(
'value' => array( 'border', 'radius' ),
'support' => array( '__experimentalBorder' ),
'support' => array( '__experimentalBorder', 'radius' ),
),
'color' => array(
'value' => array( 'color', 'text' ),
Expand Down Expand Up @@ -314,6 +317,7 @@ public function __construct( $contexts = array(), $should_escape_styles = false
// Process styles subtree.
$this->process_key( 'styles', $context, self::SCHEMA );
if ( isset( $context['styles'] ) ) {
$this->process_key( 'border', $context['styles'], self::SCHEMA['styles'], $should_escape_styles );
$this->process_key( 'color', $context['styles'], self::SCHEMA['styles'], $should_escape_styles );
$this->process_key( 'spacing', $context['styles'], self::SCHEMA['styles'], $should_escape_styles );
$this->process_key( 'typography', $context['styles'], self::SCHEMA['styles'], $should_escape_styles );
Expand Down
2 changes: 1 addition & 1 deletion lib/experimental-default-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"units": [ "px", "em", "rem", "vh", "vw" ]
},
"border": {
"customRadius": true
"customRadius": false
}
}
}
Expand Down
1 change: 0 additions & 1 deletion lib/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function gutenberg_experimental_set( &$array, $path, $value = null ) {
}
}

$i;
for ( $i = 0; $i < $path_length - 1; ++$i ) {
$path_element = $path[ $i ];
if (
Expand Down
Loading

0 comments on commit 77abb11

Please sign in to comment.