wp_registration_url example

<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> <p class="submit"> <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Get New Password' ); ?>" /> </p> </form> <p id="nav"> <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> <?php
            if ( get_option( 'users_can_register' ) ) {
                $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() )__( 'Register' ) );

                echo esc_html( $login_link_separator );

                /** This filter is documented in wp-includes/general-template.php */
                echo apply_filters( 'register', $registration_url );
            }

            ?> </p> <?php
        


define( 'WP_INSTALLING', true );

/** Sets up the WordPress Environment. */
require __DIR__ . '/wp-load.php';

require __DIR__ . '/wp-blog-header.php';

if ( ! is_multisite() ) {
    wp_redirect( wp_registration_url() );
    die();
}

$valid_error_codes = array( 'already_active', 'blog_taken' );

list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
$activate_cookie       = 'wp-activate-' . COOKIEHASH;

$key    = '';
$result = null;

function do_signup_header() {
    /** * Fires within the head section of the site sign-up screen. * * @since 3.0.0 */
    do_action( 'signup_header' );
}
add_action( 'wp_head', 'do_signup_header' );

if ( ! is_multisite() ) {
    wp_redirect( wp_registration_url() );
    die();
}

if ( ! is_main_site() ) {
    wp_redirect( network_site_url( 'wp-signup.php' ) );
    die();
}

// Fix for page title. $wp_query->is_404 = false;


function wp_register( $before = '<li>', $after = '</li>', $display = true ) {
    if ( ! is_user_logged_in() ) {
        if ( get_option( 'users_can_register' ) ) {
            $link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __( 'Register' ) . '</a>' . $after;
        } else {
            $link = '';
        }
    } elseif ( current_user_can( 'read' ) ) {
        $link = $before . '<a href="' . admin_url() . '">' . __( 'Site Admin' ) . '</a>' . $after;
    } else {
        $link = '';
    }

    /** * Filters 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 1.5.0 * * @param string $link The HTML code for the link to the Registration or Admin page. */
$redirect['path'] = trailingslashit( $redirect['path'] ) . $addl_path;
            }

            $redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
        }

        if ( 'wp-register.php' === basename( $redirect['path'] ) ) {
            if ( is_multisite() ) {
                /** This filter is documented in wp-login.php */
                $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
            } else {
                $redirect_url = wp_registration_url();
            }

            wp_redirect( $redirect_url, 301 );
            die();
        }
    }

    $redirect['query'] = preg_replace( '#^\??&*?#', '', $redirect['query'] );

    // Tack on any additional query vars.     if ( $redirect_url && ! empty( $redirect['query'] ) ) {
        
Home | Imprint | This part of the site doesn't use cookies.