| @@ -83,8 +83,11 @@ | ||
| 83 | 83 | * @since 2.6.0 |
| 84 | 84 | * @return void |
| 85 | 85 | */ |
| 86 | 86 | public function register_mcp_server( $adapter ) { |
| 87 | + // wp_get_abilities() is a WP 6.9+ Abilities API function. This method is only hooked | |
| 88 | + // when mcp_adapter_enabled() is true, which itself requires function_exists( 'wp_register_ability' ), | |
| 89 | + // so it is inert on WP 6.4-6.8. Plugin Check's static WP-version check reports a false positive here. | |
| 87 | 90 | $abilities = wp_get_abilities(); |
| 88 | 91 | $tools = []; |
| 89 | 92 | |
| 90 | 93 | foreach ( $abilities as $ability ) { |
| @@ -121,8 +124,11 @@ | ||
| 121 | 124 | * @since 2.5.2 |
| 122 | 125 | * @return void |
| 123 | 126 | */ |
| 124 | 127 | public function register_category() { |
| 128 | + // wp_has_ability_category() / wp_register_ability_category() are WP 6.9+ Abilities API | |
| 129 | + // functions, each called only behind its own function_exists() guard, so they are inert | |
| 130 | + // on WP 6.4-6.8. Plugin Check's static WP-version check reports false positives here. | |
| 125 | 131 | if ( function_exists( 'wp_has_ability_category' ) && wp_has_ability_category( 'sureforms' ) ) { |
| 126 | 132 | return; |
| 127 | 133 | } |
| 128 | 134 | |
| @@ -197,8 +203,11 @@ | ||
| 197 | 203 | continue; |
| 198 | 204 | } |
| 199 | 205 | |
| 200 | 206 | // Skip abilities already registered by zipwp-mcp. |
| 207 | + // wp_has_ability() is a WP 6.9+ Abilities API function, called only behind its | |
| 208 | + // function_exists() guard, so it is inert on WP 6.4-6.8. Plugin Check's static | |
| 209 | + // WP-version check reports a false positive here. | |
| 201 | 210 | if ( function_exists( 'wp_has_ability' ) && wp_has_ability( $ability->get_id() ) ) { |
| 202 | 211 | continue; |
| 203 | 212 | } |
| 204 | 213 | |