Changeset 31941 for trunk/src/wp-admin/network/themes.php
- Timestamp:
- 03/31/2015 06:44:46 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/network/themes.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/themes.php
r31696 r31941 147 147 wp_enqueue_script( 'jquery' ); 148 148 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 149 $themes_to_delete = count( $themes ); 149 150 ?> 150 151 <div class="wrap"> 151 <?php 152 $themes_to_delete = count( $themes ); 153 echo '<h2>' . _n( 'Delete Theme', 'Delete Themes', $themes_to_delete ) . '</h2>'; 154 ?> 155 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo _n( 'This theme may be active on other sites in the network.', 'These themes may be active on other sites in the network.', $themes_to_delete ); ?></p></div> 156 <p><?php echo _n( 'You are about to remove the following theme:', 'You are about to remove the following themes:', $themes_to_delete ); ?></p> 152 <?php if ( 1 == $themes_to_delete ) : ?> 153 <h2><?php _e( 'Delete Theme' ); ?></h2> 154 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This theme may be active on other sites in the network.' ); ?></p></div> 155 <p><?php _e( 'You are about to remove the following theme:' ); ?></p> 156 <?php else : ?> 157 <h2><?php _e( 'Delete Themes' ); ?></h2> 158 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These themes may be active on other sites in the network.' ); ?></p></div> 159 <p><?php _e( 'You are about to remove the following themes:' ); ?></p> 160 <?php endif; ?> 157 161 <ul class="ul-disc"> 158 162 <?php … … 163 167 ?> 164 168 </ul> 165 <p><?php _e('Are you sure you wish to delete these themes?'); ?></p> 169 <?php if ( 1 == $themes_to_delete ) : ?> 170 <p><?php _e( 'Are you sure you wish to delete this theme?' ); ?></p> 171 <?php else : ?> 172 <p><?php _e( 'Are you sure you wish to delete these themes?' ); ?></p> 173 <?php endif; ?> 166 174 <form method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;"> 167 175 <input type="hidden" name="verify-delete" value="1" /> … … 171 179 echo '<input type="hidden" name="checked[]" value="' . esc_attr($theme) . '" />'; 172 180 } 181 182 wp_nonce_field( 'bulk-themes' ); 183 184 if ( 1 == $themes_to_delete ) { 185 submit_button( __( 'Yes, Delete this theme' ), 'button', 'submit', false ); 186 } else { 187 submit_button( __( 'Yes, Delete these themes' ), 'button', 'submit', false ); 188 } 173 189 ?> 174 <?php wp_nonce_field('bulk-themes') ?>175 <?php submit_button( _n( 'Yes, Delete this theme', 'Yes, Delete these themes', $themes_to_delete ), 'button', 'submit', false ); ?>176 190 </form> 177 191 <?php … … 255 269 <?php 256 270 if ( isset( $_GET['enabled'] ) ) { 257 $_GET['enabled'] = absint( $_GET['enabled'] ); 258 echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '</p></div>'; 271 $enabled = absint( $_GET['enabled'] ); 272 if ( 1 == $enabled ) { 273 $message = __( 'Theme enabled.' ); 274 } else { 275 $message = _n( '%s theme enabled.', '%s themes enabled.', $enabled ); 276 } 277 echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>'; 259 278 } elseif ( isset( $_GET['disabled'] ) ) { 260 $_GET['disabled'] = absint( $_GET['disabled'] ); 261 echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '</p></div>'; 279 $disabled = absint( $_GET['disabled'] ); 280 if ( 1 == $disabled ) { 281 $message = __( 'Theme disabled.' ); 282 } else { 283 $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled ); 284 } 285 echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>'; 262 286 } elseif ( isset( $_GET['deleted'] ) ) { 263 $_GET['deleted'] = absint( $_GET['deleted'] ); 264 echo '<div id="message" class="updated"><p>' . sprintf( _nx( 'Theme deleted.', '%s themes deleted.', $_GET['deleted'], 'network' ), number_format_i18n( $_GET['deleted'] ) ) . '</p></div>'; 287 $deleted = absint( $_GET['deleted'] ); 288 if ( 1 == $deleted ) { 289 $message = __( 'Theme deleted.' ); 290 } else { 291 $message = _n( '%s theme deleted.', '%s themes deleted.', $deleted ); 292 } 293 echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>'; 265 294 } elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) { 266 295 echo '<div id="message" class="error"><p>' . __( 'No theme selected.' ) . '</p></div>';
Note: See TracChangeset
for help on using the changeset viewer.