Fix wp.suggestCategories return values. Props josephscott. fixes #5406
git-svn-id: https://develop.svn.wordpress.org/trunk@6416 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c66540fc1a
commit
75561df04f
@ -544,8 +544,14 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
return($this->error);
|
||||
}
|
||||
|
||||
$category_suggestions = array();
|
||||
$args = array('get' => 'all', 'number' => $max_results, 'name__like' => $category);
|
||||
$category_suggestions = get_categories($args);
|
||||
foreach ( (array) get_categories($args) as $cat ) {
|
||||
$category_suggestions[] = array(
|
||||
"category_id" => $cat->cat_ID,
|
||||
"category_name" => $cat->cat_name
|
||||
);
|
||||
}
|
||||
|
||||
return($category_suggestions);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user