function pm_preprocess_pm_dashboard_link in Drupal PM (Project Management) 7.3
Implements hook_preprocess_theme().
File
- ./
pm.theme.inc, line 92 - Provides theme functions for Project Management modules.
Code
function pm_preprocess_pm_dashboard_link(&$vars) {
module_load_include('inc', 'pm', 'includes/pm.icon');
$link_array = $vars['link_blocks'];
$params = array();
if (!empty($link_array['nid'])) {
$params_key = $link_array['node_type'] . '_nid';
$params['query'] = array(
$params_key => $link_array['nid'],
);
}
$vars['path'] = url($link_array['path'], $params);
$vars['title'] = $link_array['title'];
$vars['icon'] = NULL;
$vars['extra_link'] = NULL;
$vars['extra_link_icon'] = NULL;
$vars['icon'] = pm_icon($link_array['icon'], '');
// Add extra link if present.
if (!empty($link_array['extra_link'])) {
$vars['extra_link'] = $link_array['extra_link'];
$vars['extra_link_icon'] = pm_icon('application_add', t('+Add'));
}
}