false, ); $args = shortcode_atts( $defaults, $atts, 'charitable_profile' ); ob_start(); /* If the user is logged out, show the login form. */ if ( ! is_user_logged_in() ) { if ( false == $args['hide_login'] ) { $args['redirect'] = charitable_get_current_url(); echo Charitable_Login_Shortcode::display( $args ); } return ob_get_clean(); } $args['form'] = new Charitable_Profile_Form( $args ); /* If the user is logged in, show the profile template. */ charitable_template( 'shortcodes/profile.php', $args ); return apply_filters( 'charitable_profile_shortcode', ob_get_clean() ); } } endif;