Ejemplo n.º 1
0
/**
 * Return url of login page
 *
 * @param string $context
 *
 * @return string
 */
function appthemes_get_login_url($context = 'display', $redirect_to = '')
{
    $args = wp_array_slice_assoc($_GET, array('checkemail', 'registration', 'loggedout'));
    if (!empty($redirect_to)) {
        $args['redirect_to'] = urlencode($redirect_to);
    }
    if (current_theme_supports('app-login') && ($page_id = APP_Login::get_id())) {
        $url = get_permalink($page_id);
    } else {
        $url = site_url('wp-login.php');
    }
    $url = add_query_arg($args, $url);
    return esc_url($url, null, $context);
}
Ejemplo n.º 2
0
/**
 * Return url of login page
 *
 * @param string $context
 *
 * @return string
 */
function appthemes_get_login_url($context = 'display', $redirect_to = '')
{
    $args = array();
    if (!empty($redirect_to)) {
        $args['redirect_to'] = urlencode($redirect_to);
    }
    if (current_theme_supports('app-login') && ($page_id = APP_Login::get_id())) {
        $url = get_permalink($page_id);
    } else {
        $url = site_url('wp-login.php');
    }
    $url = add_query_arg($args, $url);
    return esc_url($url, null, $context);
}