Make WordPress Core

Ticket #8214: 8214.002.diff

File 8214.002.diff, 1.5 KB (added by aaroncampbell, 14 years ago)
  • wp-includes/taxonomy.php

     
    10761076 * name__like - Returned terms' names will begin with the value of 'name__like',
    10771077 * case-insensitive. Default is empty string.
    10781078 *
     1079 * description__like - Returned terms' descriptions will begin with the value of
     1080 * 'description__like', case-insensitive. Default is empty string.
     1081 *
    10791082 * The argument 'pad_counts', if set to true will include the quantity of a term's
    10801083 * children in the quantity of each term's "count" object variable.
    10811084 *
     
    11271130                'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(),
    11281131                'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',
    11291132                'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',
    1130                 'pad_counts' => false, 'offset' => '', 'search' => '');
     1133                'description__like' => '', 'pad_counts' => false, 'offset' => '',
     1134                'search' => '');
    11311135        $args = wp_parse_args( $args, $defaults );
    11321136        $args['number'] = absint( $args['number'] );
    11331137        $args['offset'] = absint( $args['offset'] );
     
    12531257        if ( !empty($name__like) )
    12541258                $where .= " AND t.name LIKE '" . like_escape( $name__like ) . "%'";
    12551259
     1260        if ( !empty($description__like) )
     1261                $where .= " AND tt.description LIKE '" . like_escape( $description__like ) . "%'";
     1262
    12561263        if ( '' !== $parent ) {
    12571264                $parent = (int) $parent;
    12581265                $where .= " AND tt.parent = '$parent'";