<?php
#  ________         ____________      _____ ________                       ________      
#  ___  __ )____  _____  /___  /_____ __  /____  __ \______________ ______ ___  __/      
#  __  __  |_  / / /__  / __  / _  _ \_  __/__  /_/ /__  ___/_  __ \_  __ \__  /_        
#  _  /_/ / / /_/ / _  /  _  /  /  __// /_  _  ____/ _  /    / /_/ // /_/ /_  __/        
#  /_____/  \__,_/  /_/   /_/   \___/ \__/  /_/      /_/     \____/ \____/ /_/           
#  ________                             _____ _____              ________                
#  __  ___/_____ ___________  _____________(_)__  /______  __    ___  __ \______________ 
#  _____ \ _  _ \_  ___/_  / / /__  ___/__  / _  __/__  / / /    __  /_/ /__  ___/_  __ \
#  ____/ / /  __// /__  / /_/ / _  /    _  /  / /_  _  /_/ /     _  ____/ _  /    / /_/ /
#  /____/  \___/ \___/  \__,_/  /_/     /_/   \__/  _\__, /      /_/      /_/     \____/ 
#                                                   /____/                               
# 42756C6C657450726F6F66 5365637572697479 50726F 
#
/*	The Copyright, AITpro Software Products License Information must remain
	intact or all BulletProof Security Pro warranties, guarantees, liabilities are void.
	
	Copyright (C) Edward Alexander, AIT-pro.com. All rights reserved.

	AITpro Software Products License Information:
	BY DOWNLOADING, INSTALLING, COPYING, ACCESSING, OR USING BulletProof Security Pro YOU AGREE TO THE TERMS OF THIS AGREEMENT. 
	IF YOU 	ARE ACCEPTING THESE TERMS ON BEHALF OF ANOTHER PERSON OR A COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT AND WARRANT
	THAT YOU HAVE FULL AUTHORITY TO BIND THAT PERSON, COMPANY, OR LEGAL ENTITY TO THESE TERMS. IF YOU DO NOT AGREE TO THESE TERMS,
	* DO NOT DOWNLOAD, INSTALL, COPY, ACCESS, OR USE BulletProof Security Pro; AND
	* PROMPTLY RETURN BulletProof Security Pro TO THE PARTY FROM WHOM YOU ACQUIRED IT. IF YOU DOWNLOADED BulletProof Security Pro
	FROM THE AITPRO WEBSITE, CONTACT AITPRO FOR A REFUND IF APPLICABLE.
	
	AITpro Software Products License Information continued:
	You agree to keep the AITpro Software Products License for BulletProof Security Pro, unmodified or altered in any way,
	with the original copy of BulletProof Security Pro that you have and any and all copies or partial copies of BulletProof
	Security Pro that You make. 
*/
// Direct calls to this file are Forbidden when core files are not present 
if ( ! function_exists('add_action') ) {
		header('Status: 403 Forbidden');
		header('HTTP/1.1 403 Forbidden');
		exit();
}

//add_filter('cron_schedules', 'bpsPro_daily_ARQ_OBFD_cron');

// unnecessary/redundant: already have this Daily interval in the ARQ Cron interval code
/*
function bpsPro_daily_ARQ_OBFD_cron( $schedules ) {
	//$schedules['daily'] = array( 'interval' => 86400, 'display' => __('Once Daily') );
	// For testing: Change the Cron to a 2 minute interval	
	$schedules['minutes_2_test'] = array(
		'interval' 	=> 120,
		'display' 	=> __('Once every 2 minutes')	
	);	
	
	return $schedules;
}
*/

add_action('bpsPro_ARQ_OBFD', 'bpsPro_ARQ_delete_old_backup_files');

// 14.7: BugFix: missing the wp_get_schedule() function and variable for the ARQ OBFD Cron job.
function bpsPro_schedule_ARQ_OBFD() {
	
	$ARQoptions = get_option('bulletproof_security_options_ARCM');
	$bpsPro_ARQ_OBFD = wp_get_schedule('bpsPro_ARQ_OBFD');
	
	if ( isset($ARQoptions['bps_autorestore_cron']) && $ARQoptions['bps_autorestore_cron'] == 'On' ) {
	
		if ( ! wp_next_scheduled( 'bpsPro_ARQ_OBFD' ) ) {
			wp_schedule_event( time(), 'daily', 'bpsPro_ARQ_OBFD' );
		}
		
		/*
		// For testing: Change the Cron to a 2 minute interval
		if ( ! wp_next_scheduled('bpsPro_ARQ_OBFD') ) {
		wp_schedule_event( time(), 'minutes_2', 'bpsPro_ARQ_OBFD' );
		}
		*/
	
	} elseif ( isset($ARQoptions['bps_autorestore_cron']) && $ARQoptions['bps_autorestore_cron'] == 'Off' ) {
		wp_clear_scheduled_hook('bpsPro_ARQ_OBFD');
	}
}
add_action('init', 'bpsPro_schedule_ARQ_OBFD');

// ARQ Automated Old Backup File Deletion Daily Cron: Delete Old WP files in /bps-backup/autorestore/ folder
// Check if 1 old WP backup file exists in bps backup and a that corresponding website file exists
// Deletes old WP files based on files removed in WP versions in /wp-admin/includes/update-core.php
// If a folder is deleted in a WP version then I need to check that old WP version for files and delete those files before I can delete the folder.
// Important Note: Either WP Core files and directories are not deleted on XAMPP or when WP is manually copied then WP Core files and directories are not deleted.
// 14.7: BugFix Remove "break;" from each case except for the last case.
function bpsPro_ARQ_delete_old_backup_files() {
global $wp_version;
		
$wp_app_php_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/root-files/wp-app.php';
$swupload_all_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/swfupload-all.js';
$revisions_js_php_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/revisions-js.php';
$cat_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.js';
$about_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/about.js';
$colors_css_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors.css';
$jquery_accordion_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js';
$wpfullscreenjs_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen.js';
$comments_popup_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/theme-compat/comments-popup.php';
$class_wp_automatic_upgrader_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/includes/class-wp-automatic-upgrader.php';
$moxieplayer_swf_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/moxieplayer.swf';
$press_this_css_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this.css';
$jshint_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/codemirror/jshint.js';
$random_bytes_openssl_php_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/random_compat/random_bytes_openssl.php';
$wp_a11y_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-a11y.js';
$wp_fullscreen_stub_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen-stub.js';
$ie_css_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie.css';
$position_min_js_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/widget.min.js';
$block_json_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/blocks/classic/block.json';
$freedoms_png_arq = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/freedoms.png';

$wp_app_php = ABSPATH . 'wp-app.php';
$swupload_all_js = ABSPATH . 'wp-includes/js/swfupload/swfupload-all.js';
$revisions_js_php = ABSPATH . 'wp-admin/js/revisions-js.php';
$cat_js = ABSPATH . 'wp-admin/js/cat.js';
$about_js = ABSPATH . 'wp-admin/js/about.js';
$colors_css = ABSPATH . 'wp-admin/css/colors.css';
$jquery_accordion_js = ABSPATH . 'wp-includes/js/jquery/ui/jquery.ui.accordion.min.js';
$wpfullscreenjs = ABSPATH . 'wp-admin/js/wp-fullscreen.js';
$comments_popup = ABSPATH . 'wp-includes/theme-compat/comments-popup.php';
$class_wp_automatic_upgrader = ABSPATH . 'wp-admin/includes/class-wp-automatic-upgrader.php';
$moxieplayer_swf = ABSPATH . 'wp-includes/js/tinymce/plugins/media/moxieplayer.swf';
$press_this_css = ABSPATH . 'wp-admin/css/press-this.css';
$jshint_js = ABSPATH . 'wp-includes/js/codemirror/jshint.js';
$random_bytes_openssl_php_arq = ABSPATH . 'wp-includes/random_compat/random_bytes_openssl.php';
$wp_a11y_js = ABSPATH . 'wp-includes/js/wp-a11y.js';
$wp_fullscreen_stub_js = ABSPATH . 'wp-admin/js/wp-fullscreen-stub.js';
$ie_css = ABSPATH . 'wp-admin/css/ie.css';
$position_min_js = ABSPATH . 'wp-includes/js/jquery/ui/widget.min.js';
$block_json = ABSPATH . 'wp-includes/blocks/classic/block.json';
$freedoms_png = ABSPATH . 'wp-admin/images/freedoms.png';

switch ( $wp_version ) {
    case version_compare( $wp_version, '3.5', '>=' ) && version_compare( $wp_version, '3.5.2', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($wp_app_php_arq) && ! file_exists($wp_app_php) ) {
			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/root-files/wp-app.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/gears-manifest.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/includes/manifest.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/archive-link.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/blue-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/button-grad-active.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/button-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/ed-bg-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/ed-bg.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fade-butt.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav-arrow-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav-arrow.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/gray-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/loading-publish.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/logo-ghost.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/logo.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-arrow-frame-rtl.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-arrow-frame.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-arrows.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits-rtl-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark-rtl-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/required.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screen-options-toggle-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screen-options-toggle.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/toggle-arrow-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/toggle-arrow.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/upload-classic.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/upload-fresh.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/white-grad-active.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/white-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/widgets-arrow-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/widgets-arrow.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wpspin_dark.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/images/upload.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/prototype.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/scriptaculous');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/wp-admin-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/wp-admin.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-classic.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/customize-controls-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/customize-controls.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/install.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-fresh.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/customize-base.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/json2.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/comment-reply.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/customize-preview.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wplink.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tw-sack.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-list-revisions.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/autosave.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/admin-bar.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/quicktags.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-ajax-response.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-pointer.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/hoverIntent.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/colorpicker.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-lists.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/customize-loader.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.table-hotkeys.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.color.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.color.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.hotkeys.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.form.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/suggest.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/xfn.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/set-post-thumbnail.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/comment.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/password-strength-meter.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/user-profile.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-preview.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/post.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/media-upload.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/word-count.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/plugin-install.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/edit-comments.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/media-gallery.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-fields.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-background.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/common.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/inline-edit-tax.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/gallery.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/utils.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/widgets.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/nav-menu.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/dashboard.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/link.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/user-suggest.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/postbox.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/tags.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/image-edit.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/media.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/customize-controls.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/inline-edit-post.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/categories.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/editor.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/handlers.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/wp-plupload.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/handlers.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jcrop/jquery.Jcrop.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jcrop/jquery.Jcrop.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jcrop/jquery.Jcrop.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/wp-pointer.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/editor.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/jquery-ui-dialog.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/admin-bar-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/admin-bar.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.clip.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.scale.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.blind.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.core.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.shake.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.fade.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.explode.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.slide.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.drop.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.highlight.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.bounce.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.transfer.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.fold.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/captions-1.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/captions-2.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-1.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-2.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-3.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-media-library.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/theme-customizer.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/twitter-embed-1.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/twitter-embed-2.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/utils.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/options-privacy.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/class-wp-atom-server.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css');		
		}
		//break;

    case version_compare( $wp_version, '3.5.2', '>=' ) && version_compare( $wp_version, '3.6', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($swupload_all_js_arq) && ! file_exists($swupload_all_js) ) {
			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/swfupload-all.js');			

		}
		//break;

    case version_compare( $wp_version, '3.6', '>=' ) && version_compare( $wp_version, '3.7', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($revisions_js_php_arq) && ! file_exists($revisions_js_php) ) {
			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/revisions-js.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/categories.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/categories.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-fields.js');		
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-fields.min.js');		
			
			$dir = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots';
	
			if ( is_dir($dir) ) {
				rmdir( $dir );
			}
		}
		//break;

    case version_compare( $wp_version, '3.7', '>=' ) && version_compare( $wp_version, '3.8', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($cat_js_arq) && ! file_exists($cat_js) ) {
			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.min.js');		
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js');
		}
		//break;

    case version_compare( $wp_version, '3.8', '>=' ) && version_compare( $wp_version, '3.9', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($about_js_arq) && ! file_exists($about_js) ) {

			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/thickbox/tb-close-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/thickbox/tb-close.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/images/wpmini-blue-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/images/wpmini-blue.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-fresh.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-classic.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-fresh.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-classic.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/about.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/about.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark-vs-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-pr.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/press-this.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/press-this-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-vs-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/welcome-icons.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/stars-rtl-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-pr-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-shadow-rtl.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-search-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/bubble_bg-rtl-2x.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-badge-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wordpress-logo-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/bubble_bg-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-badge.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-shadow.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-globe-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/welcome-icons-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/stars-rtl.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo-vs-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-updates-2x.png');			
		}
		//break;

    case version_compare( $wp_version, '3.9', '>=' ) && version_compare( $wp_version, '4.1', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($colors_css_arq) && ! file_exists($colors_css) ) {
			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-rtl.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-rtl.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media-rtl.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/farbtastic-rtl.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/lock-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/lock.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-preview.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-install.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-install.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-preview.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.html4.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.html5.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/changelog.txt');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.silverlight.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.flash.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/tiny_mce.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/mark_loaded_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/wp-tinymce-schema.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/media.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpview/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wplink/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/pasteword.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/pastetext.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/langs/wp-langs.php');

			$dir1 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/spellchecker';
			$dir2 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/inlinepopups';
			$dir3 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/js';
			$dir4 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/css';
			$dir5 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wordpress/img';
			$dir6 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/js';
			$dir7 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/img';
			$dir8 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/js';
			$dir9 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/css';
			$dir10 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpgallery/img';
			$dir11 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/css';
			$dir12 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/js';
			$dir13 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced';
	
			if ( is_dir($dir1) ) {
				rmdir( $dir1 );
			}
			if ( is_dir($dir2) ) {
				rmdir( $dir2 );
			}
			if ( is_dir($dir3) ) {
				rmdir( $dir3 );
			}
			if ( is_dir($dir4) ) {
				rmdir( $dir4 );
			}
			if ( is_dir($dir5) ) {
				rmdir( $dir5 );
			}
			if ( is_dir($dir6) ) {
				rmdir( $dir6 );
			}
			if ( is_dir($dir7) ) {
				rmdir( $dir7 );
			}
			if ( is_dir($dir8) ) {
				rmdir( $dir8 );
			}
			if ( is_dir($dir9) ) {
				rmdir( $dir9 );
			}
			if ( is_dir($dir10) ) {
				rmdir( $dir10 );
			}
			if ( is_dir($dir11) ) {
				rmdir( $dir11 );
			}
			if ( is_dir($dir12) ) {
				rmdir( $dir12 );
			}
			if ( is_dir($dir13) ) {
				rmdir( $dir13 );
			}
		}
		//break;

    // Delete all old files from WP version 3.5 to 4.1. no files were deleted in WP 4.2
    case version_compare( $wp_version, '3.5', '>=' ) && version_compare( $wp_version, '4.2', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($jquery_accordion_js_arq) && ! file_exists($jquery_accordion_js) ) {
			
			// 3.5
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/root-files/wp-app.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/gears-manifest.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/includes/manifest.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/archive-link.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/blue-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/button-grad-active.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/button-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/ed-bg-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/ed-bg.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fade-butt.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav-arrow-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav-arrow.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/fav.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/gray-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/loading-publish.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/logo-ghost.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/logo.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-arrow-frame-rtl.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-arrow-frame.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-arrows.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits-rtl-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-bits.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark-rtl-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-dark.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/required.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screen-options-toggle-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screen-options-toggle.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/toggle-arrow-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/toggle-arrow.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/upload-classic.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/upload-fresh.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/white-grad-active.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/white-grad.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/widgets-arrow-vs.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/widgets-arrow.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wpspin_dark.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/images/upload.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/prototype.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/scriptaculous');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/wp-admin-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/wp-admin.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-classic.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/customize-controls-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/customize-controls.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/install.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-fresh.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/customize-base.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/json2.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/comment-reply.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/customize-preview.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wplink.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tw-sack.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-list-revisions.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/autosave.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/admin-bar.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/quicktags.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-ajax-response.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-pointer.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/hoverIntent.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/colorpicker.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-lists.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/customize-loader.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.table-hotkeys.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.color.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.color.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.hotkeys.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/jquery.form.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/suggest.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/xfn.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/set-post-thumbnail.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/comment.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/password-strength-meter.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/user-profile.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-preview.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/post.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/media-upload.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/word-count.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/plugin-install.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/edit-comments.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/media-gallery.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-fields.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-background.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/common.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/inline-edit-tax.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/gallery.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/utils.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/widgets.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/nav-menu.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/dashboard.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/link.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/user-suggest.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/postbox.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/tags.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/image-edit.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/media.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/customize-controls.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/inline-edit-post.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/categories.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/editor.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/handlers.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/wp-plupload.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/handlers.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jcrop/jquery.Jcrop.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jcrop/jquery.Jcrop.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jcrop/jquery.Jcrop.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/wp-pointer.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/editor.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/jquery-ui-dialog.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/admin-bar-rtl.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/css/admin-bar.dev.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.clip.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.scale.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.blind.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.core.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.shake.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.fade.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.explode.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.slide.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.drop.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.highlight.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.bounce.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.transfer.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.effects.fold.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/captions-1.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/captions-2.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-1.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-2.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-3.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/flex-header-media-library.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/theme-customizer.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/twitter-embed-1.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots/twitter-embed-2.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/utils.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/options-privacy.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/class-wp-atom-server.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css');	
			// 3.5.2
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/swfupload-all.js');
			// 3.6
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/revisions-js.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/categories.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/categories.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-fields.js');		
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/custom-fields.min.js');	
			
			$dir = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/screenshots';
	
			if ( is_dir($dir) ) {
				rmdir( $dir );
			}
			// 3.7
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/cat.min.js');		
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js');
			// 3.8
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/thickbox/tb-close-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/thickbox/tb-close.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/images/wpmini-blue-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/images/wpmini-blue.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-fresh.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-classic.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-fresh.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-classic.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/about.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/about.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark-vs-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-pr.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/press-this.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/press-this-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-vs-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/welcome-icons.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/stars-rtl-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-dark-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-pr-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-shadow-rtl.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/arrows-vs.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-search-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/bubble_bg-rtl-2x.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-badge-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wordpress-logo-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/bubble_bg-rtl.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-badge.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/menu-shadow.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-globe-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/welcome-icons-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/stars-rtl.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/wp-logo-vs-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-updates-2x.png');
			// 3.9
			// Following files added back in 4.5 see #36083
			// 'wp-admin/css/media-rtl.min.css',
			// 'wp-admin/css/media.min.css',
			// 'wp-admin/css/farbtastic-rtl.min.css',
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-rtl.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/colors-rtl.min.css');
			//unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media-rtl.min.css');
			//unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/media.min.css');
			//unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/farbtastic-rtl.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/lock-2x.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/lock.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-preview.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-install.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-install.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/theme-preview.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.html4.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.html5.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/changelog.txt');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.silverlight.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.flash.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/tiny_mce.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/mark_loaded_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/wp-tinymce-schema.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/media.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpview/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wplink/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/editor_plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/pasteword.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/pastetext.htm');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/langs/wp-langs.php');

			$dir1 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/spellchecker';
			$dir2 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/inlinepopups';
			$dir3 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/js';
			$dir4 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/css';
			$dir5 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wordpress/img';
			$dir6 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpdialogs/js';
			$dir7 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/img';
			$dir8 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/js';
			$dir9 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpeditimage/css';
			$dir10 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpgallery/img';
			$dir11 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/css';
			$dir12 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/paste/js';
			$dir13 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/themes/advanced';
	
			if ( is_dir($dir1) ) {
				rmdir( $dir1 );
			}
			if ( is_dir($dir2) ) {
				rmdir( $dir2 );
			}
			if ( is_dir($dir3) ) {
				rmdir( $dir3 );
			}
			if ( is_dir($dir4) ) {
				rmdir( $dir4 );
			}
			if ( is_dir($dir5) ) {
				rmdir( $dir5 );
			}
			if ( is_dir($dir6) ) {
				rmdir( $dir6 );
			}
			if ( is_dir($dir7) ) {
				rmdir( $dir7 );
			}
			if ( is_dir($dir8) ) {
				rmdir( $dir8 );
			}
			if ( is_dir($dir9) ) {
				rmdir( $dir9 );
			}
			if ( is_dir($dir10) ) {
				rmdir( $dir10 );
			}
			if ( is_dir($dir11) ) {
				rmdir( $dir11 );
			}
			if ( is_dir($dir12) ) {
				rmdir( $dir12 );
			}
			if ( is_dir($dir13) ) {
				rmdir( $dir13 );
			}			
			// 4.1
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.button.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.core.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.draggable.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.droppable.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.effect.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.menu.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.mouse.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.position.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.resizable.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.selectable.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.slider.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.spinner.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/jquery.ui.widget.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png');
		}
		//break;

    // Delete all old files from WP version 4.3 to 4.4. no files were deleted in WP 4.4
	case version_compare( $wp_version, '4.3', '>=' ) && version_compare( $wp_version, '4.4', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($wpfullscreenjs_arq) && ! file_exists($wpfullscreenjs) ) {
			
			// 4.3			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/wp-mce-help.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js');			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.min.js');
			
			$dir14 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpfullscreen';
			
			if ( is_dir($dir14) ) {
				rmdir( $dir14 );
			}
		}
		//break;

    // Delete all old files from WP version 4.5 to 4.5.x. 
	// Note if wp releases sub versions: 4.5.x then a new file checking condition would need to be added for that new file if it is being deleted by WP.
	case version_compare( $wp_version, '4.5', '>=' ) && version_compare( $wp_version, '4.6', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($comments_popup_arq) && ! file_exists($comments_popup) ) {
			
			// 4.5			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/theme-compat/comments-popup.php');
			
		}
		//break;


	// Delete all old files from WP version 4.6 to 4.7.x - no files were deleted in 4.7.x version 
	case version_compare( $wp_version, '4.6', '>=' ) && version_compare( $wp_version, '4.8', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($class_wp_automatic_upgrader_arq) && ! file_exists($class_wp_automatic_upgrader) ) {
			
			// 4.6			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/includes/class-wp-automatic-upgrader.php');
	
		}
		//break;
	
	// Delete all old files from WP version 4.8 to 4.9
	// Note if wp releases sub versions: 4.8.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '4.8', '>=' ) && version_compare( $wp_version, '4.9', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($moxieplayer_swf_arq) && ! file_exists($moxieplayer_swf) ) {
			
			// 4.8
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/media/moxieplayer.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.json');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.json');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css');		
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed/plugin.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed/plugin.min.js');	

			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
		}
		//break;

	// Delete all old files from WP version 4.9 to 4.9.2
	// Note if wp releases sub versions: 4.9.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '4.9', '>=' ) && version_compare( $wp_version, '5.0', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($press_this_css_arq) && ! file_exists($press_this_css) ) {
			
			// 4.9
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this-editor-rtl.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this-editor-rtl.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this-editor.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this-editor.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this-rtl.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this-rtl.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/press-this.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/includes/class-wp-press-this.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/bookmarklet.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/bookmarklet.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/press-this.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/press-this.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/background.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/bigplay.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/bigplay.svg');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/controls.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/controls.svg');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/flashmediaelement.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/froogaloop.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/jumpforward.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/loading.gif');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/silverlightmediaelement.xap');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/skipback.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.flash.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.full.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/plupload/plupload.silverlight.xap');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/swfupload.swf');
			// Files to delete in folder: /bps-backup/autorestore/wp-includes/js/swfupload/plugins
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/plugins/swfupload.cookies.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/plugins/swfupload.queue.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/plugins/swfupload.speed.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/plugins/swfupload.swfobject.js');
		
			// 4.9.2
			// Files to delete in folder: /bps-backup/autorestore/wp-includes/js/mediaelement/lang
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/ca.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/cs.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/de.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/es.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/fa.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/fr.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/hr.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/hu.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/it.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/ja.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/ko.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/nl.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/pl.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/pt.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/ro.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/ru.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/sk.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/sv.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/uk.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/zh-cn.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang/zh.js');
			
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/mediaelement-flash-audio-ogg.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/mediaelement-flash-audio.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/mediaelement-flash-video-hls.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/mediaelement-flash-video-mdash.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/mediaelement-flash-video.swf');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/dailymotion.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/dailymotion.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/facebook.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/facebook.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/soundcloud.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/soundcloud.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/twitch.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/renderers/twitch.min.js');

			// folders to delete
			// note: I need to check the old wp 4.9 version for any files in this folder or even simpler check my XAMPP test site
			$dir16 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/swfupload/plugins';
			$dir17 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/mediaelement/lang';
			
			if ( is_dir($dir16) ) {
				rmdir( $dir16 );
			}
			if ( is_dir($dir17) ) {
				rmdir( $dir17 );
			}
		}
		//break;

	// Delete all old files from WP version 5.0 to 5.1
	// Note if wp releases sub versions: 5.0.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '5.0', '>=' ) && version_compare( $wp_version, '5.1', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($jshint_js_arq) && ! file_exists($jshint_js) ) {
			
			// 5.0
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/codemirror/jshint.js');

			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.1 to 5.3. No files deleted in 5.2.
	// Note if wp releases sub versions: 5.1.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '5.1', '>=' ) && version_compare( $wp_version, '5.3', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($random_bytes_openssl_php_arq) && ! file_exists($random_bytes_openssl_php) ) {
			
			// 5.1
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/random_compat/random_bytes_openssl.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/wp-tinymce.js.gz');
			
			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.3 to 5.4.
	// Note if wp releases sub versions: 5.3.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '5.3', '>=' ) && version_compare( $wp_version, '5.4', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($wp_a11y_js_arq) && ! file_exists($wp_a11y_js) ) {
			
			// 5.3
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-a11y.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/wp-a11y.min.js');		
			
			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.4 up to 5.5.
	// Note if wp releases sub versions: 5.4.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '5.4', '>=' ) && version_compare( $wp_version, '5.5', '<' ) || version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($wp_fullscreen_stub_js_arq) && ! file_exists($wp_fullscreen_stub_js) ) {
			
			// 5.4
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen-stub.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/js/wp-fullscreen-stub.min.js');			

			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.5 up to 5.8.
	// Note if wp releases sub versions: 5.5.x & new files are deleted then those new files would need to be added.
	case version_compare( $wp_version, '5.5', '>=' ) && version_compare( $wp_version, '5.6', '<' ) || version_compare( $wp_version, '5.6', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($ie_css_arq) && ! file_exists($ie_css) ) {
			
			// 5.5
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie.min.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie-rtl.css');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/css/ie-rtl.min.css');


			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.6 up to 5.8.
	case version_compare( $wp_version, '5.6', '>=' ) && version_compare( $wp_version, '5.7', '<' ) || version_compare( $wp_version, '5.7', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($position_min_js_arq) && ! file_exists($position_min_js) ) {
			
			// 5.6
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/position.min.js');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/jquery/ui/widget.min.js');

			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.7 up to 5.8.
	case version_compare( $wp_version, '5.7', '>=' ) && version_compare( $wp_version, '5.8', '<' ) || version_compare( $wp_version, '5.8', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($block_json_arq) && ! file_exists($block_json) ) {
			
			// 5.7
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/blocks/classic/block.json');

			// No folders to delete
			/*
			$dir15 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/js/tinymce/plugins/wpembed';
			
			if ( is_dir($dir15) ) {
				rmdir( $dir15 );
			}
			*/
		}
		//break;

	// Delete all old files from WP version 5.8 up to 5.9.
	case version_compare( $wp_version, '5.8', '>=' ) && version_compare( $wp_version, '5.9', '<' ):

		if ( file_exists($freedoms_png_arq) && ! file_exists($freedoms_png) ) {
			
			// 5.8
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/freedoms.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/privacy.png');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-badge.svg');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-color-palette.svg');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-color-palette-vert.svg');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-admin/images/about-header-brushes.svg');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/large-header.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/heading-paragraph.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/quote.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/text-three-columns-buttons.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/two-buttons.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/two-images.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/three-buttons.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/text-two-columns-with-images.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/text-two-columns.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/block-patterns/large-header-button.php');
			unlink(WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/blocks/subhead/block.json');			
			
			// 1 folder to delete
			$dir18 = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/blocks/subhead';
			
			if ( is_dir($dir18) ) {
				rmdir( $dir18 );
			}

		}
		break;

		// change this || condition when WP 5.9 is released to: || version_compare( $wp_version, '5.8', '>=' ) && version_compare( $wp_version, '5.9', '<' )
		// change all the || conditions for all previous cases to the last WP version. Since I am at then that would be: version_compare( $wp_version, '5.9', '<' )
		// The reason for this is a site might not get updated for several WP versions.
		// IMPORTANT!!! Comment out "break;" in the previous case in order for the switch to continue processing.

}
}

?>