Ticket #11050: plugin-install.patch
File plugin-install.patch, 2.9 KB (added by , 15 years ago) |
---|
-
Users/scottbasgaard/Sites/trunk/wp-admin/includes/plugin-install.php
309 309 <th scope="col" class="num"><?php _e('Version'); ?></th> 310 310 <th scope="col" class="num"><?php _e('Rating'); ?></th> 311 311 <th scope="col" class="desc"><?php _e('Description'); ?></th> 312 <th scope="col" class="action-links"><?php _e('Actions'); ?></th>313 312 </tr> 314 313 </thead> 315 314 … … 319 318 <th scope="col" class="num"><?php _e('Version'); ?></th> 320 319 <th scope="col" class="num"><?php _e('Rating'); ?></th> 321 320 <th scope="col" class="desc"><?php _e('Description'); ?></th> 322 <th scope="col" class="action-links"><?php _e('Actions'); ?></th>323 321 </tr> 324 322 </tfoot> 325 323 … … 333 331 $plugin = (array) $plugin; 334 332 335 333 $title = wp_kses($plugin['name'], $plugins_allowedtags); 334 $version = wp_kses($plugin['version'], $plugins_allowedtags); 335 $name = strip_tags($title . ' ' . $version); 336 $title = '<a href="' . admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . 337 '&TB_iframe=true&width=600&height=550') . '" class="thickbox onclick" title="' . 338 esc_attr($name) . '">' . $name . '</a>'; 339 336 340 //Limit description to 400char, and remove any HTML. 337 341 $description = strip_tags($plugin['description']); 338 342 if ( strlen($description) > 400 ) … … 344 348 $description = preg_replace("|(\r?\n)+|", "\n", $description); 345 349 //\n => <br> 346 350 $description = nl2br($description); 347 $version = wp_kses($plugin['version'], $plugins_allowedtags);348 351 349 $name = strip_tags($title . ' ' . $version);350 351 352 $author = $plugin['author']; 352 353 if ( ! empty($plugin['author']) ) 353 354 $author = ' <cite>' . sprintf( __('By %s'), $author ) . '.</cite>'; 354 355 355 356 $author = wp_kses($author, $plugins_allowedtags); 356 357 if ( isset($plugin['homepage']) )358 $title = '<a target="_blank" href="' . esc_attr($plugin['homepage']) . '">' . $title . '</a>';359 360 $action_links = array();361 $action_links[] = '<a href="' . admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .362 '&TB_iframe=true&width=600&height=550') . '" class="thickbox onclick" title="' .363 esc_attr($name) . '">' . __('Install') . '</a>';364 365 $action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);366 357 ?> 367 358 <tr> 368 359 <td class="name"><?php echo $title; ?></td> … … 378 369 </div> 379 370 </td> 380 371 <td class="desc"><?php echo $description, $author; ?></td> 381 <td class="action-links"><?php if ( !empty($action_links) ) echo implode(' | ', $action_links); ?></td>382 372 </tr> 383 373 <?php 384 374 }