?> </div> <!-- .form-padding --> </div> <!-- .wpoa-settings-section --> <!-- END Login Page & Form Customization section --> <!-- START Custom Login Form Designs section --> <div id="wpoa-settings-section-custom-login-form-designs" class="wpoa-settings-section"> <h3>Custom Login Form Designs</h3> <div class='form-padding'> <p>You may create multiple login form <strong><em>designs</em></strong> and use them throughout your site. A design is essentially a re-usable <em>shortcode preset</em>. Instead of writing out the login form shortcode ad-hoc each time you want to use it, you can build a design here, save it, and then specify that design in the shortcode's <em>design</em> attribute. For example: <pre><code>[wpoa_login_form design='CustomDesign1']</code></pre></p> <table class='form-table'> <tr valign='top' class="has-tip"> <th scope='row'>Design: <a href="#" class="tip-button">[?]</a></th> <td> <?php echo WPOA::wpoa_login_form_designs_selector('wpoa-login-form-design', true); ?> <p> <input type="button" id="wpoa-login-form-new" class="button" value="New"> <input type="button" id="wpoa-login-form-edit" class="button" value="Edit"> <input type="button" id="wpoa-login-form-delete" class="button" value="Delete"> </p> <p class="tip-message">Here you may create a new design, select an existing design to edit, or delete an existing design.</p> <p class="tip-message tip-info"><strong>Tip: </strong>Make sure to click the <em>Save all settings</em> button after making changes here.</p> </td> </tr> </table> <!-- .form-table --> <table class="form-table" id="wpoa-login-form-design-form"> <tr valign='top'> <th colspan="2">
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; }