WordPress.org

Make WordPress Core

Ticket #8214: 8214.diff

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

     
    11101110 * name__like - Returned terms' names will begin with the value of 'name__like',
    11111111 * case-insensitive. Default is empty string.
    11121112 *
     1113 * description__like - Returned terms' descriptions will begin with the value of
     1114 * 'description__like', case-insensitive. Default is empty string.
     1115 *
    11131116 * The argument 'pad_counts', if set to true will include the quantity of a term's
    11141117 * children in the quantity of each term's "count" object variable.
    11151118 *
     
    11611164                'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(),
    11621165                'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',
    11631166                'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',
    1164                 'pad_counts' => false, 'offset' => '', 'search' => '');
     1167                'description__like' => '', 'pad_counts' => false, 'offset' => '', 'search' => '');
    11651168        $args = wp_parse_args( $args, $defaults );
    11661169        $args['number'] = absint( $args['number'] );
    11671170        $args['offset'] = absint( $args['offset'] );
     
    12871290        if ( !empty($name__like) )
    12881291                $where .= " AND t.name LIKE '" . like_escape( $name__like ) . "%'";
    12891292
     1293        if ( !empty($description__like) )
     1294                $where .= " AND tt.description LIKE '" . like_escape( $description__like ) . "%'";
     1295
    12901296        if ( '' !== $parent ) {
    12911297                $parent = (int) $parent;
    12921298                $where .= " AND tt.parent = '$parent'";