You are here

function smileys_import_parse_plist in Smileys 6

Custom callback; Parse the plist information for a smiley package.

1 call to smileys_import_parse_plist()
smileys_import_add_plist in ./smileys_import.module

File

./smileys_import.module, line 171

Code

function smileys_import_parse_plist($plist_pack = NULL) {
  include 'plist.inc';
  $packs = array();
  $key = array();
  smileys_import_packs_plist($packs);
  foreach ($packs as $pack) {
    $path = dirname(__FILE__) . str_replace(drupal_get_path('module', 'smileys'), '', $pack->filename);
    $plistDocument = new DOMDocument();
    $plistDocument
      ->load($path);
    $keys[$pack->name] = parsePlist($plistDocument);
  }
  if (!empty($plist_pack) && !empty($keys[$plist_pack])) {
    return $keys[$plist_pack];
  }
  return $keys;
}