mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-08-30 02:32:07 +08:00
commit
e58e6881b3
8 changed files with 67 additions and 4 deletions
|
@ -161,6 +161,13 @@ class MainWP_Backup {
|
||||||
$dirs = MainWP_Helper::get_mainwp_dir( 'backup' );
|
$dirs = MainWP_Helper::get_mainwp_dir( 'backup' );
|
||||||
$backupdir = $dirs[0];
|
$backupdir = $dirs[0];
|
||||||
if ( ! defined( 'PCLZIP_TEMPORARY_DIR' ) ) {
|
if ( ! defined( 'PCLZIP_TEMPORARY_DIR' ) ) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines PCLZIP temporary directory.
|
||||||
|
*
|
||||||
|
* @const ( string ) Temporary backup directory.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Backup.html
|
||||||
|
*/
|
||||||
define( 'PCLZIP_TEMPORARY_DIR', $backupdir );
|
define( 'PCLZIP_TEMPORARY_DIR', $backupdir );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1148,7 +1148,7 @@ class MainWP_Child_Back_Up_WordPress {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove exclusoin rule.
|
* Remove exclusion rule.
|
||||||
*
|
*
|
||||||
* @used-by MainWP_Child_Back_Up_WordPress::action() Fire off certain BackUpWordPress plugin actions.
|
* @used-by MainWP_Child_Back_Up_WordPress::action() Fire off certain BackUpWordPress plugin actions.
|
||||||
*
|
*
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* @package MainWP\Child
|
* @package MainWP\Child
|
||||||
*
|
*
|
||||||
* Credits
|
* @Credits
|
||||||
*
|
*
|
||||||
* Plugin-Name: Vendi Abandoned Plugin Check
|
* Plugin-Name: Vendi Abandoned Plugin Check
|
||||||
* Plugin URI: https://wordpress.org/plugins/vendi-abandoned-plugin-check/
|
* Plugin URI: https://wordpress.org/plugins/vendi-abandoned-plugin-check/
|
||||||
|
@ -20,7 +20,7 @@ namespace MainWP\Child;
|
||||||
/**
|
/**
|
||||||
* Class MainWP_Child_Plugins_Check
|
* Class MainWP_Child_Plugins_Check
|
||||||
*
|
*
|
||||||
* Check if pugins have been abandoned.
|
* Check if plugins have been abandoned.
|
||||||
*/
|
*/
|
||||||
class MainWP_Child_Plugins_Check {
|
class MainWP_Child_Plugins_Check {
|
||||||
|
|
||||||
|
@ -317,6 +317,13 @@ class MainWP_Child_Plugins_Check {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! defined( 'DAY_IN_SECONDS' ) ) {
|
if ( ! defined( 'DAY_IN_SECONDS' ) ) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines days in seconds.
|
||||||
|
*
|
||||||
|
* @const ( string ) Default: true.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child_Plugins_Check.html
|
||||||
|
*/
|
||||||
define( 'DAY_IN_SECONDS', 24 * 60 * 60 );
|
define( 'DAY_IN_SECONDS', 24 * 60 * 60 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,13 @@ class MainWP_Child_Themes_Check {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! defined( 'DAY_IN_SECONDS' ) ) {
|
if ( ! defined( 'DAY_IN_SECONDS' ) ) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines days in seconds.
|
||||||
|
*
|
||||||
|
* @const ( string ) Default: true.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child_Themes_Check.html
|
||||||
|
*/
|
||||||
define( 'DAY_IN_SECONDS', 24 * 60 * 60 );
|
define( 'DAY_IN_SECONDS', 24 * 60 * 60 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,7 @@ class MainWP_Child {
|
||||||
*/
|
*/
|
||||||
public function load_all_options() {
|
public function load_all_options() {
|
||||||
|
|
||||||
|
/** @global object $wpdb WordPress object. */
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
if ( ! defined( 'WP_INSTALLING' ) || ! is_multisite() ) {
|
if ( ! defined( 'WP_INSTALLING' ) || ! is_multisite() ) {
|
||||||
|
@ -248,7 +249,15 @@ class MainWP_Child {
|
||||||
|
|
||||||
// Register does not require auth, so we register here.
|
// Register does not require auth, so we register here.
|
||||||
if ( isset( $_POST['function'] ) && 'register' === $_POST['function'] ) {
|
if ( isset( $_POST['function'] ) && 'register' === $_POST['function'] ) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether cron is in progress.
|
||||||
|
*
|
||||||
|
* @const ( bool ) Default: true
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child.html
|
||||||
|
*/
|
||||||
define( 'DOING_CRON', true );
|
define( 'DOING_CRON', true );
|
||||||
|
|
||||||
MainWP_Utility::fix_for_custom_themes();
|
MainWP_Utility::fix_for_custom_themes();
|
||||||
MainWP_Connect::instance()->register_site(); // register the site and exit.
|
MainWP_Connect::instance()->register_site(); // register the site and exit.
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,8 +213,22 @@ class MainWP_Helper {
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
if ( empty( $creds ) ) {
|
if ( empty( $creds ) ) {
|
||||||
if ( ! defined( 'MAINWP_SAVE_FS_METHOD' ) ) {
|
if ( ! defined( 'MAINWP_SAVE_FS_METHOD' ) ) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines save file system method.
|
||||||
|
*
|
||||||
|
* @const ( string ) Defined save file system method.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Helper.html
|
||||||
|
*/
|
||||||
define( 'MAINWP_SAVE_FS_METHOD', get_filesystem_method() );
|
define( 'MAINWP_SAVE_FS_METHOD', get_filesystem_method() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines file system method.
|
||||||
|
*
|
||||||
|
* @const ( string ) Defined file system method.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Helper.html
|
||||||
|
*/
|
||||||
define( 'FS_METHOD', 'direct' );
|
define( 'FS_METHOD', 'direct' );
|
||||||
}
|
}
|
||||||
$init = \WP_Filesystem( $creds );
|
$init = \WP_Filesystem( $creds );
|
||||||
|
|
|
@ -171,6 +171,13 @@ class MainWP_WordPress_SEO {
|
||||||
$upload_dir = wp_upload_dir();
|
$upload_dir = wp_upload_dir();
|
||||||
|
|
||||||
if ( ! defined( 'DIRECTORY_SEPARATOR' ) ) {
|
if ( ! defined( 'DIRECTORY_SEPARATOR' ) ) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines reusable directory separator.
|
||||||
|
*
|
||||||
|
* @const ( string ) Directory separator.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Dashboard.MainWP_WordPress_SEO.html
|
||||||
|
*/
|
||||||
define( 'DIRECTORY_SEPARATOR', '/' );
|
define( 'DIRECTORY_SEPARATOR', '/' );
|
||||||
}
|
}
|
||||||
$p_path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'wpseo-import' . DIRECTORY_SEPARATOR;
|
$p_path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'wpseo-import' . DIRECTORY_SEPARATOR;
|
||||||
|
|
|
@ -20,13 +20,19 @@
|
||||||
require_once ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'version.php'; // Version information from WordPress.
|
require_once ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'version.php'; // Version information from WordPress.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define MainWP Child Plugin Debug Mode. Default: false.
|
* Define MainWP Child Plugin Debug Mode.
|
||||||
|
*
|
||||||
|
* @const ( bool ) Whether or not MainWP Child is in debug mode. Default: false.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child.html
|
||||||
*/
|
*/
|
||||||
define( 'MAINWP_CHILD_DEBUG', false );
|
define( 'MAINWP_CHILD_DEBUG', false );
|
||||||
|
|
||||||
if ( ! defined( 'MAINWP_CHILD_FILE' ) ) {
|
if ( ! defined( 'MAINWP_CHILD_FILE' ) ) {
|
||||||
/**
|
/**
|
||||||
* Define MainWP Child Plugin absolute full path and filename of this file.
|
* Define MainWP Child Plugin absolute full path and filename of this file.
|
||||||
|
*
|
||||||
|
* @const ( string ) Defined MainWP Child file path.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child.html
|
||||||
*/
|
*/
|
||||||
define( 'MAINWP_CHILD_FILE', __FILE__ );
|
define( 'MAINWP_CHILD_FILE', __FILE__ );
|
||||||
}
|
}
|
||||||
|
@ -34,6 +40,9 @@ if ( ! defined( 'MAINWP_CHILD_FILE' ) ) {
|
||||||
if ( ! defined( 'MAINWP_CHILD_PLUGIN_DIR' ) ) {
|
if ( ! defined( 'MAINWP_CHILD_PLUGIN_DIR' ) ) {
|
||||||
/**
|
/**
|
||||||
* Define MainWP Child Plugin Directory.
|
* Define MainWP Child Plugin Directory.
|
||||||
|
*
|
||||||
|
* @const ( string ) Defined MainWP Child Plugin Directory.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child.html
|
||||||
*/
|
*/
|
||||||
define( 'MAINWP_CHILD_PLUGIN_DIR', plugin_dir_path( MAINWP_CHILD_FILE ) );
|
define( 'MAINWP_CHILD_PLUGIN_DIR', plugin_dir_path( MAINWP_CHILD_FILE ) );
|
||||||
}
|
}
|
||||||
|
@ -41,6 +50,9 @@ if ( ! defined( 'MAINWP_CHILD_PLUGIN_DIR' ) ) {
|
||||||
if ( ! defined( 'MAINWP_CHILD_URL' ) ) {
|
if ( ! defined( 'MAINWP_CHILD_URL' ) ) {
|
||||||
/**
|
/**
|
||||||
* Define MainWP Child Plugin URL.
|
* Define MainWP Child Plugin URL.
|
||||||
|
*
|
||||||
|
* @const ( string ) Defined MainWP Child Plugin URL.
|
||||||
|
* @source https://code-reference.mainwp.com/classes/MainWP.Child.MainWP_Child.html
|
||||||
*/
|
*/
|
||||||
define( 'MAINWP_CHILD_URL', plugin_dir_url( MAINWP_CHILD_FILE ) );
|
define( 'MAINWP_CHILD_URL', plugin_dir_url( MAINWP_CHILD_FILE ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue