PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.1
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.1
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / vendor / wp-media / mcp-oauth / inc / Context.php

Context.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.1, at vendor/wp-media/mcp-oauth/inc/Context.php

28 lines 944 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 declare(strict_types=1);
3
4 namespace WPMedia\MCP\OAuth;
5
6 class Context {
7 /**
8 * Determines whether the MCP OAuth server is enabled.
9 *
10 * @return bool True when the OAuth server (rewrite rules, endpoints,
11 * discovery documents, transport) should be registered; false otherwise.
12 */
13 public function is_enabled(): bool {
14 $enabled = apply_filters_deprecated( 'rocket_mcp_oauth_server_enabled', [ true ], '1.0.1', 'wpmedia_mcp_oauth_server_enabled' );
15
16 /**
17 * Filters whether the MCP OAuth server is enabled.
18 *
19 * When `false`, the host plugin does not register the OAuth rewrite rules
20 * or respond to any /oauth/* endpoint or /.well-known discovery request,
21 * and does not register the MCP OAuth transport server.
22 *
23 * @param bool $enabled Whether the MCP OAuth server is enabled. Default true.
24 */
25 return wpm_apply_filters_typed( 'boolean', 'wpmedia_mcp_oauth_server_enabled', $enabled );
26 }
27 }
28