Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52836 closed defect (bug) (fixed)

Docs: indentation error on `register_post_type` function DocBlock parameters

Reported by: audrasjb's profile audrasjb Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch has-screenshots
Focuses: docs Cc:

Description

There is a minor indentation issue in some register_post_type function’s DocBlock params.

https://developer.wordpress.org/reference/functions/register_post_type/

The issue exists for the $delete_with_user and the $template_lock. Indeed, it's better to avoid dashes when items should not be presented as a bullet list.

See screenshot below.

Attachments (3)

Capture d’écran 2021-03-17 à 17.21.57.png (176.3 KB) - added by audrasjb 4 years ago.
52836.diff (3.3 KB) - added by audrasjb 4 years ago.
52836.png (28.6 KB) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (7)

@audrasjb
4 years ago

#1 @audrasjb
4 years ago

  • Keywords has-patch has-screenshots added

@SergeyBiryukov
4 years ago

#2 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.8

Thanks for the patch!

It looks like the publicly_queryable parameter uses an asterisk for list items and does not have this problem, see 52836.png. So I think we can use an asterisk here too for better readability.

#3 @SergeyBiryukov
4 years ago

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

In 50538:

Docs: Correct formatting for the description of some register_post_type() parameters.

Props audrasjb.
Fixes #52836.

#4 @audrasjb
4 years ago

Ah yes, thanks for pointing this out Sergey, I was a bit hesitant about the best way to manage this :)

Note: See TracTickets for help on using tickets.