mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-05-31 05:04:29 +08:00
Changes to `bp_current_user_can()` in #6501 broke older capability checks relying on an empty argument to be passed in order to use a fallback value. Most notably, `bp_current_user_can('bp_xprofile_change_field_visibility' )` checks now passed by default. This resulted in the "Change" link to always be visible when editing a profile field even if an admin has enabled "Enforce field visibility" for that particular field. This commit fixes this issue by passing a `null` value if there are no extra arguments to pass in `bp_current_user_can()`. Commit also includes a unit test. See #6730 (2.4-branch). git-svn-id: https://buddypress.svn.wordpress.org/branches/2.4@10376 cdf35c40-ae34-48e0-9cc9-0c9da1808c22 |
||
|---|---|---|
| .. | ||
| phpunit | ||