You are here

function _textimage_preset_load in Textimage 5

Same name and namespace in other branches
  1. 5.2 textimage.module \_textimage_preset_load()
  2. 6.2 textimage.module \_textimage_preset_load()
  3. 7.2 textimage.module \_textimage_preset_load()

load a preset by id.

Parameters

id: preset id.

5 calls to _textimage_preset_load()
textimage_image_from_preset in ./textimage.module
Loads the Text Image preset and generates the GD image resource.
textimage_preset_delete_confirm in ./textimage.module
textimage_preset_edit in ./textimage.module
textimage_preset_flush_confirm in ./textimage.module
_textimage_preset_flush in ./textimage.module
flush cached media for a preset.

File

./textimage.module, line 1059

Code

function _textimage_preset_load($id) {
  $result = db_query('SELECT pid, name, settings FROM {textimage_preset} WHERE pid = %d', $id);
  $preset = db_fetch_array($result);
  if ($preset['pid']) {
    $preset['settings'] = unserialize($preset['settings']);
    return $preset;
  }
  else {
    return false;
  }
}