'BETTERDOCS_PRO_FILE', 'betterdocs-ai-chatbot/betterdocs-ai-chatbot.php' => 'BETTERDOCS_CHATBOT_FILE', ]; $active = (array) get_option( 'active_plugins', [] ); if ( is_multisite() ) { $active = array_merge( $active, array_keys( (array) get_site_option( 'active_sitewide_plugins', [] ) ) ); } foreach ( $addons as $plugin => $loaded_constant ) { if ( in_array( $plugin, $active, true ) && ! defined( $loaded_constant ) ) { return true; } } return false; } /** * Initialize BetterDocs (Free) * Here, begins the execution of the plugin. * * Boots right away, as always, unless an active add-on is still to load; then * boots first thing on `plugins_loaded`, once every plugin has registered its * hooks, so any load order behaves like the default one. * * @since 3.0 */ if ( ! did_action( 'plugins_loaded' ) && betterdocs_has_pending_addons() ) { add_action( 'plugins_loaded', 'betterdocs', PHP_INT_MIN ); } else { betterdocs(); }