Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove/Change “Public” option in activity feed = Youzify


  • hausmanconsulting
    Participant

    @hausmanconsulting

    Using Youzify with a private BuddyPress site (i.e., everyone is a “member” and there is no public access), there is a profile privacy section at the bottom of the new post area on the activity feed that defaults to “Public”. On private communities this is likely to cause a fair amount of confusion because users will obviously not want anything they post to be truly “Public”, and there’s no need to force them to select “Members” before they post since it’s a private community.

    In Youzify, the list of privacy options is called with apply_filters and a function name “youzify_wall_activity_privacy_option”. So in your bp_custom.php you can add something like this, where I moved the “Members” option to the top and commented out the public option:

    add_filter('youzify_wall_activity_privacy_options', 'youzify_change_public_option' );
    function youzify_change_public_option( $options ) {
    
    	$options = array(
    
    		//'public' => array( 'title' => __( 'Public', 'youzify' ), 'icon' => 'fas fa-globe-asia' ),
    
    		'members' => array( 'title' => __( 'Members', 'youzify' ), 'icon' => 'fas fa-users' ),
    		
    		'onlyme' => array( 'title' => __( 'Only Me', 'youzify' ), 'icon' => 'fas fa-lock' ),
    
    		'friends' => array( 'title' => __( 'My Friends', 'youzify' ), 'icon' => 'fas fa-user-friends' ),
    		
    
    	);
    	
    	return $options;
    
    }

    The keys “public”.”onlyme”, “friends”, and “members” are hard coded into the privacy code so probably best not to change those. The default icon is still the globe when the page is first loaded with the members section at the top of the list, but I think that can be changed in a stylesheet or possibly a theme file override.

    The reason I didn’t just rename “Public” and remove the members option is because if the community ever goes public, we don’t want those posts that were destined for the private community to be shown. This way they are still tagged as “members”.

  • You must be logged in to reply to this topic.
Skip to toolbar