function privatemsg_theme in Privatemsg 7
Same name and namespace in other branches
- 6.2 privatemsg.module \privatemsg_theme()
- 6 privatemsg.module \privatemsg_theme()
- 7.2 privatemsg.module \privatemsg_theme()
File
- ./
privatemsg.module, line 701 - Allows users to send private messages to other users.
Code
function privatemsg_theme() {
$templates = array(
'privatemsg_view' => array(
'variables' => array(
'message' => NULL,
),
'template' => variable_get('private_message_view_template', 'privatemsg-view'),
),
'privatemsg_from' => array(
'variables' => array(
'author' => NULL,
),
'template' => 'privatemsg-from',
),
'privatemsg_recipients' => array(
'variables' => array(
'message' => NULL,
),
'template' => 'privatemsg-recipients',
),
'privatemsg_between' => array(
'variables' => array(
'recipients' => NULL,
),
'template' => 'privatemsg-between',
),
// Define pattern for header/field templates. The theme system will register all
// theme functions that start with the defined pattern.
'privatemsg_list_header' => array(
'file' => 'privatemsg.theme.inc',
'path' => drupal_get_path('module', 'privatemsg'),
'pattern' => 'privatemsg_list_header__',
'variables' => array(),
),
'privatemsg_list_field' => array(
'file' => 'privatemsg.theme.inc',
'path' => drupal_get_path('module', 'privatemsg'),
'pattern' => 'privatemsg_list_field__',
'variables' => array(
'thread' => array(),
),
),
'privatemsg_new_block' => array(
'file' => 'privatemsg.theme.inc',
'path' => drupal_get_path('module', 'privatemsg'),
'variables' => array(
'count',
),
),
'privatemsg_username' => array(
'file' => 'privatemsg.theme.inc',
'path' => drupal_get_path('module', 'privatemsg'),
'variables' => array(
'recipient' => NULL,
'options' => array(),
),
),
);
// Include the theme file to load the theme suggestions.
module_load_include('inc', 'privatemsg', 'privatemsg.theme');
$templates += drupal_find_theme_functions($templates, array(
'theme',
));
return $templates;
}