function themekey_taxonomy_themekey_properties in ThemeKey 6.4
Same name and namespace in other branches
- 6 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
- 6.2 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
- 6.3 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
- 7.3 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
- 7 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
- 7.2 modules/themekey.taxonomy.inc \themekey_taxonomy_themekey_properties()
Implements hook_themekey_properties().
Provides additional properties for module ThemeKey:
- taxonomy:vid
- taxonomy:tid
- taxonomy:tid_and_childs
Return value
array of themekey properties and mapping functions
File
- modules/
themekey.taxonomy.inc, line 26 - Provides some taxonomy stuff as ThemeKey properties.
Code
function themekey_taxonomy_themekey_properties() {
// Attributes for properties ;)
$attributes = array();
$attributes['taxonomy:vid'] = array(
'description' => t('Taxonomy: Vocabulary - The vocabulary id (vid) of a taxonomy vocabulary. See !link for your vocabularies.', array(
'!link' => l(t('!path', array(
'!path' => 'admin/content/taxonomy',
)), 'admin/content/taxonomy'),
)),
'validator' => 'themekey_validator_ctype_digit',
'page cache' => THEMEKEY_PAGECACHE_SUPPORTED,
);
$attributes['taxonomy:tid'] = array(
'description' => t('Taxonomy: Term - The term id (tid) of a taxonomy term.'),
'validator' => 'themekey_validator_ctype_digit',
'page cache' => THEMEKEY_PAGECACHE_SUPPORTED,
);
$attributes['taxonomy:tid_and_childs'] = array(
'description' => t('Taxonomy: Term and its children - The term id (tid) of a taxonomy term. If set, all child terms of this term will be used too.'),
'validator' => 'themekey_validator_ctype_digit',
'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
);
// Mapping functions
$maps = array();
$maps[] = array(
'src' => 'taxonomy:tid',
'dst' => 'taxonomy:vid',
'callback' => 'themekey_taxonomy_tid2vid',
);
$maps[] = array(
'src' => 'taxonomy:tid',
'dst' => 'taxonomy:tid_and_childs',
'callback' => 'themekey_taxonomy_tid2tid_and_parents',
);
$maps[] = array(
'src' => 'node:vid',
'dst' => 'taxonomy:vid',
'callback' => 'themekey_taxonomy_vid2vid',
);
$maps[] = array(
'src' => 'node:vid',
'dst' => 'taxonomy:tid',
'callback' => 'themekey_taxonomy_vid2tid',
);
$maps[] = array(
'src' => 'node:vid',
'dst' => 'taxonomy:tid_and_childs',
'callback' => 'themekey_taxonomy_vid2tid_and_parents',
);
return array(
'attributes' => $attributes,
'maps' => $maps,
);
}