$34 GRAYBYTE WORDPRESS FILE MANAGER $94

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.51
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/itiministry.org/plugins/give/src/Campaigns/Blocks/CampaignCover/

HOME
Current File : /home/bravetechrwanda/itiministry.org/plugins/give/src/Campaigns/Blocks/CampaignCover//render.php
<?php

use Give\Campaigns\Models\Campaign;
use Give\Campaigns\Repositories\CampaignRepository;

if (!isset($attributes['campaignId'])) {
    return;
}

/** @var Campaign $campaign */
$campaign = give(CampaignRepository::class)->getById($attributes['campaignId']);

if (!$campaign || !$campaign->image) {
    return;
}

$campaignMediaSetting = $campaign->image;

$altText = $attributes['alt'] ?? __('Campaign cover image', 'give');
$alignment = isset($attributes['align']) ? 'align' . $attributes['align'] : '';
$borderRadius = "border-radius: 8px;";

// Only assign width and height if the alignment is NOT "full" or "wide"
if ($attributes['align'] !== 'full' && $attributes['align'] !== 'wide') {
    $widthStyle = isset($attributes['width']) ? "width: {$attributes['width']}px;" : '';
    $heightStyle = isset($attributes['height']) ? "max-height: {$attributes['height']}px;" : '';
} else {
    $widthStyle = 'width: 100%;';
    $heightStyle = 'height: auto;';
    $borderRadius = '';
}
?>

<div
    <?php echo wp_kses_data(get_block_wrapper_attributes()); ?>
>
    <figure class="givewp-campaign-cover-block__figure">
        <img
            src="<?php echo esc_url($campaign->image); ?>"
            alt="<?php echo esc_attr($altText); ?>"
            style="<?php echo trim(esc_attr($widthStyle) . esc_attr($heightStyle) . esc_attr($borderRadius)); ?>"
        />
    </figure>
</div>


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
Icon.tsx
0.622 KB
31 Mar 2025 11.17 PM
bravetechrwanda / bravetechrwanda
0644
block.json
1.198 KB
31 Mar 2025 11.17 PM
bravetechrwanda / bravetechrwanda
0644
edit.tsx
3.836 KB
31 Mar 2025 11.17 PM
bravetechrwanda / bravetechrwanda
0644
editor.scss
1.287 KB
31 Mar 2025 11.17 PM
bravetechrwanda / bravetechrwanda
0644
index.tsx
0.229 KB
31 Mar 2025 11.17 PM
bravetechrwanda / bravetechrwanda
0644
render.php
1.358 KB
31 Mar 2025 11.17 PM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF