system_theme_data

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

modules/system/system.module, строка 806

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

Собирает данные о всех ныне доступных темах.

Возвращаемое значение

Массив всех доступных тем и их данные.

▾ 8 функции вызывают system_theme_data()

drupal_flush_all_caches in includes/common.inc
Flush all cached data on the site.
system_admin_theme_settings in modules/system/system.admin.inc
Form builder; This function allows selection of the theme to show in administration sections. See alsosystem_settings_form()
system_install in modules/system/system.install
Реализация hook_install().
system_themes_form in modules/system/system.admin.inc
Menu callback; displays a listing of all themes. See alsosystem_themes_form_submit()
system_theme_settings in modules/system/system.admin.inc
Form builder; display theme configuration for entire site and individual themes.
system_update_6008 in modules/system/system.install
Add info files to themes. The info and owner columns are added by update_fix_d6_requirements() in update.php to avoid a large number of error messages from update.php. All we need to do here is copy description to owner and then drop description.
system_update_6013 in modules/system/system.install
Rebuild cache data for theme system changes
update_get_projects in modules/update/update.compare.inc
Fetch an array of installed and enabled projects.

Код

<?php
function system_theme_data() {
  // Scan the installation theme .info files and their engines.
  $themes = _system_theme_data();

  // Extract current files from database.
  system_get_files_database($themes, 'theme');

  db_query("DELETE FROM {system} WHERE type = 'theme'");

  foreach ($themes as $theme) {
    if (!isset($theme->owner)) {
      $theme->owner = '';
    }

    db_query("INSERT INTO {system} (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d)", $theme->name, $theme->owner, serialize($theme->info), 'theme', $theme->filename, isset($theme->status) ? $theme->status : 0, 0, 0);
  }

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

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