Ticket #12694: 12694.diff
| File 12694.diff, 3.8 KB (added by dd32, 3 years ago) |
|---|
-
wp-admin/includes/theme-install.php
57 57 $res = new WP_Error('themes_api_failed', __('An Unexpected HTTP Error occured during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $request->get_error_message() ); 58 58 } else { 59 59 $res = unserialize($request['body']); 60 if ( ! $res ) 61 $res = new WP_Error('themes_api_failed', __('An unknown error occured'), $request['body']); 60 if ( false === $res ) 61 $res = new WP_Error('themes_api_failed', __('An unknown error occured'), $request['body']); 62 elseif ( null === $res ) 63 $res = new WP_Error('themes_theme_404', __('The requested Theme could not be found in the WordPress Themes Directory.')); 62 64 } 63 65 } 64 66 //var_dump(array($args, $res)); … … 340 342 </div> 341 343 </div> 342 344 <?php } 343 /*344 object(stdClass)[59]345 public 'name' => string 'Magazine Basic' (length=14)346 public 'slug' => string 'magazine-basic' (length=14)347 public 'version' => string '1.1' (length=3)348 public 'author' => string 'tinkerpriest' (length=12)349 public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36)350 public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68)351 public 'rating' => float 80352 public 'num_ratings' => int 1353 public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49)354 public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.' (length=214)355 public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)356 */357 345 } 358 346 359 347 /** -
wp-admin/themes.php
257 257 <tr> 258 258 <th><?php _e('Name'); ?></th> 259 259 <th><?php _e('Description'); ?></th> 260 <th><?php _e('Actions'); ?></th> 260 261 </tr> 261 262 <?php 262 263 $theme = ''; … … 267 268 foreach ($theme_names as $theme_name) { 268 269 $title = $broken_themes[$theme_name]['Title']; 269 270 $description = $broken_themes[$theme_name]['Description']; 271 $stylesheet = $broken_themes[$theme_name]['Name']; 272 $missing_parent = (isset($broken_themes[$theme_name]['error']) && 'no_parent' == $broken_themes[$theme_name]['error']) ? $broken_themes[$theme_name]['parent'] : false; 270 273 274 $actions = array(); 275 if ( current_user_can('delete_themes') ) 276 $actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet) . '" onclick="' . "return confirm('" . esc_js(sprintf( __("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $theme_name )) . "');" . '">' . __('Delete') . '</a>'; 277 278 if ( current_user_can('install_themes') && !empty($missing_parent) ) 279 $actions['install'] = '<a href="' . admin_url('theme-install.php?tab=theme-information&theme=' . urlencode($missing_parent) . '&TB_iframe=true&tbWidth=500&tbHeight=385') . '" class="thickbox thickbox-preview">' . __('Install Parent Theme') . '</a>'; 280 281 $actions = apply_filters('broken_theme_action_links', $actions, $broken_themes[$theme_name]); 282 $actions = implode ( ' | ', $actions ); 283 271 284 $theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"'; 272 285 echo " 273 286 <tr $theme> 274 287 <td>$title</td> 275 288 <td>$description</td> 289 <td style='white-space:nowrap;'>$actions</td> 276 290 </tr>"; 277 291 } 278 292 ?>
