示例#1
0
function appthemes_get_registration_url($context = 'display')
{
    if (current_theme_supports('app-login') && ($page_id = APP_Registration::get_id())) {
        $url = get_permalink($page_id);
    } else {
        $url = site_url('wp-login.php?action=register');
    }
    return esc_url($url, null, $context);
}
示例#2
0
/**
 * Return url of registration page
 *
 * @param string $context
 *
 * @return string
 */
function appthemes_get_registration_url($context = 'display')
{
    if (current_theme_supports('app-login') && ($page_id = APP_Registration::get_id())) {
        $url = get_permalink($page_id);
    } else {
        $url = site_url('wp-login.php?action=register');
    }
    if (!empty($_REQUEST['redirect_to'])) {
        $url = add_query_arg('redirect_to', urlencode($_REQUEST['redirect_to']), $url);
    }
    return esc_url($url, null, $context);
}
示例#3
0
 function __construct($template)
 {
     self::$_template = $template;
     parent::__construct($template, __('Register', APP_TD));
     add_action('appthemes_after_registration', 'wp_new_user_notification', 10, 2);
     add_filter('register_url', array($this, '_change_register_url'), 10, 1);
 }