-
Notifications
You must be signed in to change notification settings - Fork 0
/
oe-ajax-filter-search.php
82 lines (59 loc) · 2.01 KB
/
oe-ajax-filter-search.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
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
<?php
/**
* @package oe-ajax-filter-search
* @version 1.0.3
*/
/*
Plugin Name: OE Ajax Filter Search
Plugin URI: http://streetcarpro.com
Description: fork from Thomas Dintrone.
Text Domain: ajax-filter-search
Author: Thomas Dintrone
Twitter: @streetcarpro
Author URI: http://streetcarpro.com
Version: 1.0.3
License: GPL
Copyright: Drive Media, Inc.
*/
/*******************************************************************
* DEFINE CONSTANTS
********************************************************************/
define('AFS_VERSION', '2');
define('AFS_RELEASE', 'Sept 05, 2017');
define('AFS_URL', 'http://open-ecommerce.org');
/*******************************************************************
* CORE & INITIALIZER
********************************************************************/
if( !class_exists('AFSSettings') ) :
class AFSSettings {
function __construct(){
/* GLOBAL VARIABLES */
define('AFS_SUB', 'afs');
define('AFS_SETTINGS', 'afs_settings');
/* OPTIONS VARIABLES */
define('AFS_PAGE_TITLE', 'Ajax Filter Search');
define('AFS_MENU_TAB_TITLE', 'Ajax Filter Search');
define('AFS_CAPABILITIES', 'manage_options'); // (https://codex.wordpress.org/Roles_and_Capabilities#Capabilities)
define('AFS_MENU_SLUG', 'ajax-filter-search');
define('AFS_CALLBACK', 'afs_options_page'); // The name of the function that displays the HTML
define('AFS_PLUGIN_PATH', plugin_dir_path(__FILE__));
define('AFS_PLUGIN_FILE', plugin_basename( __FILE__ ));
define('AFS_PLUGIN_URL', plugins_url('', __FILE__));
define('AFS_PLUGIN_ADMIN_URL', plugins_url('admin/', __FILE__));
/* LOAD NECESSARY FILES */
// Admin Files
require_once (dirname(__FILE__).'/admin/settings.php');
// Core Files
require_once (dirname(__FILE__).'/core/includes/functions.php');
require_once (dirname(__FILE__).'/core/includes/shortcodes.php');
}
}
// TURN ON THE SETTINGS
function AFSinit(){
global $afs;
if(!isset($afs)) { $afs = new AFSSettings(); }
return $afs;
}
AFSinit();
endif;
?>