这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/Core/McpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function instance(): self {

// In WP-CLI context, initialize immediately so commands have access to servers
if ( defined( 'WP_CLI' ) && constant( 'WP_CLI' ) ) {
self::$instance->init();
add_action( 'init', array( self::$instance, 'init' ), 20 );
} else {
// Initialize for REST API requests with reasonable priority
add_action( 'rest_api_init', array( self::$instance, 'init' ), 15 );
Expand Down Expand Up @@ -115,7 +115,7 @@ public function create_server( string $server_id, string $server_route_namespace
return new \WP_Error(
'invalid_error_handler',
sprintf(
/* translators: %s: error handler class name */
/* translators: %s: error handler class name */
esc_html__( 'Error handler class "%s" does not exist.', 'mcp-adapter' ),
esc_html( $error_handler )
)
Expand Down