Changeset 56030
- Timestamp:
- 06/26/2023 08:55:31 AM (18 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-editor.php
r55955 r56030 12 12 * 13 13 * @since 5.8.0 14 * @since 6.3.0 Reusable Blocks renamed to Patterns. 14 15 * 15 16 * @return array[] Array of categories for block types. … … 49 50 array( 50 51 'slug' => 'reusable', 51 'title' => _x( ' Reusable Blocks', 'block category' ),52 'title' => _x( 'Patterns', 'block category' ), 52 53 'icon' => null, 53 54 ), -
trunk/src/wp-includes/default-filters.php
r55852 r56030 721 721 add_action( 'init', 'wp_register_persisted_preferences_meta' ); 722 722 723 // CPT wp_block custom postmeta field. 724 add_action( 'init', 'wp_create_initial_post_meta' ); 725 723 726 unset( $filter, $action ); -
trunk/src/wp-includes/post.php
r55990 r56030 283 283 array( 284 284 'labels' => array( 285 'name' => _x( ' Reusable blocks', 'post type general name' ),286 'singular_name' => _x( ' Reusable block', 'post type singular name' ),287 'add_new' => _x( 'Add New', ' Reusable block' ),288 'add_new_item' => __( 'Add new Reusable block' ),289 'new_item' => __( 'New Reusable block' ),290 'edit_item' => __( 'Edit Reusable block' ),291 'view_item' => __( 'View Reusable block' ),292 'view_items' => __( 'View Reusable blocks' ),293 'all_items' => __( 'All Reusable blocks' ),294 'search_items' => __( 'Search Reusable blocks' ),295 'not_found' => __( 'No reusable blocks found.' ),296 'not_found_in_trash' => __( 'No reusable blocks found in Trash.' ),297 'filter_items_list' => __( 'Filter reusable blocks list' ),298 'items_list_navigation' => __( ' Reusable blocks list navigation' ),299 'items_list' => __( ' Reusable blocks list' ),300 'item_published' => __( ' Reusable blockpublished.' ),301 'item_published_privately' => __( ' Reusable blockpublished privately.' ),302 'item_reverted_to_draft' => __( ' Reusable blockreverted to draft.' ),303 'item_scheduled' => __( ' Reusable blockscheduled.' ),304 'item_updated' => __( ' Reusable blockupdated.' ),285 'name' => _x( 'Patterns', 'post type general name' ), 286 'singular_name' => _x( 'Pattern', 'post type singular name' ), 287 'add_new' => _x( 'Add New', 'Pattern' ), 288 'add_new_item' => __( 'Add new Pattern' ), 289 'new_item' => __( 'New Pattern' ), 290 'edit_item' => __( 'Edit Pattern' ), 291 'view_item' => __( 'View Pattern' ), 292 'view_items' => __( 'View Patterns' ), 293 'all_items' => __( 'All Patterns' ), 294 'search_items' => __( 'Search Patterns' ), 295 'not_found' => __( 'No patterns found.' ), 296 'not_found_in_trash' => __( 'No patterns found in Trash.' ), 297 'filter_items_list' => __( 'Filter patterns list' ), 298 'items_list_navigation' => __( 'Patterns list navigation' ), 299 'items_list' => __( 'Patterns list' ), 300 'item_published' => __( 'Pattern published.' ), 301 'item_published_privately' => __( 'Pattern published privately.' ), 302 'item_reverted_to_draft' => __( 'Pattern reverted to draft.' ), 303 'item_scheduled' => __( 'Pattern scheduled.' ), 304 'item_updated' => __( 'Pattern updated.' ), 305 305 ), 306 306 'public' => false, … … 329 329 'editor', 330 330 'revisions', 331 'custom-fields', 331 332 ), 332 333 ) … … 8019 8020 return apply_filters( 'use_block_editor_for_post_type', true, $post_type ); 8020 8021 } 8022 8023 /** 8024 * Registers any additional post meta fields. 8025 * 8026 * @since 6.3.0 Adds sync_status meta field to the wp_block post type so an unsynced option can be added. 8027 * 8028 * @link https://github.com/WordPress/gutenberg/pull/51144 8029 */ 8030 function wp_create_initial_post_meta() { 8031 register_post_meta( 8032 'wp_block', 8033 'sync_status', 8034 array( 8035 'sanitize_callback' => 'sanitize_text_field', 8036 'single' => true, 8037 'type' => 'string', 8038 'show_in_rest' => array( 8039 'schema' => array( 8040 'type' => 'string', 8041 'enum' => array( 'partial', 'unsynced' ), 8042 ), 8043 ), 8044 ) 8045 ); 8046 } -
trunk/tests/phpunit/tests/blocks/editor.php
r55955 r56030 240 240 array( 241 241 'slug' => 'reusable', 242 'title' => ' Reusable Blocks',242 'title' => 'Patterns', 243 243 'icon' => null, 244 244 ), -
trunk/tests/qunit/fixtures/wp-api-generated.js
r55294 r56030 4540 4540 "required": false 4541 4541 }, 4542 "meta": { 4543 "description": "Meta fields.", 4544 "type": "object", 4545 "properties": [], 4546 "required": false 4547 }, 4542 4548 "template": { 4543 4549 "description": "The theme file to use to display the post.", … … 4696 4702 "required": false 4697 4703 }, 4704 "meta": { 4705 "description": "Meta fields.", 4706 "type": "object", 4707 "properties": [], 4708 "required": false 4709 }, 4698 4710 "template": { 4699 4711 "description": "The theme file to use to display the post.", … … 5010 5022 } 5011 5023 }, 5024 "required": false 5025 }, 5026 "meta": { 5027 "description": "Meta fields.", 5028 "type": "object", 5029 "properties": [], 5012 5030 "required": false 5013 5031 }, … … 11923 11941 "hierarchical": false, 11924 11942 "has_archive": false, 11925 "name": " Reusable blocks",11943 "name": "Patterns", 11926 11944 "slug": "wp_block", 11927 11945 "icon": null,
Note: See TracChangeset
for help on using the changeset viewer.