Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Remove extraneous params from block_type_metadata hook #34151

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

cr0ybot
Copy link
Contributor

@cr0ybot cr0ybot commented Aug 19, 2021

Description

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

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

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
@gziolo
Copy link
Member

gziolo commented Aug 19, 2021

Good catch, it's probably a copy and paste issue from block_type_metadata_settings that accepts two params 👍🏻

@gziolo gziolo added [Type] Developer Documentation Documentation for developers [Feature] Extensibility The ability to extend blocks or the editing experience labels Aug 19, 2021
@gziolo gziolo changed the title Docs: remove extraneous params from block_type_metadata hook Docs: Remove extraneous params from block_type_metadata hook Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants