Make WordPress Core


Ignore:
Timestamp:
08/01/2014 09:03:48 PM (9 years ago)
Author:
ocean90
Message:

Add some braces to [29225].

see #28673.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r29348 r29350  
    182182        ) );
    183183
    184         if ( isset( $api->info['groups'] ) )
     184        if ( isset( $api->info['groups'] ) ) {
    185185            $this->groups = $api->info['groups'];
     186        }
    186187    }
    187188
     
    294295
    295296    public function _order_callback( $plugin_a, $plugin_b ) {
    296 
    297297        $orderby = $this->orderby;
    298         if ( !isset( $plugin_a->$orderby, $plugin_b->$orderby ) )
     298        if ( ! isset( $plugin_a->$orderby, $plugin_b->$orderby ) ) {
    299299            return 0;
     300        }
    300301
    301302        $a = $plugin_a->$orderby;
    302303        $b = $plugin_b->$orderby;
    303304
    304         if ( $a == $b )
     305        if ( $a == $b ) {
    305306            return 0;
    306 
    307         if ( 'DESC' == $this->order )
     307        }
     308
     309        if ( 'DESC' == $this->order ) {
    308310            return ( $a < $b ) ? 1 : -1;
    309         else
     311        } else {
    310312            return ( $a < $b ) ? -1 : 1;
    311     }
    312 
     313        }
     314    }
    313315
    314316    public function display_rows() {
     
    330332
    331333        foreach ( (array) $this->items as $plugin ) {
    332             if ( is_object( $plugin ) )
     334            if ( is_object( $plugin ) ) {
    333335                $plugin = (array) $plugin;
     336            }
    334337
    335338            // Display the group heading if there is one
    336339            if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) {
    337                 if ( isset( $this->groups[ $plugin['group'] ] ) )
     340                if ( isset( $this->groups[ $plugin['group'] ] ) ) {
    338341                    $group_name = translate( $this->groups[ $plugin['group'] ] ); // Does this need context?
    339                 else
     342                } else {
    340343                    $group_name = $plugin['group'];
     344                }
    341345
    342346                // Starting a new group, close off the divs of the last one
     
    359363            $name = strip_tags( $title . ' ' . $version );
    360364
    361             $author = $plugin['author'];
    362 
     365            $author = wp_kses( $plugin['author'], $plugins_allowedtags );
    363366            if ( ! empty( $author ) ) {
    364367                $author = ' <cite>' . sprintf( __( 'By %s' ), $author ) . '</cite>';
    365368            }
    366 
    367             $author = wp_kses( $author, $plugins_allowedtags );
    368369
    369370            $action_links = array();
Note: See TracChangeset for help on using the changeset viewer.