query( 'jquery-ui-core' ); $version = $ui->ver; if ( MainWP_Helper::starts_with( $version, '1.10' ) ) { wp_enqueue_style( 'jquery-ui-style', plugins_url( '/css/1.10.4/jquery-ui.min.css', dirname( __FILE__ ) ), array(), '1.10', 'all' ); } else { wp_enqueue_style( 'jquery-ui-style', plugins_url( '/css/1.11.1/jquery-ui.min.css', dirname( __FILE__ ) ), array(), '1.11', 'all' ); } } /** * Render Clone page. */ public static function render() { $uploadError = false; $uploadFile = false; if ( isset( $_REQUEST['upload'] ) && wp_verify_nonce( $_POST['_nonce'], 'cloneRestore' ) ) { if ( isset( $_FILES['file'] ) ) { if ( ! function_exists( 'wp_handle_upload' ) ) { require_once ABSPATH . 'wp-admin/includes/file.php'; } $uploadedfile = $_FILES['file']; $upload_overrides = array( 'test_form' => false ); add_filter( 'upload_mimes', array( MainWP_Clone::get_class_name(), 'upload_mimes' ) ); $movefile = wp_handle_upload( $uploadedfile, $upload_overrides ); if ( $movefile ) { $uploadFile = str_replace( ABSPATH, '', $movefile['file'] ); } else { $uploadError = __( 'File could not be uploaded.', 'mainwp-child' ); } } else { $uploadError = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.', 'mainwp-child' ); } } $sitesToClone = get_option( 'mainwp_child_clone_sites' ); $uploadSizeInBytes = min( MainWP_Helper::return_bytes( ini_get( 'upload_max_filesize' ) ), MainWP_Helper::return_bytes( ini_get( 'post_max_size' ) ) ); $uploadSize = MainWP_Helper::human_filesize( $uploadSizeInBytes ); self::render_style(); if ( '0' === $sitesToClone ) { echo '
)
)
get_branding_title(); if ( '' != $branding_title ) { $branding_msg = 'If you have a FULL backup created by basic ' . esc_html( stripslashes( $branding_title ) ) . ' Backup system you may restore it by uploading here. Backups created by 3rd party plugins will not work.'; } else { $branding_msg = esc_html__( 'If you have a FULL backup created by basic MainWP Backup system you may restore it by uploading here. Backups created by 3rd party plugins will not work.', 'mainwp-child' ); } ?>