Make WordPress Core

Ticket #31364: 31364.diff

File 31364.diff, 1.5 KB (added by neil_pie, 10 years ago)
  • wp-includes/taxonomy.php

     
    15571557 *
    15581558 *     @type string   $orderby               Field(s) to order terms by. Accepts term fields ('name', 'slug',
    15591559 *                                           'term_group', 'term_id', 'id'), 'count' for term taxonomy count,
    1560  *                                           'include' to match the 'order' of the $include param, or 'none'
    1561  *                                           to skip ORDER BY. Defaults to 'name'.
     1560 *                                           'description' for term taxonomy description, 'include' to match
     1561 *                                           the 'order' of the $include param, or 'none' to skip ORDER BY.
     1562 *                                           Defaults to 'name'.
    15621563 *     @type string   $order                 Whether to order terms in ascending or descending order.
    15631564 *                                           Accepts 'ASC' (ascending) or 'DESC' (descending).
    15641565 *                                           Default 'ASC'.
     
    16981699        $_orderby = strtolower( $args['orderby'] );
    16991700        if ( 'count' == $_orderby ) {
    17001701                $orderby = 'tt.count';
     1702        } elseif ( 'description' == $_orderby ) {
     1703                $orderby = 'tt.description';
    17011704        } elseif ( 'name' == $_orderby ) {
    17021705                $orderby = 't.name';
    17031706        } elseif ( 'slug' == $_orderby ) {