Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#62720 closed enhancement (fixed)

Incomplete phpdoc typehints for get_the_post_thumbnail_url()

Reported by: apermo's profile apermo Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.8 Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords: has-patch
Focuses: docs Cc:

Description

While digging through code, we've realized that the PHPDoc for get_the_post_thumbnail_url() is incomplete. The param $post can be null as well, this is missing in the PHPDoc block.

While fixing this, we will as well check the type hints throughout post-thumbnail-template.php.

Change History (4)

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


3 months ago
#1

  • Keywords has-patch added

As described in ticket 62720, we found several missing types in phpdocs throughout post-thumbnail-template.php.
This PR fixes all missing occurrences of null -types throughout the file.

Trac ticket: https://core.trac.wordpress.org/ticket/62720#ticket

#2 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 6.8

#3 @SergeyBiryukov
3 months ago

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

In 59548:

Docs: Update parameter type hints to include null for post thumbnail functions.

Follow-up to [12320], [12351], [20646], [32618], [34167], [34373], [37915].

Props apermo, jasonsa19.
Fixes #62720.

@SergeyBiryukov commented on PR #8029:


3 months ago
#4

Thanks for the PR! Merged in r59548.

Note: See TracTickets for help on using tickets.