Make WordPress Core

Ticket #44455: 44455.diff

File 44455.diff, 2.0 KB (added by subrataemfluence, 8 years ago)
  • capabilities.php

    diff --git src/wp-includes/capabilities.php b/capabilities.php
    index 608ff40..45b11ff 100755
    old new  
    2020 *
    2121 * @param string $cap       Capability name.
    2222 * @param int    $user_id   User ID.
    23  * @param int    $object_id Optional. ID of the specific object to check against if `$cap` is a "meta" cap.
    24  *                          "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used
    25  *                          by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts',
    26  *                          'edit_others_posts', etc. The parameter is accessed via func_get_args().
     23 *
    2724 * @return array Actual capabilities for meta capability.
    2825 */
    2926function map_meta_cap( $cap, $user_id ) {
    function map_meta_cap( $cap, $user_id ) {  
    617614 * @see map_meta_cap()
    618615 *
    619616 * @param string $capability Capability name.
    620  * @param int    $object_id  Optional. ID of the specific object to check against if `$capability` is a "meta" cap.
    621  *                           "Meta" capabilities, e.g. 'edit_post', 'edit_user', etc., are capabilities used
    622  *                           by map_meta_cap() to map to other "primitive" capabilities, e.g. 'edit_posts',
    623  *                           'edit_others_posts', etc. Accessed via func_get_args() and passed to WP_User::has_cap(),
    624  *                           then map_meta_cap().
     617 *
    625618 * @return bool Whether the current user has the given capability. If `$capability` is a meta cap and `$object_id` is
    626619 *              passed, whether the current user has the given meta capability for the given object.
    627620 */
    function get_super_admins() {  
    803796 *
    804797 * @since 3.0.0
    805798 *
    806  * @param int $user_id (Optional) The ID of a user. Defaults to the current user.
     799 * @param int|bool $user_id (Optional) The ID of a user. Defaults to the current user.
    807800 * @return bool True if the user is a site admin.
    808801 */
    809802function is_super_admin( $user_id = false ) {