| Server IP : 216.238.66.20 / Your IP : 216.73.216.149 Web Server : nginx/1.30.4 System : Linux woropds 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/sweetheart.mx/htdocs/wp-content/plugins/backwpup/components/ |
Upload File : |
<?php
use BackWPup\Utils\BackWPupHelpers;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Locked (PRO-only) storage item displayed to free users.
*
* @var string $slug The storage slug. Also the SVG icon file name.
* @var string $label The storage label.
* @var bool $full_width Optional. Make the item full width. Default: false.
*/
// Defaults.
$slug = $slug ?? 'GDRIVE';
$label = $label ?? '';
$full_width = $full_width ?? false;
// Classes.
$base_style = 'flex items-center gap-2 p-2 pr-4 border rounded';
$contextual_style = 'border-transparent bg-white opacity-60 cursor-not-allowed';
$full_width_class = $full_width ? 'w-full' : '';
$lock_btn_class = BackWPupHelpers::clsx( 'flex items-center gap-2 border rounded', 'ml-auto border-transparent bg-white text-grey-500' );
// Validate slug against known storage icons to prevent path traversal.
$allowed_slugs = [ 'GDRIVE', 'GLACIER', 'HIDRIVE', 'ONEDRIVE' ];
if ( ! in_array( $slug, $allowed_slugs, true ) ) {
$slug = 'GDRIVE';
}
?>
<div class="<?php echo esc_attr( BackWPupHelpers::clsx( $base_style, $contextual_style, $full_width_class ) ); ?>"
aria-disabled="true"
>
<span class="p-2 border border-grey-500 rounded">
<?php require untrailingslashit( BackWPup::get_plugin_data( 'plugindir' ) ) . "/assets/img/storage/$slug.svg"; ?>
</span>
<span class="text-base font-title"><?php echo esc_html( $label ); ?></span>
<div class="<?php echo esc_attr( $lock_btn_class ); ?>">
<span class="px-2 py-1 bg-pro rounded font-title text-xs font-semibold opacity-100">
<?php echo esc_html( __( 'PRO', 'backwpup' ) ); ?>
</span>
</div>
</div>