Make WordPress Core

Changeset 58247


Ignore:
Timestamp:
05/30/2024 08:52:33 AM (21 months ago)
Author:
swissspidy
Message:

Editor: Improve types in docblock after [58246].

Makes it clearer that an array of strings is expected.

See #61274.

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

Legend:

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

    r58246 r58247  
    19031903 *
    19041904 * @since 5.3.0
    1905  * @since 6.6.0 Updated types as registry now allows registering styles for multiple block types at once.
     1905 * @since 6.6.0 Added support for registering styles for multiple block types.
    19061906 *
    19071907 * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/
    19081908 *
    1909  * @param string|array $block_name       Block type name including namespace or array of namespaced block type names.
    1910  * @param array        $style_properties Array containing the properties of the style name, label,
    1911  *                                       style_handle (name of the stylesheet to be enqueued),
    1912  *                                       inline_style (string containing the CSS to be added),
    1913  *                                       style_data (theme.json-like array to generate CSS from).
    1914  *                                       See WP_Block_Styles_Registry::register().
     1909 * @param string|string[] $block_name       Block type name including namespace or array of namespaced block type names.
     1910 * @param array           $style_properties Array containing the properties of the style name, label,
     1911 *                                          style_handle (name of the stylesheet to be enqueued),
     1912 *                                          inline_style (string containing the CSS to be added),
     1913 *                                          style_data (theme.json-like array to generate CSS from).
     1914 *                                          See WP_Block_Styles_Registry::register().
    19151915 * @return bool True if the block style was registered with success and false otherwise.
    19161916 */
  • trunk/src/wp-includes/class-wp-block-styles-registry.php

    r58246 r58247  
    4747     * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/
    4848     *
    49      * @param string|array $block_name       Block type name including namespace or array of namespaced block type names.
    50      * @param array        $style_properties {
     49     * @param string|string[] $block_name       Block type name including namespace or array of namespaced block type names.
     50     * @param array           $style_properties {
    5151     *     Array containing the properties of the style.
    5252     *
Note: See TracChangeset for help on using the changeset viewer.