2014-03-19 23:58:52 +07:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
Plugin Name: MainWP Child
|
2016-10-24 20:33:37 +02:00
|
|
|
Plugin URI: https://mainwp.com/
|
2018-01-22 20:21:06 +01:00
|
|
|
Description: Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https://mainwp.com/help/
|
2014-03-19 23:58:52 +07:00
|
|
|
Author: MainWP
|
2016-10-24 20:33:37 +02:00
|
|
|
Author URI: https://mainwp.com
|
2015-12-12 18:39:23 +01:00
|
|
|
Text Domain: mainwp-child
|
2019-05-06 17:04:35 +02:00
|
|
|
Version: 3.5.7
|
2014-03-19 23:58:52 +07:00
|
|
|
*/
|
2018-12-19 17:01:08 +07:00
|
|
|
//if ( ( isset( $_REQUEST['heatmap'] ) && '1' === $_REQUEST['heatmap'] ) || ( isset( $_REQUEST['mainwpsignature'] ) && ( ! empty( $_REQUEST['mainwpsignature'] ) ) ) ) {
|
|
|
|
// header( 'X-Frame-Options: ALLOWALL' );
|
|
|
|
//}
|
2014-03-19 23:58:52 +07:00
|
|
|
//header('X-Frame-Options: GOFORIT');
|
2015-10-15 22:52:37 +10:00
|
|
|
include_once( ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'version.php' ); //Version information from wordpress
|
2014-03-19 23:58:52 +07:00
|
|
|
|
2016-03-15 20:54:21 +01:00
|
|
|
define( 'MAINWP_DEBUG', FALSE );
|
|
|
|
|
2016-03-03 20:28:07 +01:00
|
|
|
if ( ! defined( 'MAINWP_CHILD_FILE' ) ) {
|
|
|
|
define( 'MAINWP_CHILD_FILE', __FILE__ );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( ! defined( 'MAINWP_CHILD_URL' ) ) {
|
|
|
|
define( 'MAINWP_CHILD_URL', plugin_dir_url( MAINWP_CHILD_FILE ) );
|
|
|
|
}
|
|
|
|
|
2015-10-15 22:52:37 +10:00
|
|
|
function mainwp_child_autoload( $class_name ) {
|
2015-10-15 23:31:52 +10:00
|
|
|
$autoload_dir = \trailingslashit( dirname( __FILE__ ) . '/class' );
|
2015-10-15 22:52:37 +10:00
|
|
|
$autoload_path = sprintf( '%sclass-%s.php', $autoload_dir, strtolower( str_replace( '_', '-', $class_name ) ) );
|
|
|
|
|
|
|
|
if ( file_exists( $autoload_path ) ) {
|
|
|
|
require_once( $autoload_path );
|
|
|
|
}
|
2014-03-19 23:58:52 +07:00
|
|
|
}
|
2015-10-15 22:52:37 +10:00
|
|
|
|
|
|
|
if ( function_exists( 'spl_autoload_register' ) ) {
|
|
|
|
spl_autoload_register( 'mainwp_child_autoload' );
|
2018-12-19 17:01:08 +07:00
|
|
|
}
|
2014-03-19 23:58:52 +07:00
|
|
|
|
2015-10-15 22:52:37 +10:00
|
|
|
$mainWPChild = new MainWP_Child( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . plugin_basename( __FILE__ ) );
|
|
|
|
register_activation_hook( __FILE__, array( $mainWPChild, 'activation' ) );
|
|
|
|
register_deactivation_hook( __FILE__, array( $mainWPChild, 'deactivation' ) );
|