Make WordPress Core


Ignore:
Timestamp:
04/13/2021 08:02:33 AM (3 years ago)
Author:
gziolo
Message:

Blocks: Add is_default handling to server side block styles registry

Ensures that register_block_style lets developer pass is_default flag to mark one of the block style variations as the default one.

Props mukesh27, xavivars.
Fixes #53006.

File:
1 edited

Legend:

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

    r49120 r50703  
    3737     * @param string $block_name       Block type name including namespace.
    3838     * @param array  $style_properties Array containing the properties of the style name, label,
    39      *                                 style (name of the stylesheet to be enqueued),
     39     *                                 is_default, style_handle (name of the stylesheet to be enqueued),
    4040     *                                 inline_style (string containing the CSS to be added).
    4141     * @return bool True if the block style was registered with success and false otherwise.
Note: See TracChangeset for help on using the changeset viewer.