[wp-trac] [WordPress Trac] #45883: Recent Posts widget ignores private posts since replacing The Loop
WordPress Trac
noreply at wordpress.org
Tue Feb 26 01:24:25 UTC 2019
#45883: Recent Posts widget ignores private posts since replacing The Loop
---------------------------+-----------------------
Reporter: captain.crash | Owner: audrasjb
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.1.1
Component: Widgets | Version: 5.0.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+-----------------------
Comment (by dlh):
I'm having a little trouble following how [41890] might have caused a
change in behavior like the one described here. If I revert [41890] from
my test environment, for example, I still don't see private posts in the
widget, but perhaps I'm testing incorrectly.
Regardless, I wonder whether the change in [attachment:"45883.diff"] is
too broad. Being logged in isn't usually sufficient in itself to view
private posts; users typically need to be the post author or have the
`read_private_posts` capability for the post type.
Removing the `post_status` clause from the query args entirely causes the
default `WP_Query` logic to kick in, which checks authorship and
capabilities.
However, if private posts weren't previously visible in the widget, that
might constitute a backwards-compatibility break both for the widget
output and the `widget_posts_args` filter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45883#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list