Make WordPress Core

Ticket #8214: 8214.2.diff

File 8214.2.diff, 1.7 KB (added by wonderboymusic, 10 years ago)
  • wp-includes/taxonomy.php

    diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
    index 955369e..3e19590 100644
    function get_term_to_edit( $id, $taxonomy ) { 
    11581158 * name__like - Returned terms' names will begin with the value of 'name__like',
    11591159 * case-insensitive. Default is empty string.
    11601160 *
     1161 * description__like - Returned terms' descriptions will begin with the value of
     1162 *  'description__like', case-insensitive. Default is empty string.
     1163 *
    11611164 * The argument 'pad_counts', if set to true will include the quantity of a term's
    11621165 * children in the quantity of each term's "count" object variable.
    11631166 *
    function get_terms($taxonomies, $args = '') { 
    12111214        $defaults = array('orderby' => 'name', 'order' => 'ASC',
    12121215                'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(),
    12131216                'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',
    1214                 'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',
     1217                'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '', 'description__like' => '',
    12151218                'pad_counts' => false, 'offset' => '', 'search' => '', 'cache_domain' => 'core' );
    12161219        $args = wp_parse_args( $args, $defaults );
    12171220        $args['number'] = absint( $args['number'] );
    function get_terms($taxonomies, $args = '') { 
    13461349                $where .= $wpdb->prepare( " AND t.name LIKE %s", $name__like . '%' );
    13471350        }
    13481351
     1352        if ( ! empty( $description__like ) ) {
     1353                $description__like = like_escape( $description__like );
     1354                $where .= $wpdb->prepare( " AND tt.description LIKE %s", $description__like . '%' );
     1355        }
     1356
    13491357        if ( '' !== $parent ) {
    13501358                $parent = (int) $parent;
    13511359                $where .= " AND tt.parent = '$parent'";