/** * Log the current user out. * * @since 0.0.1 */ function hq_logout() { hq_destroy_current_session(); hq_clear_auth_cookie(); /** * Fires after a user is logged-out. * * @since 0.0.1 */ do_action('hq_logout'); }
} elseif (strpos($redirect_to, 'about.php?updated')) { $errors->add('updated', __('<strong>You have successfully updated HiveQueen!</strong> Please log back in to see what’s new.'), 'message'); } } /** * Filter the login page errors. * * @since 0.0.1 * * @param object $errors HQ Error object. * @param string $redirect_to Redirect destination URL. */ $errors = apply_filters('hq_login_errors', $errors, $redirect_to); // Clear any stale cookies. if ($reauth) { hq_clear_auth_cookie(); } login_header(__('Log In'), '', $errors); if (isset($_POST['log'])) { $user_login = '******' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ? esc_attr(hq_unslash($_POST['log'])) : ''; } $rememberme = !empty($_POST['rememberme']); if (!empty($errors->errors)) { $aria_describedby_error = ' aria-describedby="login_error"'; } else { $aria_describedby_error = ''; } ?> <form name="loginform" id="loginform" action="<?php echo esc_url(site_url('hq-login.php', 'login_post'));