You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->add_ability( self::INTERNAL_PREFIX . 'save-user', 'Save User', 'Create or update a WordPress user', $user_write_schema, function ( $params ) {
52
+
return$this->save_user( $params );
59
53
}, false, 'edit_users' );
60
54
$this->add_ability( self::INTERNAL_PREFIX . 'delete-user', 'Delete User', 'Delete a WordPress user by ID', $user_get_schema, function ( $params ) {
61
55
return$this->delete_user( (int) $params['id'] );
@@ -76,7 +70,7 @@ private function add_site_abilities() {
76
70
$this->add_ability( self::INTERNAL_PREFIX . 'get-general-settings', 'Get General Settings', 'Get WordPress general site settings', $this->schema(), function () {
77
71
return$this->get_general_settings();
78
72
}, true, 'manage_options' );
79
-
$this->add_ability( self::INTERNAL_PREFIX . 'update-general-settings', 'Update General Settings', 'Update WordPress general site settings', $settings_schema, function ( $params ) {
73
+
$this->add_ability( self::INTERNAL_PREFIX . 'save-general-settings', 'Save General Settings', 'Save WordPress general site settings', $settings_schema, function ( $params ) {
80
74
return$this->update_general_settings( $params );
81
75
}, false, 'manage_options' );
82
76
$this->add_ability( self::INTERNAL_PREFIX . 'get-site-info', 'Get Site Info', 'Get detailed site information', $this->schema(), function () {
assert_same( array( 'page' ), array_column( $public_hierarchical_post_types['message']['post_types'], 'slug' ), 'Post type list should pass filters through to get_post_types().' );
assert_same( 58, count( $wp_ability_names ), 'Expected all abilities to be available for the MCP adapter.' );
299
+
assert_same( 56, count( $wp_ability_names ), 'Expected all abilities to be available for the MCP adapter.' );
302
300
assert_true( in_array( 'wp-forge/search-content', $wp_ability_names, true ), 'Adapter ability list should use WordPress ability names.' );
303
301
304
302
$abilities->register_wordpress_abilities();
305
-
assert_same( 58, count( $registered_abilities ), 'Expected every ability to be registered with the WordPress Abilities API.' );
303
+
assert_same( 56, count( $registered_abilities ), 'Expected every ability to be registered with the WordPress Abilities API.' );
306
304
assert_true( isset( $registered_abilities['wp-forge/search-content'] ), 'Content search should be registered with the WordPress Abilities API.' );
307
305
assert_same( 'Search and filter content for any registered post type', $registered_abilities['wp-forge/search-content']['description'], 'Registered ability should preserve descriptions.' );
308
306
assert_same( true, $registered_abilities['wp-forge/search-content']['meta']['show_in_rest'], 'Registered abilities should be exposed through the Abilities REST API.' );
@@ -333,7 +331,7 @@ public function create_server() {
333
331
assert_same( 'mcp', $adapter->args[1], 'Adapter server should keep the existing REST namespace.' );
334
332
assert_same( 'wp-forge', $adapter->args[2], 'Adapter server should keep the existing REST route.' );
335
333
assert_same( 'WordPress MCP', $adapter->args[3], 'Adapter server should preserve the server name.' );
336
-
assert_same( 58, count( $adapter->args[9] ), 'Adapter server should expose every registered ability.' );
334
+
assert_same( 56, count( $adapter->args[9] ), 'Adapter server should expose every registered ability.' );
337
335
assert_true( in_array( 'wp-forge/search-content', $adapter->args[9], true ), 'Adapter server should expose content search.' );
0 commit comments