My Sites: Make "Create a New Site" link consistent with other "Add New" links.

Props JeffMatson.
Fixes #34179.

git-svn-id: https://develop.svn.wordpress.org/trunk@34979 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-10-09 03:49:24 +00:00
parent fb6d5f4aba
commit b39b5b8758
2 changed files with 10 additions and 12 deletions

View File

@ -828,17 +828,6 @@ function choose_primary_blog() {
?>
</td>
</tr>
<?php if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) : ?>
<tr>
<th scope="row" colspan="2" class="th-full">
<?php
/** This filter is documented in wp-login.php */
$sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
?>
<a href="<?php echo esc_url( $sign_up_url ); ?>"><?php _e( 'Create a New Site' ); ?></a>
</th>
</tr>
<?php endif; ?>
</table>
<?php
}

View File

@ -56,7 +56,16 @@ if ( $updated ) { ?>
<?php } ?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
<h1><?php
echo esc_html( $title );
if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) {
/** This filter is documented in wp-login.php */
$sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html_x( 'Add New', 'site' ) );
}
?></h1>
<?php
if ( empty( $blogs ) ) :
echo '<p>';