I need to add to the $filters hash returned by node_filters() in node.admin.inc.

How do I do that without hacking core?

Added the following code to node.admin.inc node_filters() function.

$users = entity_load('user');
$options = array('[any]'=>t('any'));
foreach ($users as $user) {
    if ($user->name == '' || $user->name == 'user') continue;
    $options[$user->name] = $user->name;
}
$filters['last-edited-by'] = array(
				     'title'=>t('last edited by'),
				     'options' => $options);

I can't seem to find a hook into the node_filters() function so that I can add this within my custom module code.

Comments

jo_as_neo’s picture

Same need, here, I'd like to use a hook instead of hacking a core module.

Any solution came up ?

EDIT : See this discussion about a patch, added to the core in 7.28, which explains how to alter the form (hook_form_alter) and the query (hook_query_alter), based on the node_admin_filter tag.