WordPress.org

Make WordPress Core

Changeset 35954


Ignore:
Timestamp:
12/16/2015 05:31:27 AM (4 years ago)
Author:
DrewAPicture
Message:

Docs: Add variadic markers to the optional $object_id parameter notation for WP_User::has_cap().

See #32246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-user.php

    r35598 r35954  
    702702     * @see map_meta_cap()
    703703     *
    704      * @param string $cap       Capability name.
    705      * @param int    $object_id Optional. ID of the specific object to check against if `$cap` is a "meta" cap.
    706      *                          "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used
    707      *                          by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts',
    708      *                          'edit_others_posts', etc. The parameter is accessed via func_get_args() and passed
    709      *                          to map_meta_cap().
     704     * @param string $cap           Capability name.
     705     * @param int    $object_id,... Optional. ID of the specific object to check against if `$cap` is a "meta" cap.
     706     *                              "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used
     707     *                              by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts',
     708     *                              'edit_others_posts', etc. The parameter is accessed via func_get_args() and passed
     709     *                              to map_meta_cap().
    710710     * @return bool Whether the current user has the given capability. If `$cap` is a meta cap and `$object_id` is
    711711     *              passed, whether the current user has the given meta capability for the given object.
Note: See TracChangeset for help on using the changeset viewer.