Make WordPress Core


Ignore:
Timestamp:
06/26/2021 11:12:52 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document api_version and variations properties in WP_Block_Type::__construct().

Add @since tags for all properties added in WordPress 5.5, 5.6, and 5.8.

Follow-up to [47875], [48117], [49224], [50297], [50419], [50527].

Props mbabker.
Fixes #53518.

File:
1 edited

Legend:

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

    r50529 r51244  
    194194     *
    195195     * @since 5.0.0
     196     * @since 5.5.0 Added the `title`, `category`, `parent`, `icon`, `description`,
     197     *              `keywords`, `textdomain`, `styles`, `supports`, `example`,
     198     *              `uses_context`, and `provides_context` properties.
     199     * @since 5.6.0 Added the `api_version` property.
     200     * @since 5.8.0 Added the `variations` property.
    196201     *
    197202     * @see register_block_type()
     
    202207     *     however the ones described below are supported by default. Default empty array.
    203208     *
    204      *
     209     *     @type string        $api_version      Block API version.
    205210     *     @type string        $title            Human-readable block type label.
    206211     *     @type string|null   $category         Block type category classification, used in
     
    214219     *     @type string|null   $textdomain       The translation textdomain.
    215220     *     @type array         $styles           Alternative block styles.
     221     *     @type array         $variations       Block variations.
    216222     *     @type array|null    $supports         Supported features.
    217223     *     @type array|null    $example          Structured data for the block preview.
Note: See TracChangeset for help on using the changeset viewer.