| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: BetterDocs |
| 5 | 5 | * Plugin URI: https://betterdocs.co/ |
| 6 | 6 | * Description: Create stunning Knowledge base & FAQs for your WordPress website and reduce support pressure with the help of BetterDocs. Get access to amazing templates and create fully customizable KB with AI Write. |
| 7 | - * Version: 4.6.1 | |
| 7 | + * Version: 4.9.2 | |
| 8 | 8 | * Requires at least: 6.4 |
| 9 | 9 | * Requires PHP: 7.4 |
| 10 | 10 | * Author: WPDeveloper |
| 11 | 11 | * Author URI: https://wpdeveloper.com |
| @@ -23,8 +23,31 @@ | ||
| 23 | 23 | define( 'BETTERDOCS_PLUGIN_FILE', __FILE__ ); |
| 24 | 24 | |
| 25 | 25 | require_once __DIR__ . '/includes/v2x-compatibility.php'; |
| 26 | 26 | require_once __DIR__ . '/vendor/autoload.php'; |
| 27 | + | |
| 28 | +/** | |
| 29 | + * Bundled MCP runtime (WordPress Abilities API + Parsedown). | |
| 30 | + * | |
| 31 | + * Loaded through the Jetpack Autoloader so that if the same library is also | |
| 32 | + * shipped by another plugin — or lands in WordPress core — the newest copy | |
| 33 | + * wins and loads once, with no fatal class collisions. This lets BetterDocs | |
| 34 | + * serve its MCP connector out of the box, without the standalone Abilities | |
| 35 | + * API plugin. See docs/mcp-server.md for the update procedure. | |
| 36 | + * | |
| 37 | + * On WordPress 7.1+, where core ships the Abilities API itself, Runtime::init() | |
| 38 | + * stands the bundled copy down so it stops duplicating core's REST routes and | |
| 39 | + * admin assets; on 6.4-7.0 the bundle is the only API and is left untouched. | |
| 40 | + * | |
| 41 | + * @since 4.9.0 | |
| 42 | + */ | |
| 43 | +$betterdocs_mcp_runtime = __DIR__ . '/dependencies/vendor/autoload_packages.php'; | |
| 44 | +if ( is_readable( $betterdocs_mcp_runtime ) ) { | |
| 45 | + require_once $betterdocs_mcp_runtime; | |
| 46 | + | |
| 47 | + \WPDeveloper\BetterDocs\Abilities\Runtime::init(); | |
| 48 | +} | |
| 49 | +unset( $betterdocs_mcp_runtime ); | |
| 27 | 50 | |
| 28 | 51 | /** |
| 29 | 52 | * Declare WooCommerce HPOS (custom order tables) compatibility. BetterDocs |
| 30 | 53 | * never touches order storage, so this is a pure compatibility flag. Must run |