Ticket #5632: capabilities.phpdoc.diff

File capabilities.phpdoc.diff, 2.8 KB (added by darkdragon, 4 years ago)

incomplete documentation

  • capabilities.php

     
    11<?php 
     2/** 
     3 * {@internal Missing Description}} 
     4 * 
     5 * @package WordPress 
     6 * @subpackage User 
     7 */ 
    28 
    39class WP_Roles { 
    410        var $roles; 
     
    130136 
    131137class WP_User { 
    132138        var $data; 
     139 
     140        /** 
     141         * The user's ID. 
     142         * 
     143         * @since 2.1.0 
     144         * @access public 
     145         * @var int 
     146         */ 
    133147        var $ID = 0; 
    134         var $id = 0; // Deprecated, use $ID instead. 
     148 
     149        /** 
     150         * The user's ID. 
     151         * 
     152         * @since 2.0.0 
     153         * @access public 
     154         * @deprecated Use WP_User::$ID 
     155         * @see WP_User::$ID 
     156         * @var int 
     157         */ 
     158        var $id = 0; 
     159 
     160        /** 
     161         * The capabilities the user has. 
     162         * 
     163         * @since 2.0.0 
     164         * @access public 
     165         * @var array 
     166         */ 
    135167        var $caps = array(); 
     168 
     169        /** 
     170         * {@internal Missing Description}} 
     171         * 
     172         * @since 2.0.0 
     173         * @access public 
     174         * @var unknown_type 
     175         */ 
    136176        var $cap_key; 
     177 
     178        /** 
     179         * The roles the user is part of. 
     180         * 
     181         * @since 2.0.0 
     182         * @access public 
     183         * @var array 
     184         */ 
    137185        var $roles = array(); 
    138186        var $allcaps = array(); 
    139187 
     
    254302                $this->get_role_caps(); 
    255303        } 
    256304 
    257         //has_cap(capability_or_role_name) or 
    258         //has_cap('edit_post', post_id) 
     305        /** 
     306         * {@internal Missing Short Description}} 
     307         * 
     308         * has_cap(capability_or_role_name) or has_cap('edit_post', post_id) 
     309         * {@internal Missing Long Description}} 
     310         * 
     311         * @since 2.0.0 
     312         * @access public 
     313         * 
     314         * @param unknown_type $cap 
     315         * @return unknown 
     316         */ 
    259317        function has_cap($cap) { 
    260318                if ( is_numeric($cap) ) 
    261319                        $cap = $this->translate_level_to_cap($cap); 
     
    280338 
    281339} 
    282340 
    283 // Map meta capabilities to primitive capabilities. 
     341/** 
     342 * map_meta_cap() - Map meta capabilities to primitive capabilities 
     343 * 
     344 * {@internal Missing Long Description}} 
     345 * 
     346 * @since 2.0.0 
     347 * 
     348 * @param unknown_type $cap 
     349 * @param unknown_type $user_id 
     350 * @return unknown 
     351 */ 
    284352function map_meta_cap($cap, $user_id) { 
    285353        $args = array_slice(func_get_args(), 2); 
    286354        $caps = array(); 
     
    440508        return $caps; 
    441509} 
    442510 
    443 // Capability checking wrapper around the global $current_user object. 
     511/** 
     512 * current_user_can() - Capability checking wrapper around the global $current_user object 
     513 * 
     514 * {@internal Missing Long Description}} 
     515 * 
     516 * @since 2.0.0 
     517 * 
     518 * @param unknown_type $capability 
     519 * @return unknown 
     520 */ 
    444521function current_user_can($capability) { 
    445522        $current_user = wp_get_current_user(); 
    446523 
     
    453530        return call_user_func_array(array(&$current_user, 'has_cap'), $args); 
    454531} 
    455532 
    456 // Convenience wrappers around $wp_roles. 
     533/** 
     534 * get_role() - Convenience wrappers around $wp_roles. 
     535 * 
     536 * {@internal Missing Long Description}} 
     537 * 
     538 * @since 2.0.0 
     539 * 
     540 * @param unknown_type $role 
     541 * @return unknown 
     542 */ 
    457543function get_role($role) { 
    458544        global $wp_roles; 
    459545