@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-membership/>
  a sioc:Post ;
  dc:title "Site privacy" ;
  dcterms:identifier 150421 ;
  dc:modified "2026-10-15T12:50:28Z"^^xsd:dateTime ;
  dc:created "2026-10-15T12:50:28Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-membership/site-privacy/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-membership/">LH Membership</a></li></ul>
<p class="wp-block-paragraph">Site-wide privacy belongs to <a href="/portfolio/lh-site-privacy/">LH Site Privacy</a>: the privacy levels, Settings &gt; Reading, the gate, the notices and the abilities. LH Membership only tells it who counts as a member, which makes LH Site Privacy&#8217;s <strong>Members</strong> level available on every site running LH Membership.</p>



<h2 class="wp-block-heading">Who is a member</h2>



<p class="wp-block-paragraph">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&#8217;s gate anyway.</p>



<h2 class="wp-block-heading">How it works</h2>



<ul class="wp-block-list">
<li><code>includes/lh-membership-site-privacy-class.php</code> answers the <code>lh_site_privacy_user_is_member</code> filter with true when <code>user_can( $user_id, 'read_restricted_posts' )</code>. 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.</li>



<li>It answers only for the current site. A question about another site is passed through untouched, since that site&#8217;s roles and terms are not loaded.</li>



<li>Calling <code>user_can()</code> is safe here because the filter never runs inside <code>user_has_cap</code>.</li>
</ul>



<h2 class="wp-block-heading">History</h2>



<p class="wp-block-paragraph">Before 2.93.0 LH Membership had its own private-site gate (<code>lh-membership-private-site-class.php</code>) 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 &gt; Reading and duplicate notices.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Membership
Site-wide privacy belongs to LH Site Privacy: the privacy levels, Settings &gt; Reading, the gate, the notices and the abilities. LH Membership only tells it who counts as a member, which makes LH Site Privacy&#8217;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&#8217;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&#8217;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 &gt; Reading and duplicate notices.
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
