Open carolinan opened 4 years ago
A PR for this is straightforward:
Check https://developer.wordpress.org/?s=register_block_&post_type%5B%5D=wp-parser-function for all the register_block_*
type functions, add them manually but exclude the style one.
Thanks for noticing this 👍
In https://github.com/WPTRT/WPThemeReview/blob/develop/WPThemeReview/Sniffs/PluginTerritory/ForbiddenFunctionsSniff.php The sniff for regestering blocks is too strict.
The existing sniff is for
'register_block_*',
so an error is shown forregister_block_style().
register_block_style()
is allowed in themes, so it should not cause an error.To do:
sniffname
sniff to the ruleset.