Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#35222 closed enhancement (fixed)

count_user_posts() - change docs to return string instead of int

Reported by: nofearinc Owned by: SergeyBiryukov
Priority: normal Milestone: 4.5
Component: Users Version:
Severity: minor Keywords: has-patch
Cc: Focuses: docs

Description

As seen in a tweet by Rarst and tested locally, count_user_posts returns the number of posts from a user as a string instead of int calling $wpdb->get_var. Since people may validate against strings or compare accordingly, a safe bet is letting IDEs know that the return type is string.

Attachments (1)

35222.diff (749 bytes ) - added by nofearinc 11 years ago.

Download all attachments as: .zip

Change History (4)

@nofearinc
11 years ago

#2 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review4.5

#3 @SergeyBiryukov
11 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 36085:

Docs: Correct @return type for count_user_posts().

Props nofearinc.
Fixes #35222.

Note: See TracTickets for help on using tickets.