summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-30 13:09:30 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-30 13:09:30 +0000
commita8f8a26f6d77f6aca8821e28e66ea253687d7d59 (patch)
treed0f2b694e18a3ccc343d379b3742791becb57b39 /modules/node/node.module
parent15343a993ce45ec6626c79406aaa85c2631d023e (diff)
downloadbrdo-a8f8a26f6d77f6aca8821e28e66ea253687d7d59.tar.gz
brdo-a8f8a26f6d77f6aca8821e28e66ea253687d7d59.tar.bz2
- Patch #553944 by David_Rothstein, ksenzee | JacobSingh, sun, jhodgdon, pwolanin: allow modules to specify per-page custom themes in hook_menu().
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module13
1 files changed, 13 insertions, 0 deletions
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',
@@ -1777,6 +1779,17 @@ function node_page_title($node) {
}
/**
+ * 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().
*/
function node_init() {