[wp-trac] [WordPress Trac] #40340: "Attach to existing content" modal shows posts and pages of other users
WordPress Trac
noreply at wordpress.org
Tue Apr 4 13:18:12 UTC 2017
#40340: "Attach to existing content" modal shows posts and pages of other users
-----------------------------+------------------------------
Reporter: menakas | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: 4.7.3
Severity: normal | Resolution:
Keywords: has-screenshots | Focuses: ui
-----------------------------+------------------------------
Changes (by swissspidy):
* keywords: has-screenshots close => has-screenshots
* status: closed => reopened
* resolution: maybelater =>
Comment:
> meaning which posts to be listed based on current user's role would be
an additional burden and to achieve this a series of if...else statements
will have to be incorporated which I believe is not very necessary here.
Not really. WordPress has a robust capabilities API. This would be as
simple as `current_user_can( 'edit_post', $post_id )` for example.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40340#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list