function image_effects
Loads all image effects from the database.
Return value
An array of all image effects.
See also
1 call to image_effects()
- image_style_effects in modules/image/ image.module 
- Loads all the effects for an image style.
4 string references to 'image_effects'
- image_effect_save in modules/image/ image.module 
- Saves an image effect.
- image_style_flush in modules/image/ image.module 
- Flushes cached media for a style.
- image_update_7000 in modules/image/ image.install 
- Install the schema for users upgrading from the contributed module.
- image_update_7001 in modules/image/ image.install 
- Rename possibly misnamed {image_effect} table to {image_effects}.
File
- 
              modules/image/ image.module, line 1318 
Code
function image_effects() {
  $effects =& drupal_static(__FUNCTION__);
  if (!isset($effects)) {
    $effects = array();
    // Add database image effects.
    $result = db_select('image_effects', NULL, array(
      'fetch' => PDO::FETCH_ASSOC,
    ))->fields('image_effects')
      ->orderBy('image_effects.weight', 'ASC')
      ->execute();
    foreach ($result as $effect) {
      $effect['data'] = unserialize($effect['data']);
      $definition = image_effect_definition_load($effect['name']);
      // Do not load image effects whose definition cannot be found.
      if ($definition) {
        $effect = array_merge($definition, $effect);
        $effects[$effect['ieid']] = $effect;
      }
    }
  }
  return $effects;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
