Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 17 months ago

#33927 closed enhancement (fixed)

Pass post object to get_sample_permalink_html filter explicitly

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch commit
Focuses: Cc:

Description

get_sample_permalink_html filter's second parameter can be a post ID or a post object.

This is confusing. We should pass the post ID and post object separately, for consistency with get_sample_permalink filter added in [34309].

Attachments (1)

33927.patch (1.1 KB) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (3)

#1 @wonderboymusic
9 years ago

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

In 34347:

The 'get_sample_permalink_html' filter​'s second parameter can be a post ID or a post object. This is confusing. We should pass the post ID and post object separately, for consistency with 'get_sample_permalink' filter added in [34309].

Props SergeyBiryukov.
Fixes #33927.

#2 @audrasjb
17 months ago

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.