WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 3 months ago

Last modified 3 months ago

#46503 closed enhancement (fixed)

Docs: Added description for global $post

Reported by: immeet94 Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: docs, coding-standards Cc:
PR Number:

Description

In many core files document of global $post id not added.

Attachments (2)

#46503.diff (3.3 KB) - added by immeet94 7 months ago.
Patch
#46503.2.diff (2.2 KB) - added by immeet94 7 months ago.
Please see this file for updated patch.

Download all attachments as: .zip

Change History (10)

@immeet94
7 months ago

Patch

@immeet94
7 months ago

Please see this file for updated patch.

This ticket was mentioned in Slack in #core by immeet94. View the logs.


7 months ago

#2 @SergeyBiryukov
7 months ago

  • Component changed from General to Posts, Post Types
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by immeet94. View the logs.


7 months ago

#4 @SergeyBiryukov
7 months ago

  • Milestone changed from Awaiting Review to 5.3

#5 @SergeyBiryukov
3 months ago

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

In 45742:

Docs: Add missing description for $post global.

Props immeet94.
Fixes #46503. See #47110.

#6 @SergeyBiryukov
3 months ago

In 45744:

Posts, Post Types: Revert unintended change from [45742].

See #46503.

#7 follow-up: @diddledan
3 months ago

@SergeyBiryukov in 45744 you reverted a change that was actually correct, though maybe not necessary for this issue. delete_option() expects 1 parameter but the reinstated call in 45744 passes 2 parameters. The correct usage is to drop the second parameter.

#8 in reply to: ↑ 7 @SergeyBiryukov
3 months ago

Replying to diddledan:

delete_option() expects 1 parameter but the reinstated call in 45744 passes 2 parameters.

Thanks! Yes, just wanted to handle that in #46850 :)

Note: See TracTickets for help on using tickets.