PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.4.6
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.4.6
1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 1.8.0 All 210 releases
charitable / includes / shortcodes / class-charitable-profile-shortcode.php

class-charitable-profile-shortcode.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.4.6, at includes/shortcodes/class-charitable-profile-shortcode.php

50 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Profile shortcode class.
4 *
5 * @version 1.0.0
6 * @package Charitable/Shortcodes/Profile
7 * @category Class
8 * @author Eric Daams
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
12
13 if ( ! class_exists( 'Charitable_Profile_Shortcode' ) ) :
14
15 /**
16 * Charitable_Profile_Shortcode class.
17 *
18 * @since 1.0.0
19 */
20 class Charitable_Profile_Shortcode {
21
22 /**
23 * The callback method for the campaigns shortcode.
24 *
25 * This receives the user-defined attributes and passes the logic off to the class.
26 *
27 * @param array $atts User-defined shortcode attributes.
28 * @return string
29 * @access public
30 * @static
31 * @since 1.0.0
32 */
33 public static function display( $atts ) {
34 if ( ! is_user_logged_in() ) {
35 return Charitable_Login_Shortcode::display( $atts );
36 }
37
38 $args = shortcode_atts( array(), $atts, 'charitable_profile' );
39
40 ob_start();
41
42 charitable_template( 'shortcodes/profile.php', array(
43 'form' => new Charitable_Profile_Form( $args )
44 ) );
45
46 return apply_filters( 'charitable_profile_shortcode', ob_get_clean() );
47 }
48 }
49
50 endif;