PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 1.7.1
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v1.7.1
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
← All changes | betterdocs.php +50 -43 4.8.21.7.1 View file →
@@ -2,14 +2,12 @@
2 2
3 3 /**
4 4 * Plugin Name: BetterDocs
5 5 * Plugin URI: https://betterdocs.co/
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.8.2
8 - * Requires at least: 6.4
9 - * Requires PHP: 7.4
6 + * Description: Create stunning Knowledge base for your WordPress website and reduce support pressure with the help of BetterDocs. Get access to amazing templates and create fully customizable KB within minutes.
7 + * Version: 1.7.1
10 8 * Author: WPDeveloper
11 - * Author URI: https://wpdeveloper.com
9 + * Author URI: https://wpdeveloper.net
12 10 * License: GPL-3.0+
13 11 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
14 12 * Text Domain: betterdocs
15 13 * Domain Path: /languages
@@ -15,57 +13,66 @@
15 13 * Domain Path: /languages
16 14 */
17 15
18 16 // If this file is called directly, abort.
19 -use WPDeveloper\BetterDocs\Plugin;
17 +if (!defined('WPINC')) {
18 + die;
19 +}
20 20
21 -defined( 'ABSPATH' ) || exit;
21 +define('BETTERDOCS_VERSION', '1.7.1');
22 +define('BETTERDOCS_DIR_PATH', plugin_dir_path(__FILE__));
23 +define('BETTERDOCS_URL', plugin_dir_url(__FILE__));
24 +define('BETTERDOCS_PUBLIC_URL', BETTERDOCS_URL . 'public/');
25 +define('BETTERDOCS_ADMIN_URL', BETTERDOCS_URL . 'admin/');
26 +define('BETTERDOCS_FILE', __FILE__);
27 +define('BETTERDOCS_BASENAME', plugin_basename(__FILE__));
22 28
23 -define( 'BETTERDOCS_PLUGIN_FILE', __FILE__ );
29 +define('BETTERDOCS_ROOT_DIR_PATH', plugin_dir_path(__FILE__));
30 +define('BETTERDOCS_ADMIN_DIR_PATH', BETTERDOCS_ROOT_DIR_PATH . 'admin/');
31 +define('BETTERDOCS_PUBLIC_PATH', BETTERDOCS_ROOT_DIR_PATH . 'public/');
32 +/**
33 + * The code that runs during plugin activation.
34 + * This action is documented in includes/class-betterdocs-activator.php
35 + */
36 +function activate_betterdocs()
37 +{
38 + require_once plugin_dir_path(__FILE__) . 'includes/class-betterdocs-activator.php';
39 + BetterDocs_Activator::activate();
40 +}
41 +add_action('activate_' . plugin_basename(__FILE__), 'activate_betterdocs');
24 42
25 -require_once __DIR__ . '/includes/v2x-compatibility.php';
26 -require_once __DIR__ . '/vendor/autoload.php';
27 43
28 44 /**
29 - * Declare WooCommerce HPOS (custom order tables) compatibility. BetterDocs
30 - * never touches order storage, so this is a pure compatibility flag. Must run
31 - * on before_woocommerce_init — the Plugin bootstraps on `init`, which is too
32 - * late for WooCommerce to read the declaration.
45 + * The code that runs during plugin deactivation.
46 + * This action is documented in includes/class-betterdocs-deactivator.php
33 47 */
34 -add_action( 'before_woocommerce_init', function () {
35 - if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
36 - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
37 - 'custom_order_tables',
38 - BETTERDOCS_PLUGIN_FILE,
39 - true
40 - );
41 - }
42 -} );
48 +function deactivate_betterdocs()
49 +{
50 + require_once plugin_dir_path(__FILE__) . 'includes/class-betterdocs-deactivator.php';
51 + BetterDocs_Deactivator::deactivate();
52 +}
43 53
54 +register_deactivation_hook(__FILE__, 'deactivate_betterdocs');
55 +
44 56 /**
45 - * Initiate the BetterDocs Plugin
46 - *
47 - * @return Plugin
48 - * @since 2.5.0
57 + * The core plugin class that is used to define internationalization,
58 + * admin-specific hooks, and public-facing site hooks.
49 59 */
50 -function betterdocs(): Plugin {
51 - /**
52 - * Remove PRO Functionalities if pro is not updated.
53 - */
54 - if ( ! function_exists( 'betterdocs_pro' ) ) {
55 - remove_action( 'betterdocs_init', 'run_betterdocs_pro' );
56 - }
60 +require plugin_dir_path(__FILE__) . 'includes/class-betterdocs.php';
57 61
58 - return Plugin::get_instance();
59 -}
60 -
61 62 /**
62 - * Initialize BetterDocs (Free)
63 - * Here, begins the execution of the plugin.
63 + * Begins execution of the plugin.
64 64 *
65 - * Returns the main instance of BetterDocs.
65 + * Since everything within the plugin is registered via hooks,
66 + * then kicking off the plugin from this point in the file does
67 + * not affect the page life cycle.
66 68 *
67 - * @return Plugin
68 - * @since 3.0
69 + * @since 1.0.0
69 70 */
71 +function run_betterdocs()
72 +{
70 73
71 -betterdocs();
74 + $plugin = new BetterDocs();
75 + $plugin->run();
76 + do_action('betterdocs_init');
77 +}
78 +run_betterdocs();