function themekey_comment_themekey_properties in ThemeKey 6.3
Same name and namespace in other branches
- 6.4 modules/themekey.comment.inc \themekey_comment_themekey_properties()
- 6 modules/themekey.comment.inc \themekey_comment_themekey_properties()
- 6.2 modules/themekey.comment.inc \themekey_comment_themekey_properties()
- 7.3 modules/themekey.comment.inc \themekey_comment_themekey_properties()
- 7 modules/themekey.comment.inc \themekey_comment_themekey_properties()
- 7.2 modules/themekey.comment.inc \themekey_comment_themekey_properties()
Implements hook_themekey_properties().
Provides additional properties for module ThemeKey:
- comment:cid
Return value
array of themekey properties and mapping functions
File
- modules/
themekey.comment.inc, line 24 - Provides some comment attributes as ThemeKey properties.
Code
function themekey_comment_themekey_properties() {
// Attributes for properties
$attributes = array();
$attributes['comment:cid'] = array(
'description' => t('Comment: ID - The id of a comment (cid). See !link for your published comments or !link_unpublished for comments awaiting approval', array(
'!link' => l(t('!path', array(
'!path' => 'admin/content/comment',
)), 'admin/content/comment'),
'!link_unpublished' => l(t('!path', array(
'!path' => 'admin/content/comment/approval',
)), 'admin/content/comment/approval'),
)),
'validator' => 'themekey_validator_ctype_digit',
'page cache' => THEMEKEY_PAGECACHE_SUPPORTED,
);
// Mapping functions
$maps = array();
$maps[] = array(
'src' => 'comment:cid',
'dst' => 'node:nid',
'callback' => 'themekey_comment_cid2nid',
);
return array(
'attributes' => $attributes,
'maps' => $maps,
);
}