Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Limit Wall upload By Member Type.
<?php
/**
* Limit Wall upload By Member Type.
*/
function yzc_limit_wall_upload_by_member_type() {
if ( current_user_can( 'administrator' ) ) {
return true;
}
// Get User Member Type
$member_type = bp_get_member_type( bp_loggedin_user_id() );
if ( 'author' == $member_type ) {
return true;
}
return false;
}
add_filter( 'yz_allow_wall_upload_attachments', 'yzc_limit_wall_upload_by_member_type' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment