Site-wide privacy belongs to LH Site Privacy: the privacy levels, Settings > Reading, the gate, the notices and the abilities. LH Membership only tells it who counts as a member, which makes LH Site Privacy’s Members level available on every site running LH Membership.
Who is a member
Anyone who can read restricted content on the site: users who hold a member type there, plus editors and above. A members-only site and restricted posts therefore always agree on who gets in. Administrators and super admins always pass LH Site Privacy’s gate anyway.
How it works
includes/lh-membership-site-privacy-class.phpanswers thelh_site_privacy_user_is_memberfilter with true whenuser_can( $user_id, 'read_restricted_posts' ). That capability is granted at runtime by the restricted status from the member-type taxonomy, so there is one definition of eligibility and nothing is cached.- It answers only for the current site. A question about another site is passed through untouched, since that site’s roles and terms are not loaded.
- Calling
user_can()is safe here because the filter never runs insideuser_has_cap.
History
Before 2.93.0 LH Membership had its own private-site gate (lh-membership-private-site-class.php) for the logged-in, site users and administrators levels. It was retired when LH Site Privacy took over, because with both active it added duplicate options to Settings > Reading and duplicate notices.