Mark user levels as Deprecated — at Initial Version
|Reported by:||dd32||Owned by:|
Since the new Role system was introduced in WordPress 2.0, The usage of User Levels has been deprecated (but still supported for back compatibility).
I'd like to propose (As i did on IRC recently) that user levels be marked as being deprecated, at least in documentation (which i have already done on a few Codex pages) and possibly in WordPress Core.
The major downside to this is that the many -currently being developed- themes which still use user levels for adding admin menu's may cause PHP Noices to show up (However, Unless they're running as a dev install, they may not see them) - Which also means, Many theme designers may not see the warnings either, as from my experience, most theme designers dont run with WP_DEBUG turned on either..
I'm attaching a patch to emit a warning:
Notice: Usage of User Levels by Plugins and Themes is deprecated since version 2.0! Use Roles and Capabilities instead. in C:\www\wordpress\wp-includes\functions.php on line 2942