__( 'Agent publishing', 'acadium-agent-publisher' ), 'description' => __( 'Draft, review, publish and update posts, upload images and look up taxonomy terms, within the rules set by the site owner.', 'acadium-agent-publisher' ), ) ); } /** * Annotations are hints for clients, but core's Abilities REST API also * derives the HTTP method from them: readonly → GET, destructive AND * idempotent → DELETE (input only from the query string), otherwise POST. * Write abilities therefore never combine destructive with idempotent, * so they all take a JSON body via POST. * * Exposure flags. `public` is the WordPress 7.1+ switch (it also seeds * show_in_rest); `mcp.public` and `show_in_rest` make the same intent * explicit on 6.9 / 7.0 and for the MCP Adapter. */ private static function meta( $readonly, $destructive, $idempotent ) { return array( 'annotations' => array( 'readonly' => $readonly, 'destructive' => $destructive, 'idempotent' => $idempotent, ), 'public' => true, 'show_in_rest' => true, 'mcp' => array( 'public' => true ), ); } public static function register_abilities() { $post_types = self::post_types(); $meta_keys = self::meta_keys(); $post_fields = array( 'title' => array( 'type' => 'string', 'description' => 'Title (plain text).' ), 'content' => array( 'type' => 'string', 'description' => 'Body as HTML. Use the markup the site\'s editor produces for this type (see get-capabilities > content_types > block_editor): plain HTML (

,

,