-
Notifications
You must be signed in to change notification settings - Fork 18
/
themeisle-companion.php
119 lines (111 loc) · 3.14 KB
/
themeisle-companion.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link https://themeisle.com
* @since 1.0.0
* @package Orbit_Fox
*
* @wordpress-plugin
* Plugin Name: Orbit Fox Companion
* Plugin URI: https://orbitfox.com/
* Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
* Version: 2.10.39
* Author: Themeisle
* Author URI: https://orbitfox.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: themeisle-companion
* Domain Path: /languages
* WordPress Available: yes
* Requires License: no
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* The code that runs during plugin activation.
* This action is documented in core/includes/class-orbit-fox-activator.php
*/
function activate_orbit_fox() {
$obfx_activator = new Orbit_Fox_Activator();
$obfx_activator->activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in core/includes/class-orbit-fox-deactivator.php
*/
function deactivate_orbit_fox() {
$obfx_deactivator = new Orbit_Fox_Deactivator();
$obfx_deactivator->deactivate();
}
register_activation_hook( __FILE__, 'activate_orbit_fox' );
register_deactivation_hook( __FILE__, 'deactivate_orbit_fox' );
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function run_orbit_fox() {
define( 'OBFX_URL', plugins_url( '/', __FILE__ ) );
define( 'OBX_PATH', dirname( __FILE__ ) );
$plugin = new Orbit_Fox();
$plugin->run();
$vendor_file = OBX_PATH . '/vendor/autoload.php';
if ( is_readable( $vendor_file ) ) {
require_once $vendor_file;
}
add_filter(
'themeisle_sdk_products',
function ( $products ) {
$products[] = __FILE__;
return $products;
}
);
add_filter(
'themeisle_companion_friendly_name',
function( $name ) {
return 'Orbit Fox';
}
);
add_filter(
'themeisle_companion_load_promotions',
function() {
return array( 'otter' );
}
);
add_filter(
'themeisle_companion_about_us_metadata',
function() {
return array(
'logo' => esc_url( OBFX_URL . 'images/orbit-fox.png' ),
'location' => 'obfx_companion',
);
}
);
}
require 'class-autoloader.php';
Autoloader::set_plugins_path( plugin_dir_path( __DIR__ ) );
Autoloader::define_namespaces( array( 'Orbit_Fox', 'OBFX', 'OBFX_Module' ) );
/**
* Invocation of the Autoloader::loader method.
*
* @since 1.0.0
*/
spl_autoload_register( array( 'Autoloader', 'loader' ) );
/**
* The start of the app.
*
* @since 1.0.0
*/
run_orbit_fox();