- Timestamp:
- 08/01/2014 09:03:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r29348 r29350 182 182 ) ); 183 183 184 if ( isset( $api->info['groups'] ) ) 184 if ( isset( $api->info['groups'] ) ) { 185 185 $this->groups = $api->info['groups']; 186 } 186 187 } 187 188 … … 294 295 295 296 public function _order_callback( $plugin_a, $plugin_b ) { 296 297 297 $orderby = $this->orderby; 298 if ( ! isset( $plugin_a->$orderby, $plugin_b->$orderby ) )298 if ( ! isset( $plugin_a->$orderby, $plugin_b->$orderby ) ) { 299 299 return 0; 300 } 300 301 301 302 $a = $plugin_a->$orderby; 302 303 $b = $plugin_b->$orderby; 303 304 304 if ( $a == $b ) 305 if ( $a == $b ) { 305 306 return 0; 306 307 if ( 'DESC' == $this->order ) 307 } 308 309 if ( 'DESC' == $this->order ) { 308 310 return ( $a < $b ) ? 1 : -1; 309 else311 } else { 310 312 return ( $a < $b ) ? -1 : 1; 311 }312 313 } 314 } 313 315 314 316 public function display_rows() { … … 330 332 331 333 foreach ( (array) $this->items as $plugin ) { 332 if ( is_object( $plugin ) ) 334 if ( is_object( $plugin ) ) { 333 335 $plugin = (array) $plugin; 336 } 334 337 335 338 // Display the group heading if there is one 336 339 if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) { 337 if ( isset( $this->groups[ $plugin['group'] ] ) ) 340 if ( isset( $this->groups[ $plugin['group'] ] ) ) { 338 341 $group_name = translate( $this->groups[ $plugin['group'] ] ); // Does this need context? 339 else342 } else { 340 343 $group_name = $plugin['group']; 344 } 341 345 342 346 // Starting a new group, close off the divs of the last one … … 359 363 $name = strip_tags( $title . ' ' . $version ); 360 364 361 $author = $plugin['author']; 362 365 $author = wp_kses( $plugin['author'], $plugins_allowedtags ); 363 366 if ( ! empty( $author ) ) { 364 367 $author = ' <cite>' . sprintf( __( 'By %s' ), $author ) . '</cite>'; 365 368 } 366 367 $author = wp_kses( $author, $plugins_allowedtags );368 369 369 370 $action_links = array();
Note: See TracChangeset
for help on using the changeset viewer.