Ticket #32668: 32668.2.diff
File 32668.2.diff, 1.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/themes.php
300 300 301 301 <?php 302 302 $can_delete = current_user_can( 'delete_themes' ); 303 $can_install = current_user_can( 'install_themes' ); 303 304 ?> 304 305 <table> 305 306 <tr> 306 307 <th><?php _ex('Name', 'theme name'); ?></th> 307 308 <th><?php _e('Description'); ?></th> 309 <?php if ( $can_install ) { ?> 310 <td></td> 311 <?php } ?> 308 312 <?php if ( $can_delete ) { ?> 309 313 <td></td> 310 314 <?php } ?> … … 314 318 <td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td> 315 319 <td><?php echo $broken_theme->errors()->get_error_message(); ?></td> 316 320 <?php 321 if ( $can_install ) { 322 $parent_theme_name = $broken_theme->get( 'Template' ); 323 $parent_theme = themes_api( 'theme_information', array( 'slug' => urlencode( $parent_theme_name ) ) ); 324 325 if ( ! is_wp_error( $parent_theme ) ) { 326 $install_url = add_query_arg( array( 327 'action' => 'install-theme', 328 'theme' => urlencode( $parent_theme_name ), 329 ), admin_url( 'update.php' ) ); 330 $install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name ); 331 ?> 332 <td><a href="<?php echo esc_url( $install_url ); ?>" class="button button-secondary install-theme"><?php _e( 'Install Parent Theme' ); ?></a></td> 333 <?php 334 } 335 } 336 317 337 if ( $can_delete ) { 318 338 $stylesheet = $broken_theme->get_stylesheet(); 319 339 $delete_url = add_query_arg( array(