Make WordPress Core

Changeset 47907


Ignore:
Timestamp:
06/04/2020 06:05:37 AM (4 years ago)
Author:
gziolo
Message:

Blocks: Update default value for some fields in WP_Block_Type

Related to the issue with default values for the blocks registered on the server. By using null for some fields we can treat them as undefined on the client.

See: WordPress/gutenberg#22849.
Props aduth.
Fixes #48529.

File:
1 edited

Legend:

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

    r47876 r47907  
    3333    /**
    3434     * @since 5.5.0
    35      * @var string
    36      */
    37     public $category = '';
     35     * @var string|null
     36     */
     37    public $category = null;
    3838
    3939    /**
     
    4545    /**
    4646     * @since 5.5.0
    47      * @var string
    48      */
    49     public $icon = '';
     47     * @var string|null
     48     */
     49    public $icon = null;
    5050
    5151    /**
     
    105105     *
    106106     * @since 5.0.0
    107      * @var string
    108      */
    109     public $editor_script = '';
     107     * @var string|null
     108     */
     109    public $editor_script = null;
    110110
    111111    /**
     
    113113     *
    114114     * @since 5.0.0
    115      * @var string
    116      */
    117     public $script = '';
     115     * @var string|null
     116     */
     117    public $script = null;
    118118
    119119    /**
     
    121121     *
    122122     * @since 5.0.0
    123      * @var string
    124      */
    125     public $editor_style = '';
     123     * @var string|null
     124     */
     125    public $editor_style = null;
    126126
    127127    /**
     
    131131     * @var string
    132132     */
    133     public $style = '';
     133    public $style = null;
    134134
    135135    /**
Note: See TracChangeset for help on using the changeset viewer.