Make WordPress Core

Changeset 61546


Ignore:
Timestamp:
01/28/2026 08:54:36 PM (2 months ago)
Author:
johnbillion
Message:

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

Props ocean90, mukesh27, johnbillion

See #64224

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r61463 r61546  
    304304     * - If set to 'insert', the user is able to move existing blocks but is unable to insert
    305305     *   new blocks and delete blocks.
     306     * - If set to 'contentOnly', the user is only able to edit the content of existing blocks.
    306307     *
    307308     * Default false.
  • trunk/src/wp-includes/post.php

    r61470 r61546  
    18001800 *                                                        optional attributes. Default empty array.
    18011801 *     @type string|false $template_lock                  Whether the block template should be locked if $template is set.
    1802  *                                                        * If set to 'all', the user is unable to insert new blocks,
    1803  *                                                          move existing blocks and delete blocks.
    1804  *                                                       * If set to 'insert', the user is able to move existing blocks
    1805  *                                                         but is unable to insert new blocks and delete blocks.
    1806  *                                                         Default false.
    1807  *     @type bool         $_builtin                     FOR INTERNAL USE ONLY! True if this post type is a native or
    1808  *                                                      "built-in" post_type. Default false.
    1809  *     @type string       $_edit_link                   FOR INTERNAL USE ONLY! URL segment to use for edit link of
    1810  *                                                      this post type. Default 'post.php?post=%d'.
     1802 *                                                          * If set to 'all', the user is unable to insert new blocks,
     1803 *                                                            move existing blocks and delete blocks.
     1804 *                                                          * If set to 'insert', the user is able to move existing blocks
     1805 *                                                            but is unable to insert new blocks and delete blocks.
     1806 *                                                          * If set to 'contentOnly', the user is only able to edit the content
     1807 *                                                            of existing blocks.
     1808 *                                                        Default false.
     1809 *     @type bool         $_builtin                       FOR INTERNAL USE ONLY! True if this post type is a native or
     1810 *                                                        "built-in" post_type. Default false.
     1811 *     @type string       $_edit_link                     FOR INTERNAL USE ONLY! URL segment to use for edit link of
     1812 *                                                        this post type. Default 'post.php?post=%d'.
    18111813 * }
    18121814 * @return WP_Post_Type|WP_Error The registered post type object on success,
Note: See TracChangeset for help on using the changeset viewer.