Commit 1c0cbd0d authored by moshe weitzman's avatar moshe weitzman

Issue #1238344 by pcambra: Added Allow other modules to generate images for devel_generate().

parent 76b85d58
......@@ -32,10 +32,14 @@ Then you can log php variables to the Firebug console. Is quite useful.
Included in this package is also:
- devel_node_access module which prints out the node_access records for a given node. Also offers hook_node_access_explain for all node access modules to implement. Handy.
- devel_generate.module which bulk creates nodes, users, comment, terms for development
- devel_generate.module which bulk creates nodes, users, comment, terms for development.
Some nifty drush integration ships with devel and devel_generate. See drush help for details.
DEVEL GENERATE EXTENSIONS
=========================
Devel Images Provider [http://drupal.org/project/devel_image_provider] allows to configure external providers for images.
COMPATIBILITY NOTES
==================
- Modules that use AHAH may have incompatibility with the query log and other
......
......@@ -4,11 +4,15 @@ define('DEVEL_GENERATE_IMAGE_MAX', 5);
function image_devel_generate($object, $field, $instance, $bundle) {
if (function_exists('imagejpeg')) {
$devel_generate_image_function = variable_get('devel_generate_image_function', '_image_devel_generate');
if (!function_exists($devel_generate_image_function)) {
$devel_generate_image_function = '_image_devel_generate';
}
if (field_behaviors_widget('multiple values', $instance) == FIELD_BEHAVIOR_CUSTOM) {
return devel_generate_multiple('_image_devel_generate', $object, $field, $instance, $bundle);
return devel_generate_multiple($devel_generate_image_function, $object, $field, $instance, $bundle);
}
else {
return _image_devel_generate($object, $field, $instance, $bundle);
return $devel_generate_image_function($object, $field, $instance, $bundle);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment