![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/plugins/give/src/DonorDashboards/ |
<?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); } }