mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-09-01 03:58:07 +08:00
* Fixed: issues with displaying broken links data for specific setups * Fixed: compatibility issues with the latest PageSpeed Insights plugin version * Fixed: an issue with publishing "future" posts * Fixed: an issue with sending email alerts in specific setups * Fixed: an issue with saving code snippets in wp-config.php when the file is in a custom location * Fixed: an issue with clearing unused scheduled cron jobs * Added: support for the new PageSpeed Insights plugin options * Updated: disabled the "Remove readme.html" security check feature for WPEngine hosted child sites * Updated: support for detecting premium themes updates
42 lines
1.6 KiB
PHP
42 lines
1.6 KiB
PHP
<?php
|
|
/*
|
|
Plugin Name: MainWP Child
|
|
Plugin URI: https://mainwp.com/
|
|
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/
|
|
Author: MainWP
|
|
Author URI: https://mainwp.com
|
|
Text Domain: mainwp-child
|
|
Version: 3.5.4
|
|
*/
|
|
//if ( ( isset( $_REQUEST['heatmap'] ) && '1' === $_REQUEST['heatmap'] ) || ( isset( $_REQUEST['mainwpsignature'] ) && ( ! empty( $_REQUEST['mainwpsignature'] ) ) ) ) {
|
|
// header( 'X-Frame-Options: ALLOWALL' );
|
|
//}
|
|
//header('X-Frame-Options: GOFORIT');
|
|
include_once( ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'version.php' ); //Version information from wordpress
|
|
|
|
define( 'MAINWP_DEBUG', FALSE );
|
|
|
|
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 ) );
|
|
}
|
|
|
|
function mainwp_child_autoload( $class_name ) {
|
|
$autoload_dir = \trailingslashit( dirname( __FILE__ ) . '/class' );
|
|
$autoload_path = sprintf( '%sclass-%s.php', $autoload_dir, strtolower( str_replace( '_', '-', $class_name ) ) );
|
|
|
|
if ( file_exists( $autoload_path ) ) {
|
|
require_once( $autoload_path );
|
|
}
|
|
}
|
|
|
|
if ( function_exists( 'spl_autoload_register' ) ) {
|
|
spl_autoload_register( 'mainwp_child_autoload' );
|
|
}
|
|
|
|
$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' ) );
|