Make WordPress Core

Opened 15 months ago

Last modified 11 months ago

#63729 new enhancement

Fix misleading summary in PHPDoc for wp_insert_post()

Reported by: rutujaparamane2004 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Posts, Post Types Version:
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

This patch improves the inline documentation for the wp_insert_post() function by clarifying that it inserts or updates a post depending on the presence of an ID. Previously, the docblock implied it only inserts posts.

Change History (10)

#1 follow-up: @Presskopp
15 months ago

Hi and welcome Rutuja. May I ask, where do we find your patch?

#2 @vladimiraus
15 months ago

Cannot see the patch either. Should we change to needs patch?

This ticket was mentioned in ​PR #9288 on ​WordPress/wordpress-develop by ​@vladimiraus.


15 months ago
#3

Added examples for wp_insert_post and fixed minor typos.

#4 @vladimiraus
15 months ago

  • Keywords needs-testing added
  • Type defect (bug) → enhancement

Added pull request.

#5 in reply to: ↑ 1 @sabernhardt
15 months ago

  • Keywords needs-testing removed
  • Version 6.5

Hi and welcome Rutuja. May I ask, where do we find your patch?

The pull request preceded the ticket: ​9286

@rutujaparamane2004 If you add a link to the ticket in the pull request's first comment, the PR should connect to the ticket automatically.

Regarding the version, [53456] added the 's' to 'Inserts' for WordPress 6.1, but the rest of the function description goes back much earlier to [8669], [23311] and [25628].

#6 @vladimiraus
15 months ago

  • Keywords needs-testing added

#7 @SirLouen
15 months ago

  • Keywords needs-testing removed

Docs don't need a needs-testing tag.

#8 @vladimiraus
15 months ago

Thanks @SirLouen. I wasn't sure.

​@SergeyBiryukov commented on ​PR #9286:


11 months ago
#10

Thanks for the PR! Merged in r61275.

Note: See TracTickets for help on using tickets.