| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: BetterDocs |
| 5 |
* Plugin URI: https://betterdocs.co/ |
| 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: 2.0.7 |
| 8 |
* Author: WPDeveloper |
| 9 |
* Author URI: https://wpdeveloper.com |
| 10 |
* License: GPL-3.0+ |
| 11 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt |
| 12 |
* Text Domain: betterdocs |
| 13 |
* Domain Path: /languages |
| 14 |
*/ |
| 15 |
|
| 16 |
// If this file is called directly, abort. |
| 17 |
if (!defined('WPINC')) { |
| 18 |
die; |
| 19 |
} |
| 20 |
|
| 21 |
define('BETTERDOCS_VERSION', '2.0.7'); |
| 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__)); |
| 28 |
|
| 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 |
/** |
| 34 |
* WPML compatibility with Polylang |
| 35 |
*/ |
| 36 |
include_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
| 37 |
if (is_plugin_active('polylang/polylang.php')) { |
| 38 |
define('PLL_WPML_COMPAT', false); |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* The code that runs during plugin activation. |
| 43 |
* This action is documented in includes/class-betterdocs-activator.php |
| 44 |
*/ |
| 45 |
function activate_betterdocs() |
| 46 |
{ |
| 47 |
require_once plugin_dir_path(__FILE__) . 'includes/class-betterdocs-activator.php'; |
| 48 |
BetterDocs_Activator::activate(); |
| 49 |
} |
| 50 |
add_action('activate_' . plugin_basename(__FILE__), 'activate_betterdocs'); |
| 51 |
|
| 52 |
|
| 53 |
/** |
| 54 |
* The code that runs during plugin deactivation. |
| 55 |
* This action is documented in includes/class-betterdocs-deactivator.php |
| 56 |
*/ |
| 57 |
function deactivate_betterdocs() |
| 58 |
{ |
| 59 |
require_once plugin_dir_path(__FILE__) . 'includes/class-betterdocs-deactivator.php'; |
| 60 |
BetterDocs_Deactivator::deactivate(); |
| 61 |
} |
| 62 |
|
| 63 |
register_deactivation_hook(__FILE__, 'deactivate_betterdocs'); |
| 64 |
|
| 65 |
/** |
| 66 |
* The core plugin class that is used to define internationalization, |
| 67 |
* admin-specific hooks, and public-facing site hooks. |
| 68 |
*/ |
| 69 |
require plugin_dir_path(__FILE__) . 'includes/class-betterdocs.php'; |
| 70 |
|
| 71 |
/** |
| 72 |
* Begins execution of the plugin. |
| 73 |
* |
| 74 |
* Since everything within the plugin is registered via hooks, |
| 75 |
* then kicking off the plugin from this point in the file does |
| 76 |
* not affect the page life cycle. |
| 77 |
* |
| 78 |
* @since 1.0.0 |
| 79 |
*/ |
| 80 |
function run_betterdocs() |
| 81 |
{ |
| 82 |
|
| 83 |
$plugin = new BetterDocs(); |
| 84 |
$plugin->run(); |
| 85 |
do_action('betterdocs_init'); |
| 86 |
} |
| 87 |
run_betterdocs(); |
| 88 |
|