Docs: Adjust documentation for some WP_Post_Type properties:

* Split the summary for `$template` per the documentation standards. The summary should be a single sentence.
* Change the type for `$template_lock` to `string|false`, to clarify that `true` is not supported.
* Fix typo in `$delete_with_user` description, adjust for better readability.

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

See #46261.

git-svn-id: https://develop.svn.wordpress.org/trunk@49494 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-11-04 02:28:55 +00:00
parent aed826aab1
commit 4d30852307

View File

@@ -250,10 +250,12 @@ final class WP_Post_Type {
/**
* 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.
* - 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.
*
* @since 4.6.0
* @var bool $delete_with_user
@@ -261,9 +263,9 @@ final class WP_Post_Type {
public $delete_with_user = null;
/**
* 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.
* 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.
*
* Default empty array.
*
@@ -277,17 +279,17 @@ final class WP_Post_Type {
/**
* 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.
* - 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.
*
* @link https://developer.wordpress.org/block-editor/developers/block-api/block-templates/
*
* @since 5.6.0
* @var string|bool $template_lock
* @var string|false $template_lock
*/
public $template_lock = false;