Skip to content

Commit

Permalink
Merge branch 'trunk' into add/document-outline-main
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Jan 27, 2025
2 parents d90143e + b984ec9 commit 7b1ed82
Show file tree
Hide file tree
Showing 92 changed files with 1,037 additions and 940 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # v1.207.0
- uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 # v1.213.0
with:
# `.ruby-version` file location
working-directory: packages/react-native-editor/ios
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale-issue-gardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Update issues
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: ${{ matrix.message }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ jobs:
VERSION: ${{ github.event.release.name }}

steps:
- name: Install Subversion
run: |
apt-get update -y && apt-get install -y subversion
- name: Check out Gutenberg trunk from WP.org plugin repo
run: |
svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
Expand Down Expand Up @@ -222,6 +226,10 @@ jobs:
VERSION: ${{ github.event.release.name }}

steps:
- name: Install Subversion
run: |
apt-get update -y && apt-get install -y subversion
- name: Download and unzip Gutenberg plugin asset into tags folder
env:
PLUGIN_URL: ${{ github.event.release.assets[0].browser_download_url }}
Expand Down
3 changes: 0 additions & 3 deletions backport-changelog/6.8/7488.md

This file was deleted.

3 changes: 0 additions & 3 deletions backport-changelog/6.8/7498.md

This file was deleted.

1 change: 1 addition & 0 deletions backport-changelog/6.8/8123.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/8123

* https://github.com/WordPress/gutenberg/pull/68549
* https://github.com/WordPress/gutenberg/pull/68745
5 changes: 3 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
== Changelog ==

= 20.1.0-rc.1 =

= 20.1.0 =

## Changelog

Expand Down Expand Up @@ -205,6 +204,8 @@ The following contributors merged PRs in this release:
@afercia @AhmarZaidi @atachibana @benazeer-ben @carolinan @ciampo @dhananjaykuber @ellatrix @geriux @himanipanchal @himanshupathak95 @im3dabasia @Infinite-Null @jeryj @jorgefilipecosta @juanfra @justlevine @karthick-murugan @luisherranz @Mamaduka @manzoorwanijk @mirka @ramonjd @SainathPoojary @shail-mehta @shimotmk @sirreal @stokesman @Sukhendu2002 @szepeviktor @t-hamano @vipul0425 @Vrishabhsk @yogeshbhutkar




= 20.0.0 =

## Changelog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ You can access the Dashboard at: `http://localhost:8888/wp-admin/` using **Usern

#### Accessing the MySQL Database

To access the MySQL database on the `wp-env` instance you will first need the connection details. To do this:
phpMyAdmin is available by default for the Gutenberg project. You can access the MySQL Database at: `http://localhost:9000/`.

If you want to access the database through another tool, you will first need the connection details. To do this:

1. In a terminal, navigate to your local Gutenberg repo.
2. Run `npm run wp-env start` - various information about the `wp-env` environment should be logged into the terminal.
Expand Down
12 changes: 6 additions & 6 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Hide and show additional content. ([Source](https://github.com/WordPress/gutenbe
- **Name:** core/details
- **Category:** text
- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** allowedBlocks, showContent, summary
- **Attributes:** allowedBlocks, name, showContent, summary

## Embed

Expand Down Expand Up @@ -418,7 +418,7 @@ An organized collection of items displayed in a specific order. ([Source](https:
- **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** ordered, placeholder, reversed, start, type, values

## List item
## List Item

An individual item within a list. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/list-item))

Expand Down Expand Up @@ -534,7 +534,7 @@ Start with the basic building block of all narrative. ([Source](https://github.c
- **Supports:** __unstablePasteTextInline, anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~
- **Attributes:** align, content, direction, dropCap, placeholder

## Pattern placeholder
## Pattern Placeholder

Show a block pattern. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/pattern))

Expand Down Expand Up @@ -616,7 +616,7 @@ Displays the contents of a post or page. ([Source](https://github.com/WordPress/

- **Name:** core/post-content
- **Category:** theme
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, link, text), dimensions (minHeight), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~

## Date

Expand Down Expand Up @@ -672,7 +672,7 @@ Post terms. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages
- **Supports:** color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** prefix, separator, suffix, term, textAlign

## Time To Read
## Time to Read

Show minutes required to finish reading the post. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/post-time-to-read))

Expand Down Expand Up @@ -718,7 +718,7 @@ An advanced block that allows displaying post types based on different query par
- **Supports:** align (full, wide), interactivity, layout, ~~html~~
- **Attributes:** enhancedPagination, namespace, query, queryId, tagName

## No results
## No Results

Contains the block elements used to render content when no query results are found. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/query-no-results))

Expand Down
6 changes: 3 additions & 3 deletions docs/reference-guides/slotfills/main-dashboard-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ registerPlugin( 'main-dashboard-button-test', {

### Change the icon and link

This example will change the icon in the header to indicate an external link that will take the user to http://wordpress.org when clicked.
This example will change the icon in the header to indicate an external link that will take the user to https://wordpress.org when clicked.

```js
import { registerPlugin } from '@wordpress/plugins';
Expand All @@ -45,7 +45,7 @@ import { external } from '@wordpress/icons';

const MainDashboardButtonIconTest = () => (
<MainDashboardButton>
<FullscreenModeClose icon={ external } href="http://wordpress.org" />
<FullscreenModeClose icon={ external } href="https://wordpress.org" />
</MainDashboardButton>
);

Expand All @@ -54,4 +54,4 @@ registerPlugin( 'main-dashboard-button-icon-test', {
} );
```

![The edit post screen in fullscreen mode displaying an external link icon instead of the default W](https://developer.wordpress.org/files/2024/08/main-dashboard-button-external-link-example.png 'Change the icon in the header to indicate an external link that will take the user to http://wordpress.org when clicked')
![The edit post screen in fullscreen mode displaying an external link icon instead of the default W](https://developer.wordpress.org/files/2024/08/main-dashboard-button-external-link-example.png 'Change the icon in the header to indicate an external link that will take the user to https://wordpress.org when clicked')
2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.
* Requires at least: 6.6
* Requires PHP: 7.2
* Version: 20.1.0-rc.1
* Version: 20.1.0
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.8/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function gutenberg_update_page_editor_support( $args ) {
if ( false !== $editor_support_key ) {
unset( $args['supports'][ $editor_support_key ] );
$args['supports']['editor'] = array(
'default_mode' => 'template-locked',
'default-mode' => 'template-locked',
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Updates the comment type in the REST API for WordPress version 6.7.
* Updates the comment type in the REST API.
*
* This function is used as a filter callback for the 'rest_pre_insert_comment' hook.
* It checks if the 'comment_type' parameter is set to 'block_comment' in the REST API request,
Expand All @@ -10,7 +10,7 @@
* @param WP_REST_Request $request The REST API request object.
* @return array The updated prepared comment data.
*/
if ( ! function_exists( 'update_comment_type_in_rest_api_6_8' ) && gutenberg_is_experiment_enabled( 'gutenberg-block-comment' ) ) {
if ( ! function_exists( 'update_comment_type_in_rest_api_6_8' ) ) {
function update_comment_type_in_rest_api_6_8( $prepared_comment, $request ) {
if ( ! empty( $request['comment_type'] ) && 'block_comment' === $request['comment_type'] ) {
$prepared_comment['comment_type'] = $request['comment_type'];
Expand All @@ -31,7 +31,7 @@ function update_comment_type_in_rest_api_6_8( $prepared_comment, $request ) {
* @param array $comment_type The array of comment types.
* @return array The updated array of comment types.
*/
if ( ! function_exists( 'update_get_avatar_comment_type' ) && gutenberg_is_experiment_enabled( 'gutenberg-block-comment' ) ) {
if ( ! function_exists( 'update_get_avatar_comment_type' ) ) {
function update_get_avatar_comment_type( $comment_type ) {
$comment_type[] = 'block_comment';
return $comment_type;
Expand All @@ -49,7 +49,7 @@ function update_get_avatar_comment_type( $comment_type ) {
*
* @return void
*/
if ( ! function_exists( 'exclude_block_comments_from_admin' ) && gutenberg_is_experiment_enabled( 'gutenberg-block-comment' ) ) {
if ( ! function_exists( 'exclude_block_comments_from_admin' ) ) {
function exclude_block_comments_from_admin( $query ) {
// Only modify the query if it's for comments
if ( isset( $query->query_vars['type'] ) && '' === $query->query_vars['type'] ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

// Create a new class that extends WP_REST_Comments_Controller
class Gutenberg_REST_Comment_Controller_6_8 extends WP_REST_Comments_Controller {
class Gutenberg_REST_Comment_Controller extends WP_REST_Comments_Controller {

public function create_item_permissions_check( $request ) {
if ( empty( $request['comment_type'] ) || 'comment' === $request['comment_type'] ) {
Expand All @@ -18,7 +18,7 @@ public function create_item_permissions_check( $request ) {
if ( get_option( 'comment_registration' ) ) {
return new WP_Error(
'rest_comment_login_required',
__( 'Sorry, you must be logged in to comment.' ),
__( 'Sorry, you must be logged in to comment.', 'gutenberg' ),
array( 'status' => 401 )
);
}
Expand All @@ -40,7 +40,7 @@ public function create_item_permissions_check( $request ) {
if ( ! $allow_anonymous ) {
return new WP_Error(
'rest_comment_login_required',
__( 'Sorry, you must be logged in to comment.' ),
__( 'Sorry, you must be logged in to comment.', 'gutenberg' ),
array( 'status' => 401 )
);
}
Expand All @@ -51,7 +51,7 @@ public function create_item_permissions_check( $request ) {
return new WP_Error(
'rest_comment_invalid_author',
/* translators: %s: Request parameter. */
sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'author' ),
sprintf( __( "Sorry, you are not allowed to edit '%s' for comments.", 'gutenberg' ), 'author' ),
array( 'status' => rest_authorization_required_code() )
);
}
Expand All @@ -61,7 +61,7 @@ public function create_item_permissions_check( $request ) {
return new WP_Error(
'rest_comment_invalid_author_ip',
/* translators: %s: Request parameter. */
sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'author_ip' ),
sprintf( __( "Sorry, you are not allowed to edit '%s' for comments.", 'gutenberg' ), 'author_ip' ),
array( 'status' => rest_authorization_required_code() )
);
}
Expand All @@ -71,15 +71,15 @@ public function create_item_permissions_check( $request ) {
return new WP_Error(
'rest_comment_invalid_status',
/* translators: %s: Request parameter. */
sprintf( __( "Sorry, you are not allowed to edit '%s' for comments." ), 'status' ),
sprintf( __( "Sorry, you are not allowed to edit '%s' for comments.", 'gutenberg' ), 'status' ),
array( 'status' => rest_authorization_required_code() )
);
}

if ( empty( $request['post'] ) ) {
return new WP_Error(
'rest_comment_invalid_post_id',
__( 'Sorry, you are not allowed to create this comment without a post.' ),
__( 'Sorry, you are not allowed to create this comment without a post.', 'gutenberg' ),
array( 'status' => 403 )
);
}
Expand All @@ -89,23 +89,23 @@ public function create_item_permissions_check( $request ) {
if ( ! $post ) {
return new WP_Error(
'rest_comment_invalid_post_id',
__( 'Sorry, you are not allowed to create this comment without a post.' ),
__( 'Sorry, you are not allowed to create this comment without a post.', 'gutenberg' ),
array( 'status' => 403 )
);
}

if ( 'trash' === $post->post_status ) {
return new WP_Error(
'rest_comment_trash_post',
__( 'Sorry, you are not allowed to create a comment on this post.' ),
__( 'Sorry, you are not allowed to create a comment on this post.', 'gutenberg' ),
array( 'status' => 403 )
);
}

if ( ! $this->check_read_post_permission( $post, $request ) ) {
return new WP_Error(
'rest_cannot_read_post',
__( 'Sorry, you are not allowed to read the post for this comment.' ),
__( 'Sorry, you are not allowed to read the post for this comment.', 'gutenberg' ),
array( 'status' => rest_authorization_required_code() )
);
}
Expand All @@ -117,7 +117,7 @@ public function create_item_permissions_check( $request ) {
add_action(
'rest_api_init',
function () {
$controller = new Gutenberg_REST_Comment_Controller_6_8();
$controller = new Gutenberg_REST_Comment_Controller();
$controller->register_routes();
}
);
8 changes: 6 additions & 2 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/compat/wordpress-6.7/rest-api.php';

// WordPress 6.8 compat.
require __DIR__ . '/compat/wordpress-6.8/block-comments.php';
require __DIR__ . '/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php';
require __DIR__ . '/compat/wordpress-6.8/class-gutenberg-hierarchical-sort.php';
require __DIR__ . '/compat/wordpress-6.8/rest-api.php';

Expand All @@ -54,6 +52,12 @@ function gutenberg_is_experiment_enabled( $name ) {

require_once __DIR__ . '/experimental/rest-api.php';
require_once __DIR__ . '/experimental/kses-allowed-html.php';

// Block Comments.
if ( gutenberg_is_experiment_enabled( 'gutenberg-block-comment' ) ) {
require __DIR__ . '/experimental/block-comments.php';
require __DIR__ . '/experimental/class-gutenberg-rest-comment-controller.php';
}
}

// Experimental signaling server.
Expand Down
9 changes: 7 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "20.1.0-rc.1",
"version": "20.1.0",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
Expand Down
1 change: 0 additions & 1 deletion packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ $z-layers: (
".components-popover__close": 5,
".block-editor-block-list__insertion-point": 6,
".block-editor-warning": 5,
".block-library-gallery-item__inline-menu": 20,
".block-editor-url-input__suggestions": 30,
".edit-post-layout__footer": 30,
".interface-interface-skeleton__header": 30,
Expand Down
Loading

0 comments on commit 7b1ed82

Please sign in to comment.