Undocumented API changes?


I'm updating some themes for Omeka 2.0 and haven't found any documentation for replacing the functionality of the following deprecated functions:

  • get_items()
  • get_tags()
  • get_collections()

I've browsed the "Updating Plugins for 2.0" guide, which so far has been really helpful, but I still haven't figured out how to return an array of tags, items, and collections (where the array output can be sorted, limited and filtered via various conditions).

I did see the get/set functions but am not sure exactly how or if that translates.

Thanks -- it does look like we've missed that on that list. get_records() does the general trick in general.

See also the other body-related functions

$items = get_records('Item'); //10 most recent items
$items = get_records('Item', array(), 25); //25 most recent items
$items = get_records('Item', array('tag'=>'mytag'); // first 10 items with tag 'mytag'


There's now a mention of this in the Updating Themes section of the new docs.