Make WordPress Core

Opened 8 weeks ago

Closed 8 weeks ago

#61705 closed defect (bug) (fixed)

Docs: Correct @return value for _get_block_templates_files().

Reported by: dilipbheda's profile dilipbheda Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: docs Cc:

Description

The _get_block_templates_files() function returns null, so we also need to add in inline code.

Attachments (2)

61705.diff (620 bytes) - added by dilipbheda 8 weeks ago.
61705.2.diff (671 bytes) - added by dilipbheda 8 weeks ago.

Download all attachments as: .zip

Change History (6)

@dilipbheda
8 weeks ago

#1 @mukesh27
8 weeks ago

Hi there!

I thought we should add some description for return type.

@return array|null The Template files, or null if $template_type not matched.

@dilipbheda
8 weeks ago

#2 @dilipbheda
8 weeks ago

@mukesh27 Thank you for the review, I've updated the patch and uploaded it here.

#3 @SergeyBiryukov
8 weeks ago

  • Milestone changed from Awaiting Review to 6.7

#4 @SergeyBiryukov
8 weeks ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 58768:

Docs: Correct @return value for _get_block_templates_files().

The function returns null if $template_type is not wp_template or wp_template_part.

Follow-up to [52062].

Props dilipbheda, mukesh27.
Fixes #61705.

Note: See TracTickets for help on using tickets.