Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Make user status update button available only to admin


Boone Gorges
Keymaster

@boonebgorges

Untested, but the following should work.

1) Copy all those functions above to a plugin file/functions.php/bp-custom.php

2) Add a unique prefix to each function, so as to avoid PHP errors. Eg jeff_bp_update_status_button, etc.

3) In jeff_get_update_status_button and jeff_get_clear_status_button, add the following:

if ( !is_site_admin )
return false;

You can put it right after the line that reads global $bp;.

4) In jeff_bp_the_status, change all references to the original functions (like bp_update_status_button) to your new functions (jeff_bp_update_status_button).

5) In the template file that handles profile status ([child-theme-path]/profile/profile-header.php – copy the same file over from the parent theme if it doesn’t exist yet), change

bp_the_status()

to

jeff_bp_the_status()

Skip to toolbar