You are here

function themekey_taxonomy_themekey_properties in ThemeKey 6

Same name and namespace in other branches
  1. 6.4 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
  2. 6.2 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
  3. 6.3 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
  4. 7.3 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
  5. 7 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
  6. 7.2 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()

File

modules/themekey.taxonomy.inc, line 3

Code

function themekey_taxonomy_themekey_properties() {

  // Attributes for properties ;)
  $attributes = array();
  $attributes['taxonomy:vid'] = array(
    'multiple' => TRUE,
    'path' => FALSE,
    'weight' => 'themekey_taxonomy_vid_weight',
    'description' => t('Taxonomy: Vocabulary'),
  );
  $attributes['taxonomy:tid'] = array(
    'multiple' => TRUE,
    'path' => 'taxonomy',
    'weight' => 'themekey_taxonomy_tid_weight',
    'description' => t('Taxonomy: Term'),
  );

  // Mapping functions
  $maps = array();
  $maps[] = array(
    'src' => 'taxonomy:tid',
    'dst' => 'taxonomy:vid',
    'callback' => 'themekey_taxonomy_tid2vid',
  );
  $maps[] = array(
    'src' => 'node:nid',
    'dst' => 'taxonomy:vid',
    'callback' => 'themekey_taxonomy_nid2vid',
  );
  $maps[] = array(
    'src' => 'node:nid',
    'dst' => 'taxonomy:tid',
    'callback' => 'themekey_taxonomy_nid2tid',
  );
  return array(
    'attributes' => $attributes,
    'maps' => $maps,
  );
}