seancojr
4/1/2016 - 10:32 PM

Exclude certain users from the activity length restriction of BP Limit Activity based on user role. From https://wordpress.org/support/topi

Exclude certain users from the activity length restriction of BP Limit Activity based on user role.

From https://wordpress.org/support/topic/conditional-activity-length?replies=4

add_action( 'plugins_loaded', 'maybe_disable_bplal' );
function maybe_disable_bplal() {
    if ( bp_is_verified() ) {
        remove_action( 'bp_include', array( 'BP_LimitActivityLength', 'init' ) );
    }
}

function bp_is_verified() {
    $verified = get_user_meta( get_current_user_id(), 'bp-verified', true );
    return !empty( $verified );
}