-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.php
More file actions
executable file
·106 lines (88 loc) · 3.59 KB
/
Copy pathinit.php
File metadata and controls
executable file
·106 lines (88 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/**
* Ultimate FAQ Solution Plugin for WordPress.
*
* @package ultimate-faq-solution
* @link https://github.com/Braintum/ultimate-faq-solution
* @author Md. Mahedi Hasan <mahedihasannoman@gmail.com>
* @copyright 2020-2026 Braintum
* @license GPL v2 or later
*
* Plugin Name: Ultimate FAQ Solution
* Version: 1.8.3
* Plugin URI: https://www.ultimatefaqsolution.com/
* Description: A WordPress plugin to create, organize, and display FAQs with responsive layouts and styles.
* Author: braintum
* Author URI: https://www.braintum.com
* Text Domain: ufaqsw
* Domain Path: /languages/
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses
* Requires at least: 5.1
* Tested up to: 7.0
*
* Requires PHP: 7.4
*/
if ( ! function_exists( 'add_action' ) ) {
echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
exit;
}
/*
* Define some global constants
* Use `plugin_dir_path` and `plugin_dir_url` only when necessary to reduce overhead.
*/
define( 'UFAQSW_VERSION', '1.8.3' );
define( 'UFAQSW_PRFX', 'ufaqsw' );
define( 'UFAQSW_BASE', plugin_basename( __FILE__ ) );
define( 'UFAQSW__PLUGIN_DIR', __DIR__ . '/' );
define( 'UFAQSW__PLUGIN_URL', plugins_url( '/', __FILE__ ) );
define( 'UFAQSW_ASSETS_URL', UFAQSW__PLUGIN_URL . 'assets/' );
define( 'UFAQSW__PLUGIN_FILE', __FILE__ );
// Autoload dependencies only when needed.
if ( file_exists( UFAQSW__PLUGIN_DIR . 'vendor/autoload.php' ) ) {
require_once UFAQSW__PLUGIN_DIR . 'vendor/autoload.php';
}
// Load general functions and utilities.
require_once UFAQSW__PLUGIN_DIR . 'inc/functions/general.php';
// Load cpt.
require_once UFAQSW__PLUGIN_DIR . 'inc/admin/class-directory-post-type.php';
// Load admin-specific files only in the admin area.
if ( is_admin() ) {
include_once UFAQSW__PLUGIN_DIR . 'inc/admin/class-faq-group-sorting.php';
include_once UFAQSW__PLUGIN_DIR . 'inc/admin/RegisterAdminPages.php';
include_once UFAQSW__PLUGIN_DIR . 'inc/admin/chatbot.php';
include_once UFAQSW__PLUGIN_DIR . 'inc/admin/installation.php';
include_once UFAQSW__PLUGIN_DIR . 'inc/ai-writing-assistant/init.php';
include_once UFAQSW__PLUGIN_DIR . 'inc/ExportImport/bootstrap.php';
Mahedi\UltimateFaqSolution\Admin\RegisterAdminPages::get_instance();
Mahedi\UltimateFaqSolution\ExportImport\bootstrap();
}
// Lazy-load classes to improve performance.
add_action(
'plugins_loaded',
function () {
Mahedi\UltimateFaqSolution\Assets::get_instance();
Mahedi\UltimateFaqSolution\Shortcodes::get_instance();
Mahedi\UltimateFaqSolution\Product_Tab::get_instance();
// Structured data support for FAQs.
new Mahedi\UltimateFaqSolution\SEO();
new Mahedi\UltimateFaqSolution\Chatbot();
// REST API.
new Mahedi\UltimateFaqSolution\Upgrader();
// Appearance actions for custom post type.
new Mahedi\UltimateFaqSolution\AppearanceActions();
// FAQ group actions for custom post type.
new Mahedi\UltimateFaqSolution\FAQGroupActions();
load_plugin_textdomain( 'ufaqsw', false, dirname( plugin_basename( __FILE__ ) ) . '/inc/languages' );
// Deactivation feedback.
new Mahedi\UltimateFaqSolution\DeactivationFeedback();
}
);
// REST API.
new Mahedi\UltimateFaqSolution\Rest();
// Load utility files only when necessary.
require_once UFAQSW__PLUGIN_DIR . 'inc/functions/actions_and_filters.php';
require_once UFAQSW__PLUGIN_DIR . 'block/block.php';
// Register activation and deactivation hooks.
register_activation_hook( __FILE__, array( 'UFAQSW_installation', 'plugin_activation' ) );
register_deactivation_hook( __FILE__, array( 'UFAQSW_installation', 'plugin_deactivation' ) );