| 1 |
<?php |
| 2 |
/** |
| 3 |
* ZipWP Abilities Index - Register all zipwp namespace tools |
| 4 |
* |
| 5 |
* This class registers custom MCP tools for ZipWP integration |
| 6 |
* with both REST API and JS hook execution modes. |
| 7 |
* |
| 8 |
* @package zip-ai |
| 9 |
*/ |
| 10 |
|
| 11 |
namespace ZipAI\MCP\Classes\Abilities; |
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
/** |
| 19 |
* The Zipai_Abilities Class. |
| 20 |
* Registers all abilities under the zipwp namespace. |
| 21 |
*/ |
| 22 |
class Zipai_Abilities { |
| 23 |
|
| 24 |
use \ZipAI\MCP\Classes\Abilities\Ability_Loader; |
| 25 |
|
| 26 |
/** |
| 27 |
* Constructor of this class. |
| 28 |
* |
| 29 |
* @return void |
| 30 |
*/ |
| 31 |
public function __construct() { |
| 32 |
add_action( 'wp_abilities_api_init', array( $this, 'register_abilities' ), 10 ); |
| 33 |
} |
| 34 |
|
| 35 |
/** |
| 36 |
* Register all ZipWP abilities. |
| 37 |
* |
| 38 |
* @return void |
| 39 |
*/ |
| 40 |
public function register_abilities() { |
| 41 |
$this->load_abilities_from_dir( __DIR__, __NAMESPACE__ ); |
| 42 |
} |
| 43 |
} |
| 44 |
|