function hook_widgets_element_info_alter in Widgets 7
Alter the information provided in hook_widgets_element_info().
Parameters
$elements: The array of image elements, keyed on the machine-readable element name.
See also
1 invocation of hook_widgets_element_info_alter()
- widgets_element_definitions in ./
widgets.module - Pull in widget elements exposed by modules implementing hook_widgets_element_info().
File
- ./
widgets.api.php, line 63 - 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_element_info_alter(&$elements) {
// Override the Image module's crop element with more options.
$elements['widgets_crop']['element callback'] = 'mymodule_crop_element';
$elements['widgets_crop']['dimensions callback'] = 'mymodule_crop_dimensions';
$elements['widgets_crop']['form callback'] = 'mymodule_crop_form';
}