@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=146683>
  a sioc:Post ;
  dc:title "MCP ability" ;
  dcterms:identifier 146683 ;
  dc:modified "2026-08-31T22:14:11Z"^^xsd:dateTime ;
  dc:created "2026-08-31T22:14:11Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-copy-to-draft/mcp-ability/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<p>Registered only if the WordPress Abilities API (<code>wp_register_ability()</code>) is present; otherwise silently skipped.</p>
<p><strong>Category:</strong> <code>lh-copy-to-draft</code> (&#8220;Copy to Draft&#8221;)</p>
<h2>lh-copy-to-draft/copy-post</h2>
<ul>
<li><strong>Permission:</strong> <code>edit_posts</code> baseline gate; each item is additionally checked against <code>edit_post</code> for that specific post ID inside the handler (same capability model as the bulk action and single-copy link &#8212; no <code>install_plugins</code> gate, by design).</li>
<li><strong>Input:</strong> <code>items</code> &#8212; array of <code>{ post_id: int, custom_overrides?: object }</code>. One entry per post to copy; <code>custom_overrides</code> is optional per item and is forwarded to <code>lh_copy_to_draft_after_duplicate_post</code> for that post as a plain PHP array at every nesting level (no <code>stdClass</code>, regardless of how it arrives) &#8212; this ability does not otherwise read or validate its contents.</li>
<li><strong>Output:</strong> <code>{ results: [{ post_id, success, new_post_id?, edit_url?, error? }], copied: int, skipped: int }</code>.</li>
<li><strong>Not destructive</strong> &#8212; creates new drafts only, never modifies or deletes the source post &#8212; so it does not use the two-step confirm pattern.</li>
<li>Unlike the list-table bulk action, this ability does not redirect anywhere; it always returns the full per-item result set regardless of how many items were requested.</li>
</ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Registered only if the WordPress Abilities API (wp_register_ability()) is present; otherwise silently skipped.
Category: lh-copy-to-draft (&#8220;Copy to Draft&#8221;)
lh-copy-to-draft/copy-post

Permission: edit_posts baseline gate; each item is additionally checked against edit_post for that specific post ID inside the handler (same capability model as the bulk action and single-copy link &#8212; no install_plugins gate, by design).
Input: items &#8212; array of { post_id: int, custom_overrides?: object }. One entry per post to copy; custom_overrides is optional per item and is forwarded to lh_copy_to_draft_after_duplicate_post for that post as a plain PHP array at every nesting level (no stdClass, regardless of how it arrives) &#8212; this ability does not otherwise read or validate its contents.
Output: { results: [{ post_id, success, new_post_id?, edit_url?, error? }], copied: int, skipped: int }.
Not destructive &#8212; creates new drafts only, never modifies or deletes the source post &#8212; so it does not use the two-step confirm pattern.
Unlike the list-table bulk action, this ability does not redirect anywhere; it always returns the full per-item result set regardless of how many items were requested.

""" ;
  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> .
