[wp-trac] [WordPress Trac] #56307: Docs: Fix parameter type of `$feature` in `block_has_support()`

WordPress Trac noreply at wordpress.org
Fri Jul 29 12:13:26 UTC 2022


#56307: Docs: Fix parameter type of `$feature` in `block_has_support()`
--------------------------+-----------------------------
 Reporter:  Soean         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 In the docs of `block_has_support()` the type of `$feature` is `string`.
 [[https://github.com/WordPress/wordpress-develop/blob/6.0/src/wp-
 includes/blocks.php#L1019|See on GitHub]].

 It should be an array, as you see in the [[https://github.com/WordPress
 /wordpress-
 develop/blob/6.0/tests/phpunit/tests/blocks/wpBlock.php#L590-L646|tests]]
 and [[https://github.com/WordPress/wordpress-
 develop/search?q=block_has_support&type=code|core]].

 For example `block_has_support( $block_type, array( 'color', 'gradient' )
 );`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56307>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list