/** * Display the donation form. This is used with the_content filter. * * @param string $content * @return string * @since 1.0.0 */ function charitable_template_donation_receipt_content($content) { if (!charitable_is_page('donation_receipt_page')) { return $content; } /* If we are NOT using the automatic option, this is a static page with the shortcode, so don't filter again. */ if ('auto' != charitable_get_option('donation_receipt_page', 'auto')) { return $content; } return charitable_template_donation_receipt_output($content); }
/** * The callback method for the campaigns shortcode. * * This receives the user-defined attributes and passes the logic off to the class. * * @param array $atts User-defined shortcode attributes. * @return string * @access public * @static * @since 1.2.0 */ public static function display($atts) { return apply_filters('charitable_donation_receipt_shortcode', charitable_template_donation_receipt_output('')); }