WordPress.org

Make WordPress Core

Ticket #10805: 10805.2.diff

File 10805.2.diff, 845 bytes (added by nacin, 8 years ago)

Requires commit in #11386 first.

  • capabilities.php

     
    966966 * @return bool
    967967 */
    968968function current_user_can( $capability ) {
     969        if ( is_numeric( $capability ) )
     970                _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
     971
    969972        $current_user = wp_get_current_user();
    970973
    971974        if ( empty( $current_user ) )
     
    987990 * @return bool
    988991 */
    989992function author_can( $post, $capability ) {
     993        if ( is_numeric( $capability ) )
     994                _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
     995
    990996        if ( !$post = get_post($post) )
    991997                return false;
    992998