node_types_rebuild

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/node/node.module, строка 305

Версии
5 – 6
node_types_rebuild()

Resets the database cache of node types, and saves all new or non-modified module-defined node types to the database.

▾ 4 функции вызывают node_types_rebuild()

node_type_delete_confirm_submit in modules/node/content_types.inc
Process content type delete confirm submissions.
node_type_form_submit in modules/node/content_types.inc
Implementation of hook_form_submit().
system_modules_submit in modules/system/system.module
Submit callback; handles modules form submission.
system_update_1005 in modules/system/system.install

Код

<?php
function node_types_rebuild() {
  _node_types_build();

  $node_types = node_get_types('types', NULL, TRUE);

  foreach ($node_types as $type => $info) {
    if (!empty($info->is_new)) {
      node_type_save($info);
    }
    if (!empty($info->disabled)) {
      node_type_delete($info->type);
    }
  }

  _node_types_build();
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему