[wp-trac] [WordPress Trac] #14122: Custom "capabilities" appears broken on custom post types
WordPress Trac
wp-trac at lists.automattic.com
Thu Nov 4 01:52:36 UTC 2010
#14122: Custom "capabilities" appears broken on custom post types
----------------------------+-----------------------------------------------
Reporter: jakemgold | Owner: nacin
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 3.1
Component: Post Types | Version: 3.0
Severity: normal | Keywords: needs-patch
----------------------------+-----------------------------------------------
Comment(by WraithKenny):
{{{
if ( empty($args->capability_type) )
$args->capability_type = 'post';
}}}
This check doesn't seem to do anything because the default value is 'post'
so it should never actually be empty right? (Though I suppose you could
pass it '')
If you add below that:
{{{
if ( 'post' == $args->capability_type && empty($args->capabilities) ) )
$args->map_meta_cap = true;
}}}
and then the default can stay the same if its important that it not
change... I'm not sure of the decisions that where made there.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14122#comment:35>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list