Commit d96b3452 authored by webchick's avatar webchick

Issue #1074672 by claudiu.cristea, mikewink: Added Allow language select to be...

Issue #1074672 by claudiu.cristea, mikewink: Added Allow language select to be rearranged inside node form.
parent 1b1464ce
......@@ -603,17 +603,25 @@ function node_add_body_field($type, $label = 'Body') {
*/
function node_field_extra_fields() {
$extra = array();
$module_language_enabled = module_exists('language');
$description = t('Node module element');
foreach (node_type_get_types() as $bundle) {
if ($bundle->has_title) {
$extra['node'][$bundle->type]['form']['title'] = array(
'label' => $bundle->title_label,
'description' => $description,
'weight' => -5,
);
}
foreach (node_type_get_types() as $type) {
if ($type->has_title) {
$extra['node'][$type->type] = array(
'form' => array(
'title' => array(
'label' => $type->title_label,
'description' => t('Node module element'),
'weight' => -5,
),
),
// Add also the 'language' select if Language module is enabled and the
// bundle has multilingual support.
if ($module_language_enabled && variable_get('node_type_language_' . $bundle->type, 0)) {
$extra['node'][$bundle->type]['form']['language'] = array(
'label' => t('Language'),
'description' => $description,
'weight' => 0,
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment