Manage categories redesign. Add categories search.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-02-12 09:02:02 +00:00
parent 1bd097fff0
commit 8bd0691aa3
4 changed files with 44 additions and 20 deletions

View File

@@ -525,7 +525,7 @@ function &get_terms($taxonomies, $args = '') {
'hide_empty' => true, 'exclude' => '', 'include' => '',
'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',
'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',
'pad_counts' => false, 'offset' => '');
'pad_counts' => false, 'offset' => '', 'search' => '');
$args = wp_parse_args( $args, $defaults );
$args['number'] = absint( $args['number'] );
$args['offset'] = absint( $args['offset'] );
@@ -635,6 +635,11 @@ function &get_terms($taxonomies, $args = '') {
} else
$number = '';
if ( !empty($search) ) {
$search = like_escape($search);
$where .= " AND (t.name LIKE '%$search%')";
}
if ( 'all' == $fields )
$select_this = 't.*, tt.*';
else if ( 'ids' == $fields )