diff --git i18n/i18ncontent/i18ncontent.module i18n/i18ncontent/i18ncontent.module index c15c7f1..80fe912 100644 --- i18n/i18ncontent/i18ncontent.module +++ i18n/i18ncontent/i18ncontent.module @@ -156,13 +156,15 @@ function i18ncontent_node_type($op, $info) { */ function i18ncontent_menu_alter(&$menu) { $menu['node/add']['page callback'] = 'i18ncontent_node_add_page'; - // @TODO avoid iterating over every router path. - foreach ($menu as $path => $item) { - if (!empty($item['page callback']) && $item['page callback'] == 'node_add') { - $menu[$path]['page callback'] = 'i18ncontent_node_add'; - $arg = arg(NULL, $path); - $menu[$path]['title callback'] = 'i18nstrings_title_callback'; - $menu[$path]['title arguments'] = array('nodetype:type:'. $arg[2] .':name', $item['title']); + if (variable_get('page_manager_node_edit_disabled', TRUE)) { + // @TODO avoid iterating over every router path. + foreach ($menu as $path => $item) { + if (!empty($item['page callback']) && $item['page callback'] == 'node_add') { + $menu[$path]['page callback'] = 'i18ncontent_node_add'; + $arg = arg(NULL, $path); + $menu[$path]['title callback'] = 'i18nstrings_title_callback'; + $menu[$path]['title arguments'] = array('nodetype:type:'. $arg[2] .':name', $item['title']); + } } } }