image_get_toolkit

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

includes/image.inc, строка 60

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

Retrieve the name of the currently used toolkit.

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

String containing the name of the selected toolkit, or FALSE on error.

Связанные темы

▾ 3 функции вызывают image_get_toolkit()

file_validate_image_resolution in includes/file.inc
If the file is an image verify that its dimensions are within the specified maximum and minimum dimensions. Non-image files will be ignored.
image_toolkit_invoke in includes/image.inc
Invokes the given method using the currently selected toolkit.
system_image_toolkit_settings in modules/system/system.admin.inc
Form builder; Configure site image toolkit usage. See alsosystem_settings_form()

Код

<?php
function image_get_toolkit() {
  static $toolkit;

  if (!$toolkit) {
    $toolkit = variable_get('image_toolkit', 'gd');
    $toolkit_file = './includes/image.'. $toolkit .'.inc';
    if (isset($toolkit) && file_exists($toolkit_file)) {
      include_once $toolkit_file;
    }
    elseif (!image_gd_check_settings()) {
      $toolkit = FALSE;
    }
  }

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

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