Call to undefined function node_get_types(). Помогите разобраться.

Главные вкладки

Аватар пользователя kodolka kodolka 31 марта 2014 в 12:28

Как поменять код:

<?php
$node_types 
node_get_types('names');
 
 if (
$node_types) {
    
$form['node_settings'] = array(
      
'#type' => 'fieldset',
      
'#title' => t('Enable on'),
      
'#description' => t('Enable or disable the service on the following content type.'),
      
'#prefix' => '<div class="tingwo-settings-right">',
      
'#suffix' => '</div>',
    );
    foreach (
$node_types as $type => $name) {
      
$form['node_settings']["tingwo_node_$type"] = array(
        
'#type' => 'checkbox',
        
'#title' => check_plain($name),
        
'#attributes' => (variable_get('tingwo_node_'.$type,  ? array('checked' => "checked") : array())
      );
    }
  }
?>

Если выдает ошибку:
Fatal error: Call to undefined function node_get_types()

Комментарии