-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-search-statistics.php
41 lines (33 loc) · 1.19 KB
/
wp-search-statistics.php
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
<?php
/**
* Plugin Name: WP Search Statistics
* Plugin URI:
* Description: Enhanced search with synonyms (if using ElasticPress) and statistics
* Version: 1.0.2
* Author: Kristoffer Svanmark
* Author URI:
* License: MIT
* License URI: https://opensource.org/licenses/MIT
* Text Domain: wp-search-statistics
* Domain Path: /languages
*/
// Protect agains direct file access
if (! defined('WPINC')) {
die;
}
//Default value of constants
if (!defined('LOCAL_SITE_STATS')) {
define('LOCAL_SITE_STATS', false);
}
define('SEARCHSTATISTICS_PATH', plugin_dir_path(__FILE__));
define('SEARCHSTATISTICS_URL', plugins_url('', __FILE__));
define('SEARCHSTATISTICS_TEMPLATE_PATH', SEARCHSTATISTICS_PATH . 'templates/');
load_plugin_textdomain('wp-search-statistics', false, plugin_basename(dirname(__FILE__)) . '/languages');
// Autoload from plugin
if (file_exists(SEARCHSTATISTICS_PATH . 'vendor/autoload.php')) {
require_once SEARCHSTATISTICS_PATH . 'vendor/autoload.php';
}
require_once SEARCHSTATISTICS_PATH . 'Public.php';
// Start application
new SearchStatistics\App();
register_activation_hook(__FILE__, '\SearchStatistics\App::install');