Digital Sovereignty for everyone

Site privacy

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.php answers the lh_site_privacy_user_is_member filter with true when user_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 inside user_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.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.