Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#61705 closed defect (bug) (fixed)

Docs: Correct @return value for _get_block_templates_files().

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

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 2 years ago.
61705.2.diff (671 bytes ) - added by dilipbheda 2 years ago.

Download all attachments as: .zip

Change History (6)

@dilipbheda
2 years ago

#1 @mukesh27
2 years 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
2 years ago

#2 @dilipbheda
2 years ago

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

#3 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review6.7

#4 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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.