[wp-trac] [WordPress Trac] #51291: Add filter to show post list table `column_cb` even without `edit_post` capability
WordPress Trac
noreply at wordpress.org
Wed Jan 6 08:24:11 UTC 2021
#51291: Add filter to show post list table `column_cb` even without `edit_post`
capability
------------------------------------------+------------------------------
Reporter: coreyw | Owner: alexstine
Type: enhancement | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: good-first-bug needs-testing | Focuses: administration
------------------------------------------+------------------------------
Changes (by alexstine):
* keywords: good-first-bug has-patch => good-first-bug needs-testing
* owner: (none) => alexstine
* status: new => accepted
Comment:
Hello @coreyw
I have linked a PR to this ticket. I've suggested a filter that if set to
true, the checkbox will output regardless of capability check. Is this
what you were after?
Can I also get your feedback @johnbillion ? Happy to alter or adjust if
it's not quite right.
This filter can be added to child theme or plugin.
{{{#!php
add_filter( 'bypass_cap_check_on_post_cb', '__return_true' );
}}}
Testing welcome.
Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51291#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list