Skip to content
Snippets Groups Projects
Commit c8867028 authored by Earl Miles's avatar Earl Miles
Browse files

#455024: Check for taxonomy.module enabled before allowing the term_view task to exist.

parent d9452c1d
No related branches found
No related tags found
No related merge requests found
......@@ -15,44 +15,46 @@
* more information.
*/
function delegator_term_view_delegator_tasks() {
return array(
// This is a 'page' task and will fall under the page admin UI
'task type' => 'page',
'title' => t('Taxonomy term view'),
'description' => t('Control what handles the job of displaying a term at taxonomy/term/%term.'),
'admin title' => 'Taxonomy term view', // translated by menu system
'admin description' => 'Overrides for the built in taxonomy term handler at <em>taxonomy/term/%term</em>.',
'admin path' => 'taxonomy/term/%term',
// Menu hooks so that we can alter the term/%term menu entry to point to us.
'hook menu' => 'delegator_term_view_menu',
'hook menu alter' => 'delegator_term_view_menu_alter',
// Provide a setting to the primary settings UI for Panels
'admin settings' => 'delegator_term_view_admin_settings',
// Callback to add items to the delegator task administration form:
'task admin' => 'delegator_term_view_task_admin',
// This is task uses 'context' handlers and must implement these to give the
// handler data it needs.
'handler type' => 'context',
'get arguments' => 'delegator_term_view_get_arguments',
'get context placeholders' => 'delegator_term_view_get_contexts',
// Allow additional operations
'operations' => array(
array(
'title' => t('Task handlers'),
'href' => "admin/build/delegator/term_view",
),
array(
'title' => t('Settings'),
'href' => "admin/build/delegator/term_view/settings",
if (module_exists('taxonomy')) {
return array(
// This is a 'page' task and will fall under the page admin UI
'task type' => 'page',
'title' => t('Taxonomy term view'),
'description' => t('Control what handles the job of displaying a term at taxonomy/term/%term.'),
'admin title' => 'Taxonomy term view', // translated by menu system
'admin description' => 'Overrides for the built in taxonomy term handler at <em>taxonomy/term/%term</em>.',
'admin path' => 'taxonomy/term/%term',
// Menu hooks so that we can alter the term/%term menu entry to point to us.
'hook menu' => 'delegator_term_view_menu',
'hook menu alter' => 'delegator_term_view_menu_alter',
// Provide a setting to the primary settings UI for Panels
'admin settings' => 'delegator_term_view_admin_settings',
// Callback to add items to the delegator task administration form:
'task admin' => 'delegator_term_view_task_admin',
// This is task uses 'context' handlers and must implement these to give the
// handler data it needs.
'handler type' => 'context',
'get arguments' => 'delegator_term_view_get_arguments',
'get context placeholders' => 'delegator_term_view_get_contexts',
// Allow additional operations
'operations' => array(
array(
'title' => t('Task handlers'),
'href' => "admin/build/delegator/term_view",
),
array(
'title' => t('Settings'),
'href' => "admin/build/delegator/term_view/settings",
),
),
),
);
);
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment