Skip to content

Commit

Permalink
Docs: remove extraneous params from block_type_metadata hook (#34151)
Browse files Browse the repository at this point in the history
The `block_type_metadata` hook only accepts one argument, so the doc showing `add_filter( 'block_type_metadata', 'filter_metadata_registration', 10, 2 );` confused me. I checked the source of the filter on trac to make sure: https://core.trac.wordpress.org/browser/tags/5.8/src/wp-includes/blocks.php#L215
  • Loading branch information
cr0ybot authored Aug 19, 2021
1 parent e1eb020 commit 2285c00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/filters/block-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function filter_metadata_registration( $metadata ) {
$metadata['apiVersion'] = 1;
return $metadata;
};
add_filter( 'block_type_metadata', 'filter_metadata_registration', 10, 2 );
add_filter( 'block_type_metadata', 'filter_metadata_registration' );

register_block_type( __DIR__ );
```
Expand Down

0 comments on commit 2285c00

Please sign in to comment.