-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload.php
More file actions
34 lines (30 loc) · 979 Bytes
/
load.php
File metadata and controls
34 lines (30 loc) · 979 Bytes
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
<?php
/*
* When using the embedded framework, use it only if the framework
* plugin isn't activated.
*/
// Don't do anything when we're activating a plugin to prevent errors
// on redeclaring Titan classes
if ( ! empty( $_GET['action'] ) && ! empty( $_GET['plugin'] ) ) {
if ( $_GET['action'] == 'activate' ) {
return;
}
}
// Check if the framework plugin is activated
$useEmbeddedFramework = true;
$activePlugins = get_option('active_plugins');
if ( is_array( $activePlugins ) ) {
foreach ( $activePlugins as $plugin ) {
if ( is_string( $plugin ) ) {
if ( stripos( $plugin, '/titan-framework.php' ) !== false ) {
$useEmbeddedFramework = false;
break;
}
}
}
}
// Use the embedded Titan Framework
if ( $useEmbeddedFramework ) {
require_once( plugin_dir_path( __FILE__ ) . 'titan-framework/titan-framework.php' );
}
$titan = TitanFramework::getInstance( 'wp-copy-protect' );