WordPress.org

Make WordPress Core

Changeset 6416


Ignore:
Timestamp:
12/19/2007 08:30:44 PM (10 years ago)
Author:
ryan
Message:

Fix wp.suggestCategories return values. Props josephscott. fixes #5406

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r6364 r6416  
    545545        }
    546546
     547        $category_suggestions = array();
    547548        $args = array('get' => 'all', 'number' => $max_results, 'name__like' => $category);
    548         $category_suggestions = get_categories($args);
     549        foreach ( (array) get_categories($args) as $cat ) {
     550            $category_suggestions[] = array(
     551                "category_id"   => $cat->cat_ID,
     552                "category_name" => $cat->cat_name
     553            );
     554        }
    549555
    550556        return($category_suggestions);
Note: See TracChangeset for help on using the changeset viewer.