Docs: Document the contentOnly value for the $template_lock argument when registering a post type.

Props ocean90, mukesh27, johnbillion

See #64224

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


git-svn-id: http://core.svn.wordpress.org/trunk@60857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn
2026-01-28 20:55:41 +00:00
parent b717c517d4
commit 10d5642aa3
3 changed files with 13 additions and 10 deletions

View File

@@ -303,6 +303,7 @@ final class WP_Post_Type {
* and delete blocks.
* - If set to 'insert', the user is able to move existing blocks but is unable to insert
* new blocks and delete blocks.
* - If set to 'contentOnly', the user is only able to edit the content of existing blocks.
*
* Default false.
*

View File

@@ -1799,15 +1799,17 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
* session. Each item should be an array containing block name and
* optional attributes. Default empty array.
* @type string|false $template_lock Whether the block template should be locked if $template is set.
* * If set to 'all', the user is unable to insert new blocks,
* move existing blocks and delete blocks.
* * If set to 'insert', the user is able to move existing blocks
* but is unable to insert new blocks and delete blocks.
* Default false.
* @type bool $_builtin FOR INTERNAL USE ONLY! True if this post type is a native or
* "built-in" post_type. Default false.
* @type string $_edit_link FOR INTERNAL USE ONLY! URL segment to use for edit link of
* this post type. Default 'post.php?post=%d'.
* * If set to 'all', the user is unable to insert new blocks,
* move existing blocks and delete blocks.
* * If set to 'insert', the user is able to move existing blocks
* but is unable to insert new blocks and delete blocks.
* * If set to 'contentOnly', the user is only able to edit the content
* of existing blocks.
* Default false.
* @type bool $_builtin FOR INTERNAL USE ONLY! True if this post type is a native or
* "built-in" post_type. Default false.
* @type string $_edit_link FOR INTERNAL USE ONLY! URL segment to use for edit link of
* this post type. Default 'post.php?post=%d'.
* }
* @return WP_Post_Type|WP_Error The registered post type object on success,
* WP_Error object on failure.

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-alpha-61545';
$wp_version = '7.0-alpha-61546';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.