HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/refonte2023/wordpress/wp-content/plugins/give/src/DonorDashboards/Shortcode.php
<?php

namespace Give\DonorDashboards;

use Give\DonorDashboards\App as DonorDashboard;

class Shortcode
{

    protected $donorDashboard;

    public function __construct()
    {
        $this->donorDashboard = give(DonorDashboard::class);
    }

    /**
     * Registers Donor Profile Shortcode
     *
     * @since 2.10.0
     **/
    public function addShortcode()
    {
        add_shortcode('give_donor_dashboard', [$this, 'renderCallback']);
    }

    /**
     * Load Donor Profile frontend assets
     *
     * @since 2.9.0
     **/
    public function loadFrontendAssets()
    {
        global $post;
        if (is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'give_donor_dashboard')) {
            return $this->donorDashboard->loadAssets();
        }
    }

    /**
     * Returns Shortcode markup
     *
     * @since 2.10.0
     **/
    public function renderCallback($attributes)
    {
        $attributes = shortcode_atts(
            [
                'accent_color' => '#68bb6c',
            ],
            $attributes,
            'give_donor_dashboard'
        );

        return $this->donorDashboard->getOutput($attributes);
    }
}