-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathonesearch.php
More file actions
63 lines (53 loc) · 1.38 KB
/
onesearch.php
File metadata and controls
63 lines (53 loc) · 1.38 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
<?php
/**
* Plugin Name: OneSearch
* Description: This plugin allows you to run multi-index, multi-site searches seamlessly, without duplicate or missing results.
* Author: rtCamp
* Plugin URI: https://rtcamp.com
* Author URI: https://rtcamp.com
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: onesearch
* Domain Path: /languages
* Version: 1.0.1
* Requires PHP: 8.0
* Requires at least: 6.8
* Tested up to: 6.9
*
* @package OneSearch
*/
declare (strict_types = 1);
namespace OneSearch;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit();
/**
* Define the plugin constants.
*/
function constants(): void {
/**
* Version of the plugin.
*/
define( 'ONESEARCH_VERSION', '1.0.1' );
/**
* Root path to the plugin directory.
*/
define( 'ONESEARCH_DIR', plugin_dir_path( __FILE__ ) );
/**
* Root URL to the plugin directory.
*/
define( 'ONESEARCH_URL', plugin_dir_url( __FILE__ ) );
/**
* The plugin basename.
*/
define( 'ONESEARCH_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
}
constants();
// If autoloader failed, we cannot proceed.
require_once __DIR__ . '/inc/Autoloader.php';
if ( ! \OneSearch\Autoloader::autoload() ) {
return;
}
// Load the plugin.
if ( class_exists( '\OneSearch\Main' ) ) {
\OneSearch\Main::instance();
}