[wp-trac] [WordPress Trac] #16603: Add hooks to wp_count_posts()
WordPress Trac
noreply at wordpress.org
Sat May 4 22:40:31 UTC 2013
#16603: Add hooks to wp_count_posts()
----------------------------------------+-----------------------------
Reporter: mikeschinkel | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch commit 3.6-early |
----------------------------------------+-----------------------------
Comment (by itthinx):
I was just looking at wp_count_posts() in 3.5.1 looking for filters that
unfortunately don't exist. What has been proposed here, seems to be in
line with what I was looking for. By the way, wp_count_attachments() seems
to be lacking those filters as well.
A way to modify the outcome of this function is important when you are
restricting the visibility of posts - my Groups plugin allows to do that
and when a user is viewing the list of posts in the back end, the counts
reflect the total number of posts that exist, but if that user is only
allowed to see a subset of these, the number of posts that is in the list
is less. Moreover, the small indicator on top right would say 'X items'
where X is the correct number of posts for that user, while the 'Published
(Y)' indicator would give a higher number in Y.
Seeing that this ticket has been open since 2 years and there's no
(reasonably efficient) way to interact with the outcome of
wp_count_posts() and wp_count_attachments(), here's one more who would
appreciate a solution to this. I haven't tried the patches but from what
has been said here, more than just +1.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16603#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list