Opened 18 months ago

Last modified 8 months ago

#6611 new defect (bug)

Template part block hooks missing from Code Reference

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords:


The following hooks are missing from the Code Reference:

  • render_block_core_template_part_post
  • render_block_core_template_part_file
  • render_block_core_template_part_none


Change History (4)

#1 @coffee2code
18 months ago

After [9184], per #4624, wp-includes/blocks/ is explicitly excluded from the Code Reference as that code was considered an external package. The hooks listed above are defined in wp-includes/blocks/template-parts.php.

Exclusion is via

Does Core consider this file to be an exclusion to that rule?

#2 @johnbillion
18 months ago

I'm not sure if anything has changed since then but the @since tags on those actions appear to represent the WordPress version they were introduced in (5.9.0), rather than the Gutenberg version.

#3 @dd32
18 months ago

Personal opinion, wp-includes/blocks should be included in the reference, in full, as it's not an "external project" as such, even if it's primarily developed within Gutenberg.

Of the files in that directory, is the only instance of an @since where the version appears to be incorrect (3.3) which should be corrected to be a WordPress version (if it's not WP3.3)

#4 @emrikol
8 months ago

I'm in agreement with @dd32, as I've just finished an embarrassingly long dive into trying to figure out what was going on with the docs.

The block editor is a core part of WordPress now, and once features, functions, hooks, etc get merged into core their documentation should be a part of it.

We already include everything in wp-includes/blocks.php so it seems to make sense to me to include wp-includes/blocks/* as well.

Note: See TracTickets for help on using tickets.