Make WordPress Core

Ticket #39611: 39611.2.patch

File 39611.2.patch, 1.8 KB (added by SergeyBiryukov, 8 years ago)
  • src/wp-signup.php

     
    816816 */
    817817$active_signup = apply_filters( 'wpmu_active_signup', $active_signup );
    818818
    819 // Make the signup type translatable.
    820 $i18n_signup['all'] = _x('all', 'Multisite active signup type');
    821 $i18n_signup['none'] = _x('none', 'Multisite active signup type');
    822 $i18n_signup['blog'] = _x('blog', 'Multisite active signup type');
    823 $i18n_signup['user'] = _x('user', 'Multisite active signup type');
     819if ( is_super_admin() ) {
     820        echo '<div class="mu_alert">';
     821        _e( 'Greetings Network Administrator!' );
    824822
    825 if ( is_super_admin() ) {
    826         /* translators: 1: type of site sign-up; 2: network settings URL */
    827         echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '</div>';
     823        switch ( $i18n_signup[ $active_signup ] ) {
     824                case 'none':
     825                        _e( 'The network currently disallows registrations.' );
     826                        break;
     827                case 'blog':
     828                        _e( 'The network currently allows site registrations.' );
     829                        break;
     830                case 'user':
     831                        _e( 'The network currently allows user registrations.' );
     832                        break;
     833                default:
     834                        _e( 'The network currently allows site and user registrations.' );
     835                        break;
     836        }
     837
     838        /* translators: %s: network settings URL */
     839        printf( __( 'To change or disable registration go to your <a href="%s">Options page</a>.' ), esc_url( network_admin_url( 'settings.php' ) ) );
     840        echo '</div>';
    828841}
    829842
    830843$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;