HEX
Server: Apache
System: Linux flamboyant-gauss.194-164-62-186.plesk.page 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: gamesamphora (10001)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/amphoragames.com/httpdocs/wp-content/plugins/backwpup/parts/sidebar/storages.php
<?php
use BackWPup\Utils\BackWPupHelpers;

/**
 * @var $job_id ID Of the job
 */
if ( $job_id === null ) {
	return;
}
BackWPupHelpers::component("closable-heading", [
  'title' => __("Storages Settings", 'backwpup'),
  'type' => 'sidebar'
]);

$destinations = BackWPup_Option::get($job_id, 'destinations');

// Get all the destinations including local.
$cloud_destinations = BackWPup_Destinations::get_destinations(true);
$dist_storages = [];
if ( $destinations ){
	foreach ($cloud_destinations as $a_cloud_destination) {
	$dist_storages[] = [
		"slug" => $a_cloud_destination["slug"],
		"label" => $a_cloud_destination["label"],
		"name" => "storage_destinations[]",
		"active" => in_array($a_cloud_destination["slug"], $destinations ?? [] ),
    "deactivated_message" => $a_cloud_destination["deactivated_message"] ?? "",
	];
	}
}

?>

<?php BackWPupHelpers::component("containers/scrollable-start"); ?>

<p class="mt-2 text-base">
  <?php _e("You can select where to store your backups and configure each storage.", 'backwpup'); ?>
</p>

<div class="rounded-lg p-6 bg-grey-100">

  <?php
  BackWPupHelpers::component("storage-list", [
    "full_width" => true,
    "prev" => "storages",
    "storages" => $dist_storages,
    "job_id" => $job_id,
  ]);
  ?>
</div>

<?php BackWPupHelpers::component("containers/scrollable-end"); ?>

<?php
BackWPupHelpers::component("form/button", [
  "type" => "secondary",
  "label" => __("Close", 'backwpup'),
  "full_width" => true,
  "trigger" => "close-sidebar",
]);
?>