Make WordPress Core

Opened 18 months ago

Closed 14 months ago

Last modified 14 months ago

#55929 closed defect (bug) (fixed)

`get_block_file_template()` incorrectly documented

Reported by: peterwilsoncc's profile peterwilsoncc Owned by: peterwilsoncc's profile peterwilsoncc
Milestone: 6.1 Priority: normal
Severity: normal Version: 5.9
Component: Editor Keywords: has-patch commit
Focuses: docs Cc:

Description

The function get_block_file_template() is currently incorrectly documented with get_block_template()'s docblock.

The former is used as a fallback by the latter when no templates are found in the database.

The pre_get_block_file_template filter within get_block_file_template() is similarly incorrectly documented.

Change History (7)

#1 @SergeyBiryukov
18 months ago

  • Milestone changed from Awaiting Review to 6.1

Introduced in [52062] / #54335.

This ticket was mentioned in PR #3269 on WordPress/wordpress-develop by felipeelia.


15 months ago
#2

  • Keywords has-patch added

This PR adjusts get_block_file_template() documentation per 55929

Trac ticket: https://core.trac.wordpress.org/ticket/55929

#3 @felipeelia
15 months ago

@peterwilsoncc the PR above addresses those changes and also adjusts the description of the 'get_block_file_template' filter a bit. If any adjustment in the text is needed, please let me know. Thanks!

#4 @peterwilsoncc
15 months ago

  • Owner set to peterwilsoncc
  • Status changed from new to reviewing

Thanks @felipeelia, I've self-assigned this for review. As it's a docs change it can be committed at any time during the cycle so isn't affected by the beta 1 deadline this week.

#5 @peterwilsoncc
15 months ago

  • Keywords commit added

The linked pull request is approved for commit as of fee956a.

#6 @peterwilsoncc
14 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 54380:

Docs: Correct docblocks for get_block_file_template().

This corrects the docblock for get_block_file_template() and the filters it contains: pre_get_block_file_template and get_block_file_template.

Prior to this change they were incorrectly documented with the docblocks for get_block_template() and its associated filters.

Props felipeelia.
Fixes #55929.

Note: See TracTickets for help on using tickets.