WordPress.org

Make WordPress Core

Changeset 12585


Ignore:
Timestamp:
12/30/2009 04:51:32 PM (10 years ago)
Author:
westi
Message:

Mark user levels as Deprecated. Fixes #10805 props nacin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r12479 r12585  
    713713     */
    714714    function has_cap( $cap ) {
    715         if ( is_numeric( $cap ) )
     715        if ( is_numeric( $cap ) ) {
     716            _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
    716717            $cap = $this->translate_level_to_cap( $cap );
    717 
     718        }
     719       
    718720        $args = array_slice( func_get_args(), 1 );
    719721        $args = array_merge( array( $cap, $this->ID ), $args );
Note: See TracChangeset for help on using the changeset viewer.