From 12cc58c2270a74c314100ca801b68789c214257b Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 30 Dec 2009 16:51:32 +0000 Subject: [PATCH] Mark user levels as Deprecated. Fixes #10805 props nacin. git-svn-id: https://develop.svn.wordpress.org/trunk@12585 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/capabilities.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 651c82c58c..60374374b4 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -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 );