function hook_image_style_save
hook_image_style_save($style)
Respond to image style updating.
This hook enables modules to update settings that might be affected by changes to an image. For example, updating a module specific variable to reflect a change in the image style's name.
Parameters
$style: The image style array that is being updated.
Related topics
File
- modules/image/image.api.php, line 78
- Hooks related to image styles and effects.
Code
function hook_image_style_save($style) { // If a module defines an image style and that style is renamed by the user // the module should update any references to that style. if (isset($style['old_name']) && $style['old_name'] == variable_get('mymodule_image_style', '')) { variable_set('mymodule_image_style', $style['name']); } }
© 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.api.php/function/hook_image_style_save/7.x