Ticket #18490: class-wp-upgrader.patch
| File class-wp-upgrader.patch, 1.8 KB (added by , 14 years ago) |
|---|
-
wp-admin/includes/class-wp-upgrader.php
1351 1351 1352 1352 $install_actions = array( 1353 1353 'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>', 1354 'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>'1355 );1354 'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>' 1355 ); 1356 1356 1357 if( ! empty( $template ) ) { 1358 global $wp_filesystem; 1359 $themes_dir = $wp_filesystem->wp_themes_dir(); 1360 $template_data = get_theme_data( $themes_dir . $template . '/style.css' ); 1361 1362 if( empty( $template_data[ 'Name' ] ) ) { 1363 unset( $install_actions[ 'activate' ] ); 1364 echo sprintf( __( 'Unable to locate the required parent theme: <strong>%1$s</strong>.<br />You will need to install the parent theme before being able to activate this theme.' ) , $template ); 1365 } 1366 } 1367 1357 1368 if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) 1358 1369 $install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . $template, 'enable-theme_' . $template ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>'; 1359 1370 … … 1458 1469 $this->package = $uploads['basedir'] . '/' . $this->filename; 1459 1470 } 1460 1471 } 1461 } 1462 No newline at end of file 1472 }