WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 8 months ago

#21431 closed enhancement

Allow count_many_users_posts() to count only public posts — at Initial Version

Reported by: ryan Owned by:
Priority: normal Milestone: 3.5
Component: Users Version: 3.4.1
Severity: normal Keywords: has-patch do-not-punt commit
Cc:

Description

count_many_users_posts() calls get_posts_by_author_sql() which contains some cap checks. This make the output dependent on the current user and not very cacheable. Let's add a means of counting only public posts that skips the cap and current user checks.

Change History (1)

ryan11 months ago

Core patch plus corresponding changes to a plugin to provide context

Note: See TracTickets for help on using tickets.