WordPress/wp-includes/block-supports
Felix Arntz 268203f8aa Editor: Simplify usage of block_has_support() function by supporting a string.
Most block feature checks are for a single feature string, and for such cases it is not intuitive to require an array for the `$feature` parameter of the `block_has_support()` function.

This changeset brings it in line with other functions like `post_type_supports()`, allowing to pass a string for the `$feature`. An array is still supported for more complex cases where support for sub-features needs to be determined. This change furthermore includes a very minor performance tweak by avoiding calls to the `_wp_array_get()` function if a single feature string is being checked for.

Props thekt12, nihar007, mukesh27, swissspidy.
Fixes #58532.

Built from https://develop.svn.wordpress.org/trunk@56382


git-svn-id: http://core.svn.wordpress.org/trunk@55894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-10 16:48:19 +00:00
..
align.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
border.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
colors.php Docs: Use third-person singular verbs for Block Supports related function descriptions, as per docblocks standards. 2022-11-24 22:36:11 +00:00
custom-classname.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
dimensions.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
duotone.php Editor: Lazily load Duotone settings only when needed. 2023-07-13 11:34:28 +00:00
elements.php Editor: add support for block-level link hover colors. 2023-06-26 01:15:21 +00:00
generated-classname.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
layout.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
position.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
settings.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
shadow.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
spacing.php Editor: Simplify usage of block_has_support() function by supporting a string. 2023-08-10 16:48:19 +00:00
typography.php Editor: add text columns to typography support. 2023-06-22 08:18:19 +00:00
utils.php Editor: Backport block support changes from the Gutenberg plugin 2022-04-05 12:08:02 +00:00