Support » Plugin: Stream » Hide Stream from a specific list of users

  • Resolved Kashif Rafique

    (@logichub)


    I tried to follow your guide available here, with a little modification. I would like to use current user ID instead of current user login, but it is not working for me.

    I put following code in a custom plugin:

    function my_site_hide_stream_from_users() {
    	$user_ids = array( 2 );
    	$current_uid = get_current_user_id();
    
    	if ( isset( $current_uid ) && in_array( $current_uid, $user_ids ) ) { return true; }
    	return false;
    }
    add_filter( 'wp_stream_disable_admin_access', 'my_site_hide_stream_from_users' );

    What am I missing here?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Hide Stream from a specific list of users’ is closed to new replies.