You are here

function hook_widgets_set_save in Widgets 7

Respond to image set 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 set's name.

Parameters

$set: The image style array that is being updated.

1 invocation of hook_widgets_set_save()
widgets_set_save in ./widgets.module
Save an widget set.

File

./widgets.api.php, line 80
Hooks related to widget sets and widgets. TODO: Update API docs NOTICE: This file has been copied from the image module and has not been updated for use with Widgets yet.

Code

function hook_widgets_set_save($set) {

  // If a module defines an image set and that set is renamed by the user
  // the module should update any references to that set.
  if (isset($set['old_name']) && $set['old_name'] == variable_get('mymodule_widgets_set', '')) {
    variable_set('mymodule_widgets_set', $set['name']);
  }
}