@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/?post_type=lh-portfolio&#038;p=147048>
  a sioc:Post ;
  dc:title "Admin interfaces" ;
  dcterms:identifier 147048 ;
  dc:modified "2026-09-05T12:05:05Z"^^xsd:dateTime ;
  dc:created "2026-09-05T02:52:52Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-polls/admin-interfaces/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<h2>Poll Settings metabox</h2>
<ul>
<li><strong>Allow multiple</strong> (_lh_polls_allow_multiple) &#8211; single vs multi-select voting; gates change-vote (single-choice only).</li>
<li><strong>Closed &#8211; voting disabled, results still shown</strong> (_lh_polls_voting_closed) &#8211; manual toggle read by poll_is_open(). Independent of post_status, which continues to govern visibility per the platform&#8217;s normal rules. No scheduling exists yet &#8211; opening/closing is always a deliberate admin action.</li>
<li><strong>Required voters</strong> &#8211; paste one email per line; resolved to users via get_user_by(&#8217;email&#8217;, &#8230;) on save. Unmatched addresses are reported via admin notice and not saved.</li>
<li><strong>Reminder email template</strong> &#8211; select a published bp-email post (managed under Emails if BuddyPress active). Supports tokens {{poll.title}}, {{poll.url}}, {{recipient.name}}.</li>
</ul>
<h2>Options metabox</h2>
<p>Add/edit/delete options; add one at a time via New option field, saved on Update Post. Options with existing votes cannot be deleted (shown as &#8216;Has votes&#8217;). A poll needs at least two options before it can be published &#8211; attempting to publish with fewer forces status back to draft with an admin notice.</p>
<h2>Votes metabox</h2>
<p>Per-option vote breakdown: voter name (linked to BuddyPress profile if active, else WP user edit screen), comment text, date, delete link. Includes a Required Voters section (count voted/not-voted, linked names, Send reminder button when a template is set) and an Add Vote Manually form (option/user/comment, writes via LH_Polls_Comments::insert_vote()). Gated to edit_post capability for the poll.</p>
<h2>Front-end voting UI</h2>
<p>Rendered by LH_Polls_Embed::render_poll_markup(), shared between the embed (iframe/oEmbed) view and the standalone singular view. Voting is a plain HTML form POST to the poll&#8217;s own permalink (no AJAX), handled by LH_Polls_Voting::handle_form_post() on template_redirect, redirecting back with a ?lh_poll_msg feedback parameter. Single-choice polls show a Change vote option to users who&#8217;ve already voted. Users with edit_post capability see an Edit poll link beneath the vote total.</p>
<h2>Embedding</h2>
<p>Via the Poll block: pick an existing poll or create a new draft poll inline (auto-selected). The block renders server-side via oEmbed against the poll&#8217;s own permalink with ?embed=true, producing a zero-theme-dependency iframe document. A draft poll shows &#8216;(Draft)&#8217; in the editor and &#8216;This poll is not yet published.&#8217; on the front end, with an Edit poll link for users who can edit it.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Poll Settings metabox

Allow multiple (_lh_polls_allow_multiple) &#8211; single vs multi-select voting; gates change-vote (single-choice only).
Closed &#8211; voting disabled, results still shown (_lh_polls_voting_closed) &#8211; manual toggle read by poll_is_open(). Independent of post_status, which continues to govern visibility per the platform&#8217;s normal rules. No scheduling exists yet &#8211; opening/closing is always a deliberate admin action.
Required voters &#8211; paste one email per line; resolved to users via get_user_by(&#8217;email&#8217;, &#8230;) on save. Unmatched addresses are reported via admin notice and not saved.
Reminder email template &#8211; select a published bp-email post (managed under Emails if BuddyPress active). Supports tokens {{poll.title}}, {{poll.url}}, {{recipient.name}}.

Options metabox
Add/edit/delete options; add one at a time via New option field, saved on Update Post. Options with existing votes cannot be deleted (shown as &#8216;Has votes&#8217;). A poll needs at least two options before it can be published &#8211; attempting to publish with fewer forces status back to draft with an admin notice.
Votes metabox
Per-option vote breakdown: voter name (linked to BuddyPress profile if active, else WP user edit screen), comment text, date, delete link. Includes a Required Voters section (count voted/not-voted, linked names, Send reminder button when a template is set) and an Add Vote Manually form (option/user/comment, writes via LH_Polls_Comments::insert_vote()). Gated to edit_post capability for the poll.
Front-end voting UI
Rendered by LH_Polls_Embed::render_poll_markup(), shared between the embed (iframe/oEmbed) view and the standalone singular view. Voting is a plain HTML form POST to the poll&#8217;s own permalink (no AJAX), handled by LH_Polls_Voting::handle_form_post() on template_redirect, redirecting back with a ?lh_poll_msg feedback parameter. Single-choice polls show a Change vote option to users who&#8217;ve already voted. Users with edit_post capability see an Edit poll link beneath the vote total.
Embedding
Via the Poll block: pick an existing poll or create a new draft poll inline (auto-selected). The block renders server-side via oEmbed against the poll&#8217;s own permalink with ?embed=true, producing a zero-theme-dependency iframe document. A draft poll shows &#8216;(Draft)&#8217; in the editor and &#8216;This poll is not yet published.&#8217; on the front end, with an Edit poll link for users who can edit it.
""" ;
  sioc:topic <https://lhero.org/lh_portfolio-type/doc-section/>, <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/lh_portfolio-type/doc-section/> rdfs:seeAlso <https://lhero.org/lh_portfolio-type/doc-section/?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> .
