mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Mark user levels as Deprecated. Fixes #10805 props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ff7831207c
commit
bb827e82c6
@ -712,9 +712,11 @@ class WP_User {
|
||||
* @return bool True, if user has capability; false, if user does not have capability.
|
||||
*/
|
||||
function has_cap( $cap ) {
|
||||
if ( is_numeric( $cap ) )
|
||||
if ( is_numeric( $cap ) ) {
|
||||
_deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
|
||||
$cap = $this->translate_level_to_cap( $cap );
|
||||
|
||||
}
|
||||
|
||||
$args = array_slice( func_get_args(), 1 );
|
||||
$args = array_merge( array( $cap, $this->ID ), $args );
|
||||
$caps = call_user_func_array( 'map_meta_cap', $args );
|
||||
|
Loading…
Reference in New Issue
Block a user