Changeset 5329 for trunk/bp-core/bp-core-functions.php
- Timestamp:
- 11/14/2011 05:19:12 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r5320 r5329 272 272 * 273 273 * @package BuddyPress Core 274 * @uses is_super_admin() returns true if the current user is a site admin, false if not274 * @uses bp_current_user_can() returns true if the current user is a site admin, false if not 275 275 */ 276 276 function bp_core_admin_menu_init() { 277 if ( ! is_super_admin() )277 if ( !bp_current_user_can( 'bp_moderate' ) ) 278 278 return false; 279 279 … … 289 289 * @package BuddyPress Core 290 290 * @global object $bp Global BuddyPress settings object 291 * @uses is_super_admin() returns true if the current user is a site admin, false if not291 * @uses bp_current_user_can() returns true if the current user is a site admin, false if not 292 292 * @uses add_submenu_page() WP function to add a submenu item 293 293 */ 294 294 function bp_core_add_admin_menu() { 295 if ( ! is_super_admin() )295 if ( !bp_current_user_can( 'bp_moderate' ) ) 296 296 return false; 297 297 … … 324 324 * 325 325 * @global object $bp Global BuddyPress settings object 326 * @uses is_super_admin() to check current user permissions before showing the notices326 * @uses bp_current_user_can() to check current user permissions before showing the notices 327 327 * @uses bp_is_root_blog() 328 328 */ … … 331 331 332 332 // Only the super admin should see messages 333 if ( ! is_super_admin() )333 if ( !bp_current_user_can( 'bp_moderate' ) ) 334 334 return; 335 335 … … 392 392 393 393 // Only the super admin gets warnings 394 if ( ! is_super_admin() )394 if ( !bp_current_user_can( 'bp_moderate' ) ) 395 395 return; 396 396
Note: See TracChangeset
for help on using the changeset viewer.