Skip to content

Conversation

@priethor
Copy link
Contributor

@priethor priethor commented Nov 7, 2025

What

Adds integration with the WordPress Abilities API for SCF post type management.

Why

It enables programmatic access to SCF post type operations for external tools, like AI agents if using MCP.

How

  • Created SCF_Abilities_Integration class that loads the different entity ability files (for now only post types) if the Abilities API is available
  • Implemented SCF_Post_Type_Abilities with 8 complete abilities wrapping internal SCF functions:
    • List, Get, Create, Update, Delete, Duplicate, Export, Import post types
  • Added SCF identifier schema for consistent API typing
    • This comes in handy when an id parameter can be an internal WP ID, a slug, or a key.
  • Adds a new global function that checks if the current user has SCF capabilities, which is used in the abilities' permission callbacks.
    • As opposed to acf_current_user_can_admin , which requires the show_admin setting to be available, we want the abilities to be available even if the admin menus are hidden.
    • Follow-up: add a similar setting and related filters to enable/disable the abilities.

Testing Instructions

  1. Run this branch on WP 6.9 beta or on a previous version and the Abilities API plugin >= v0.4.0 installed
  2. Install an MCP plugin for WordPress, like this MCP Adapter
  3. Connect to the MCP and ask an AI agent to perform CRUD operations on Post Types

@priethor priethor self-assigned this Nov 7, 2025
@priethor priethor added the [Type] Enhancement New feature or request label Nov 7, 2025
@priethor priethor marked this pull request as ready for review November 8, 2025 22:02
@priethor priethor merged commit 4fb3b1f into trunk Nov 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants