Esempio n. 1
0
/**
 * Display the Registration or Admin link.
 *
 * Display a link which allows the user to navigate to the registration page if
 * not logged in and registration is enabled or to the dashboard if logged in.
 *
 * @since 0.0.1
 *
 * @param string $before Text to output before the link. Default `<li>`.
 * @param string $after  Text to output after the link. Default `</li>`.
 * @param bool   $echo   Default to echo and not return the link.
 * @return string|void String when retrieving.
 */
function hq_register($before = '<li>', $after = '</li>', $echo = true)
{
    if (!is_user_logged_in()) {
        if (get_option('users_can_register')) {
            $link = $before . '<a href="' . esc_url(hq_registration_url()) . '">' . __('Register') . '</a>' . $after;
        } else {
            $link = '';
        }
    } else {
        $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
    }
    /**
     * Filter the HTML link to the Registration or Admin page.
     *
     * Users are sent to the admin page if logged-in, or the registration page
     * if enabled and logged-out.
     *
     * @since 0.0.1
     *
     * @param string $link The HTML code for the link to the Registration or Admin page.
     */
    $link = apply_filters('register', $link);
    if ($echo) {
        echo $link;
    } else {
        return $link;
    }
}
Esempio n. 2
0
		<input type="hidden" name="customize-login" value="1" />
<?php 
        }
        ?>
		<input type="hidden" name="testcookie" value="1" />
	</p>
</form>

<?php 
        if (!$interim_login) {
            ?>
<p id="nav">
<?php 
            if (!isset($_GET['checkemail']) || !in_array($_GET['checkemail'], array('confirm', 'nehqass'))) {
                if (get_option('users_can_register')) {
                    $registration_url = sprintf('<a href="%s">%s</a>', esc_url(hq_registration_url()), __('Register'));
                    /** This filter is documented in hq-includes/general-template.php */
                    echo apply_filters('register', $registration_url) . ' | ';
                }
                ?>
	<a href="<?php 
                echo esc_url(hq_lostpassword_url());
                ?>
" title="<?php 
                esc_attr_e('Password Lost and Found');
                ?>
"><?php 
                _e('Lost your password?');
                ?>
</a>
<?php