Make WordPress Core

Opened 15 months ago

Closed 15 months ago

Last modified 14 months ago

#59869 closed defect (bug) (fixed)

Incorrect reference in docblock for _register_theme_block_patterns

Reported by: joemcgill's profile joemcgill Owned by: joemcgill's profile joemcgill
Milestone: 6.4.2 Priority: normal
Severity: normal Version: 6.4
Component: Themes Keywords: dev-reviewed
Focuses: docs Cc:

Description

In [56978] the helper used to get the list of theme patterns in _register_theme_block_patterns was moved to a method on the WP_Theme class, but the @since annotation for the plugin still has the old reference that is now incorrect.

Change History (12)

This ticket was mentioned in PR #5649 on WordPress/wordpress-develop by @joemcgill.


15 months ago
#1

  • Keywords has-patch added

#2 @audrasjb
15 months ago

  • Keywords commit added

Thanks for spotting this.
For reference, here is the related section on DevHub: https://developer.wordpress.org/reference/functions/_register_theme_block_patterns/#changelog

#3 @mukesh27
15 months ago

Good catch, introduced in [56765] / #59490.

#4 @joemcgill
15 months ago

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

In 57102:

Themes: Correct docblock for _register_theme_block_patterns.

This updates the '@since 6.4.0' annotation in _register_theme_block_patterns to reference WP_Theme::get_block_patterns instead of _wp_get_block_patterns, which was changed in [56978].

Props audrasjb, mukesh27, joemcgill.
Fixes #59869.

#5 @joemcgill
15 months ago

  • Keywords dev-feedback added; has-patch commit removed

@audrasjb is this something that should be backported to the 6.4 branch to keep the docs in DevHub up to date?

#6 @audrasjb
15 months ago

  • Keywords fixed-major added; dev-feedback removed
  • Milestone changed from 6.5 to 6.4.2
  • Resolution fixed deleted
  • Status changed from closed to reopened

Yeah sounds good to me, let's reopen this for backport and remilestone it to 6.4.2.

#7 @joemcgill
15 months ago

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

In 57103:

Themes: Correct docblock for _register_theme_block_patterns.

This updates the '@since 6.4.0' annotation in _register_theme_block_patterns to reference WP_Theme::get_block_patterns instead of _wp_get_block_patterns, which was changed in [56978].

Reviewed by audrasjb.
Merges [57102] to the to the 6.4 branch.

Props audrasjb, mukesh27, joemcgill.
Fixes #59869.

#8 @joemcgill
15 months ago

  • Keywords dev-reviewed added; fixed-major removed

This ticket was mentioned in Slack in #core by jorbin. View the logs.


15 months ago

QAQQL commented on PR #5649:


14 months ago
#10

I can't open my blog after updating
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/51136763/507f378e-4d93-453c-a719-1a361af6335c

Fatal error: Uncaught Error: Call to undefined method WP_Theme::get_block_patterns() in D:\1\wp-includes\block-patterns.php:355 Stack trace: #0 D:\1\wp-includes\class-wp-hook.php(310): _register_theme_block_patterns() #1 D:\1\wp-includes\class-wp-hook.php(334): WP_Hook->apply_filters() #2 D:\1\wp-includes\plugin.php(517): WP_Hook->do_action() #3 D:\1\wp-settings.php(632): do_action() #4 D:\1\wp-config.php(92): require_once('C:
Blog
wp-sett...') #5 D:\1\wp-load.php(50): require_once('C:
Blog
wp-conf...') #6 D:\1\wp-blog-header.php(13): require_once('C:
Blog
wp-load...') #7 D:\1\index.php(17): require('C:
Blog
wp-blog...') #8 {main} thrown in D:\1\wp-includes\block-patterns.php on line 355

@joemcgill commented on PR #5649:


14 months ago
#12

@QAQQL, if you're still experiencing this issue, can you open a new ticket here or add additional details to this related support forum topic?

Note: See TracTickets for help on using tickets.