From a8f8a26f6d77f6aca8821e28e66ea253687d7d59 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 30 Sep 2009 13:09:30 +0000 Subject: - Patch #553944 by David_Rothstein, ksenzee | JacobSingh, sun, jhodgdon, pwolanin: allow modules to specify per-page custom themes in hook_menu(). --- modules/node/node.module | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index ba3dba855..b826cc4e4 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1652,6 +1652,7 @@ function node_menu() { 'access callback' => '_node_add_access', 'weight' => 1, 'menu_name' => 'management', + 'theme callback' => '_node_custom_theme', 'file' => 'node.pages.inc', ); $items['rss.xml'] = array( @@ -1713,6 +1714,7 @@ function node_menu() { 'page arguments' => array(1), 'access callback' => 'node_access', 'access arguments' => array('update', 1), + 'theme callback' => '_node_custom_theme', 'weight' => 1, 'type' => MENU_LOCAL_TASK, 'file' => 'node.pages.inc', @@ -1776,6 +1778,17 @@ function node_page_title($node) { return $node->title; } +/** + * Theme callback for creating and editing nodes. + */ +function _node_custom_theme() { + // Use the administration theme if the site is configured to use it for + // nodes. + if (variable_get('node_admin_theme')) { + return variable_get('admin_theme'); + } +} + /** * Implement hook_init(). */ -- cgit v1.2.3