function qmoa_login_form_content($design = '', $icon_set = 'icon_set', $layout = 'links-column', $button_prefix = '', $align = 'left', $show_login = '******', $show_logout = 'conditional', $logged_out_title = 'Please login:'******'You are already logged in.', $logging_in_title = 'Logging in...', $logging_out_title = 'Logging out...', $style = '', $class = '') { // even though qmoa_login_form() will pass a default, we might call this function from another method so it's important to re-specify the default values // if a design was specified and that design exists, load the shortcode attributes from that design: if ($design != '' && WPOA::qmoa_login_form_design_exists($design)) { // TODO: remove first condition not needed $a = WPOA::qmoa_get_login_form_design($design); $icon_set = $a['icon_set']; $layout = $a['layout']; $button_prefix = $a['button_prefix']; $align = $a['align']; $show_login = $a['show_login']; $show_logout = $a['show_logout']; $logged_out_title = $a['logged_out_title']; $logged_in_title = $a['logged_in_title']; $logging_in_title = $a['logging_in_title']; $logging_out_title = $a['logging_out_title']; $style = $a['style']; $class = $a['class']; } // build the shortcode markup: $html = ""; $html .= "<div class='qmoa-login-form qmoa-layout-{$layout} qmoa-layout-align-{$align} {$class}' style='{$style}' data-logging-in-title='{$logging_in_title}' data-logging-out-title='{$logging_out_title}'>"; $html .= "<nav>"; if (is_user_logged_in()) { if ($logged_in_title) { $html .= "<p id='qmoa-title'>" . $logged_in_title . "</p>"; } if ($show_login == 'always') { $html .= $this->qmoa_login_buttons($icon_set, $button_prefix); } if ($show_logout == 'always' || $show_logout == 'conditional') { $html .= "<a class='qmoa-logout-button' href='" . wp_logout_url() . "' title='Logout'>Logout</a>"; } } else { if ($logged_out_title) { $html .= "<p id='qmoa-title'>" . $logged_out_title . "</p>"; } if ($show_login == 'always' || $show_login == 'conditional') { $html .= $this->qmoa_login_buttons($icon_set, $button_prefix); } if ($show_logout == 'always') { $html .= "<a class='qmoa-logout-button' href='" . wp_logout_url() . "' title='Logout'>Logout</a>"; } } $html .= "</nav>"; $html .= "</div>"; return $html; }