Make WordPress Core

#58322 closed defect (bug) (fixed)

Docblock update for `get_sample_permalink_html` hook

Reported by: enchiridion's profile Enchiridion Owned by: audrasjb's profile audrasjb
Milestone: 6.3 Priority: normal
Severity: normal Version: 2.9
Component: Permalinks Keywords: has-patch commit
Focuses: docs Cc:

Description

The docblock for the get_sample_permalink_html filter has 2 errors in it. Both $new_title and $new_slug can nulls as well as strings. This updates the docs for it.

Attachments (1)

58322.patch (954 bytes) - added by Enchiridion 11 months ago.

Download all attachments as: .zip

Change History (5)

@Enchiridion
11 months ago

#1 @audrasjb
11 months ago

  • Milestone changed from Awaiting Review to 6.3
  • Version changed from trunk to 2.9

Introduced in 2.9 via [34347], see #33927.

#2 @SergeyBiryukov
11 months ago

Hi there, thanks for the ticket!

Indeed, these values can be null if get_sample_permalink_html() was called with default parameters, and they are documented as string|null in the function DocBlock.

The patch looks good.

#3 @audrasjb
11 months ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to accepted

The patch indeed looks good, except that the last line of the docblock needs to be correctly indented. I'll fix it directly when committing.

#4 @audrasjb
11 months ago

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

In 55758:

Docs: Clarify @param types on get_sample_permalink_html filter.

$new_title and $new_slug can be null if get_sample_permalink_html()
was called with default parameters, and they are documented as
string|null in the function DocBlock.

Follow-up to [34347].

Props Enchiridion, audrasjb, SergeyBiryukov.
Fixes #58322.
See #33927. --Cette ligne, et les
suivantes
ci-dessous, seront ignorées--

M trunk/src/wp-admin/includes/post.php

Note: See TracTickets for help on using tickets.