WordPress build repository browser

Changeset 63649


Ignore:
Timestamp:
10/19/2026 10:57:48 AM (4 days ago)
Author:
fabiankaegy
Message:

Editor: Add author support to the wp_block post type.

The REST API now returns each pattern's author, so the block inserter and the Site Editor's Patterns screen can filter patterns by author. Patterns already store post_author and their capabilities already check it.

Sets delete_with_user to false, so deleting a user keeps their patterns, as they may be used across the site.

Also renames the Site Editor's "My patterns" view to "Site patterns", since it lists every user-created pattern, not only the current user's.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/14269.
Synced from ​https://github.com/WordPress/gutenberg/pull/84680.

Props fabiankaegy, wildworks, talldanwp, jameskoster, mamaduka, fcoveram.
Fixes #66307.

Built from ​https://develop.svn.wordpress.org/trunk@64499

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r63552 r63649  
    359359                                'revisions',
    360360                                'custom-fields',
     361                                'author',
    361362                        ),
     363                        // Keep patterns when their author is deleted, as they may be used across the site.
     364                        'delete_with_user'      => false,
    362365                )
    363366        );
  • trunk/wp-includes/version.php

    r63648 r63649  
    1717 * @global string $wp_version
    1818 */
    19 $wp_version = '7.2-alpha-64498';
     19$wp_version = '7.2-alpha-64499';
    2020
    2121/**
  • trunk/wp-includes/view-config.php

    r62754 r63649  
    370370                ),
    371371                array(
    372                         'title' => __( 'My patterns' ),
     372                        'title' => __( 'Site patterns' ),
    373373                        'slug'  => 'my-patterns',
    374374                ),
Note: See TracChangeset for help on using the changeset viewer.