[wp-hackers] using user_has_cap filter

Steve Taylor steve at sltaylor.co.uk
Tue Oct 27 13:36:18 UTC 2009


I'm almost there with comprehending the user_has_cap filter, but I
just need some clarification. If I add a filter like this:

add_filter( 'user_has_cap', 'my_has_cap', 0, 3 );

And then this is my callback function:

function lockDeletion( $allcaps, $caps, $args ) {
    [whatever]
}

As far as I can tell:

$allcaps is an array with capabilities for keys and boolean values

$caps is ????

$args are the extra arguments - post ID, etc. But what is $args[0],
what is $args[1], etc. ????

thanks,

Steve Taylor


More information about the wp-hackers mailing list