Fix wp.suggestCategories return values. Props josephscott. fixes #5406
git-svn-id: http://svn.automattic.com/wordpress/trunk@6416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4004a7cffa
commit
fc8d8837a0
|
@ -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