function image_effects
image_effects()
Loads all image effects from the database.
Return value
An array of all image effects.
See also
File
- modules/image/image.module, line 1239
- Exposes global functionality for creating image styles.
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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.module/function/image_effects/7.x