Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#3868 closed defect (bug) (fixed)

get_usernumposts does not count private posts for users with read_private_posts

Reported by: molecularbear Owned by: rob1n
Milestone: 2.2 Priority: low
Severity: normal Version: 2.1.1
Component: General Keywords: has-patch
Focuses: Cc:


get_usernumposts in wp-includes/user.php only considers published posts; I think it should include private posts in its count when the user has the read_private_posts capability.

NOTE: this patch is dependent on the inclusion of #3861. Unfortunately, my preciousss #3861 was moved to Milestone 2.2 instead of 2.1.2 :(

Attachments (1)

user.patch (501 bytes) - added by molecularbear 11 years ago.
patch to user.php dependent on #3861

Download all attachments as: .zip

Change History (5)

11 years ago

patch to user.php dependent on #3861

#1 @markjaquith
11 years ago

  • Keywords has-patch added
  • Milestone changed from 2.1.2 to 2.2

Don't worry. 2.2 drops in late April.

#2 @foolswisdom
11 years ago

  • Owner changed from anonymous to ryan

#3 @rob1n
11 years ago

  • Owner changed from ryan to rob1n

#4 @rob1n
11 years ago

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

(In [5190]) Add private posts to get_usernumposts() when the current_user_can read_private_posts. Props molecularbear. fixes #3868

Note: See TracTickets for help on using tickets.