function widgets_get_context_author_uid in Widgets 7
1 call to widgets_get_context_author_uid()
File
- ./
widgets.module, line 1318 - Exposes global functionality for creating widget sets.
Code
function widgets_get_context_author_uid($context = array()) {
$uid = '';
if (isset($context['node']->uid)) {
$uid = $context['node']->uid;
}
elseif (arg(0) == 'node' && is_numeric(arg(1))) {
$obj = menu_get_object();
if (isset($obj->uid)) {
$uid = $obj->uid;
}
}
elseif (arg(0) == 'user' && is_numeric(arg(1))) {
$uid = menu_get_object('user', 1)->uid;
}
drupal_alter('widgets_context_author_uid', $uid, $context);
return $uid;
}