Docs: Add documentation for the template_lock argument to register_post_type().

Add a `@since` entry for `template` and `template_lock` arguments.

Follow-up to [49041], [49492], [49494].

See #46261.
Built from https://develop.svn.wordpress.org/trunk@49495


git-svn-id: http://core.svn.wordpress.org/trunk@49254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-11-04 02:32:08 +00:00
parent ec60115f2a
commit 096323d8a5
2 changed files with 107 additions and 98 deletions

View File

@ -1295,7 +1295,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
* @since 4.7.0 Introduced `show_in_rest`, `rest_base` and `rest_controller_class`
* arguments to register the post type in REST API.
* @since 5.3.0 The `supports` argument will now accept an array of arguments for a feature.
* .
* @since 5.6.0 The `template` and `template_lock` arguments were added.
*
* @global array $wp_post_types List of post types.
*
* @param string $post_type Post type key. Must not exceed 20 characters and may
@ -1401,15 +1402,23 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
* ?{query_var}={post_slug}. If specified as a string, the query
* ?{query_var_string}={post_slug} will be valid.
* @type bool $can_export Whether to allow this post type to be exported. Default true.
* @type bool $delete_with_user Whether to delete posts of this type when deleting a user. If true,
* posts of this type belonging to the user will be moved to Trash
* when then user is deleted. If false, posts of this type belonging
* to the user will *not* be trashed or deleted. If not set (the default),
* posts are trashed if post_type_supports('author'). Otherwise posts
* are not trashed or deleted. Default null.
* @type bool $delete_with_user Whether to delete posts of this type when deleting a user.
* - If true, posts of this type belonging to the user will be moved
* to Trash when the user is deleted.
* - If false, posts of this type belonging to the user will *not*
* be trashed or deleted.
* - If not set (the default), posts are trashed if post type supports
* the 'author' feature. Otherwise posts are not trashed or deleted.
* Default null.
* @type array $template Array of blocks to use as the default initial state for an editor
* session. Each item should be an array containing block name and
* optional attributes.
* 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

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-beta3-49494';
$wp_version = '5.6-beta3-49495';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.