Make WordPress Core


Ignore:
Timestamp:
02/01/2023 03:00:19 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for block pattern properties.

Includes:

  • Adding the templateTypes property to the WP_Block_Patterns_Registry::register() DocBlock.
  • Adding @since notes for the postTypes and templateTypes properties to:
    • _register_theme_block_patterns()
    • WP_Block_Patterns_Registry::register()
  • Bringing some consistency to the order of properties between:
    • _register_theme_block_patterns()
    • WP_Block_Patterns_Registry::register()
    • WP_REST_Block_Patterns_Controller::prepare_item_for_response()
    • WP_REST_Block_Patterns_Controller::get_item_schema()

Follow-up to [52943], [53152], [54263], [55168].

See #56792.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-patterns.php

    r55168 r55173  
    299299 *   - Description
    300300 *   - Viewport Width
     301 *   - Inserter         (yes/no)
    301302 *   - Categories       (comma-separated values)
    302303 *   - Keywords         (comma-separated values)
     
    304305 *   - Post Types       (comma-separated values)
    305306 *   - Template Types   (comma-separated values)
    306  *   - Inserter         (yes/no)
    307307 *
    308308 * @since 6.0.0
     309 * @since 6.1.0 The `postTypes` property was added.
     310 * @since 6.2.0 The `templateTypes` property was added.
    309311 * @access private
    310312 */
     
    315317        'description'   => 'Description',
    316318        'viewportWidth' => 'Viewport Width',
     319        'inserter'      => 'Inserter',
    317320        'categories'    => 'Categories',
    318321        'keywords'      => 'Keywords',
    319322        'blockTypes'    => 'Block Types',
    320323        'postTypes'     => 'Post Types',
    321         'inserter'      => 'Inserter',
    322324        'templateTypes' => 'Template Types',
    323325    );
Note: See TracChangeset for help on using the changeset viewer.