[wp-trac] [WordPress Trac] #12960: Number of posts on the Users page should include drafts and pending review
WordPress Trac
noreply at wordpress.org
Wed Apr 8 13:38:44 UTC 2020
#12960: Number of posts on the Users page should include drafts and pending review
-------------------------------------+---------------------
Reporter: archon810 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Users | Version: 2.9.2
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------
Comment (by donmhico):
Thanks for the ticket @archon810. Yeah it's 10 years old now! Hopefully
this could gain traction soon.
While @Nikschavan patch works (thanks for the patch!), I don't think
directly changing the SQL inside `get_posts_by_author_sql()` is the best
approach since it could lead to unwanted changes to any plugins / themes
that uses the function.
In my latest patch,
[https://core.trac.wordpress.org/attachment/ticket/12960/12960.3.diff
12960.3.diff], I introduced a new parameter `$include_unpublished` which
if set to `true` would add the SQL that will include `pending`, `future`,
and `draft` posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12960#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list