WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 5 weeks ago

Last modified 5 weeks ago

#52836 closed defect (bug) (fixed)

Docs: indentation error on `register_post_type` function DocBlock parameters

Reported by: audrasjb Owned by: 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 5 weeks ago.
52836.diff (3.3 KB) - added by audrasjb 5 weeks ago.
52836.png (28.6 KB) - added by SergeyBiryukov 5 weeks ago.

Download all attachments as: .zip

Change History (7)

@audrasjb
5 weeks ago

#1 @audrasjb
5 weeks ago

  • Keywords has-patch has-screenshots added

@SergeyBiryukov
5 weeks ago

#2 @SergeyBiryukov
5 weeks 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
5 weeks 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
5 weeks 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.