Make WordPress Core

Changeset 32029


Ignore:
Timestamp:
04/05/2015 02:57:35 PM (10 years ago)
Author:
SergeyBiryukov
Message:

After [31941], use the decoupled strings from wp-admin/network/themes.php in wp-admin/network/site-themes.php as well.

fixes #28502.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-themes.php

    r31973 r32029  
    157157
    158158if ( isset( $_GET['enabled'] ) ) {
    159     $_GET['enabled'] = absint( $_GET['enabled'] );
    160     echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '</p></div>';
     159    $enabled = absint( $_GET['enabled'] );
     160    if ( 1 == $enabled ) {
     161        $message = __( 'Theme enabled.' );
     162    } else {
     163        $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
     164    }
     165    echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
    161166} elseif ( isset( $_GET['disabled'] ) ) {
    162     $_GET['disabled'] = absint( $_GET['disabled'] );
    163     echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '</p></div>';
     167    $disabled = absint( $_GET['disabled'] );
     168    if ( 1 == $disabled ) {
     169        $message = __( 'Theme disabled.' );
     170    } else {
     171        $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
     172    }
     173    echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
    164174} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
    165175    echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
Note: See TracChangeset for help on using the changeset viewer.