Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/01/2016 12:50:06 AM (3 years ago)
Author:
dcavins
Message:

Improve bp_current_user_can().

  • Deprecate $args['blog_id’] in favor of $args['site_id’].
  • Improve the structure of the passed $args array in the

bp_current_user_can filter.

Props r-a-y, dcavins.

Fixes #7192.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-caps.php

    r10825 r11052  
    2929
    3030            // You may pass args manually: $field_id, $profile_user_id.
    31             $field_id        = isset( $args[0] ) ? (int)$args[0] : bp_get_the_profile_field_id();
    32             $profile_user_id = isset( $args[1] ) ? (int)$args[1] : bp_displayed_user_id();
     31            $field_id        = ! empty( $args[0] ) ? (int) $args[0] : bp_get_the_profile_field_id();
     32            $profile_user_id = isset( $args[1] )   ? (int) $args[1] : bp_displayed_user_id();
    3333
    3434            // Visibility on the fullname field is not editable.
Note: See TracChangeset for help on using the changeset viewer.