Make WordPress Core

Ticket #17630: 17630.2.patch

File 17630.2.patch, 1.6 KB (added by pbearne, 11 years ago)

Patch for extra action

  • src/wp-signup.php

     
    3737        die();
    3838}
    3939
     40$network_site_url = network_site_url( 'wp-signup.php' );
     41/**
     42 * Filter the signup location for this WordPress installation.
     43 *
     44 * @since 4.3.0
     45 *
     46 * @param string $network_site_url URL of the signup page for WordPress.
     47 */
     48$signup_location = apply_filters( 'wp_signup_location', $network_site_url );
     49$signup_location_parts = explode( '?', $signup_location );
     50
     51// Redirect to the true signup location if the URL differs from default.
     52if ( $signup_location_parts[0] !== $network_site_url ) {
     53        wp_redirect( $signup_location );
     54        exit;
     55}
     56
    4057// Fix for page title
    4158$wp_query->is_404 = false;
    4259
     
    6481        </style>
    6582        <?php
    6683}
     84add_action( 'wp_head', 'wpmu_signup_stylesheet' );
    6785
    68 add_action( 'wp_head', 'wpmu_signup_stylesheet' );
     86/**
     87 * Fires just before the site sign-up header.
     88 *
     89 * @since 4.4.0
     90 */
     91do_action( 'before_signup_header ' );
    6992get_header();
    7093
    7194/**
     
    91114        $current_site = get_current_site();
    92115        // Blog name
    93116        if ( !is_subdomain_install() )
    94                 echo '<label for="blogname">' . __('Site Name:') . '</label>';
     117                echo '<label for="blogname">' . __( 'Site Name:' ) . '</label>';
    95118        else
    96                 echo '<label for="blogname">' . __('Site Domain:') . '</label>';
     119                echo '<label for="blogname">' . __( 'Site Domain:' ) . '</label>';
    97120
    98         if ( $errmsg = $errors->get_error_message('blogname') ) { ?>
     121        if ( $errmsg = $errors->get_error_message( 'blogname' ) ) { ?>
    99122                <p class="error"><?php echo $errmsg ?></p>
    100123        <?php }
    101124