function _link_devel_generate in Link 7
Callback for hook_devel_generate().
1 call to _link_devel_generate()
- link_devel_generate in ./
link.devel_generate.inc - Implements hook_devel_generate().
1 string reference to '_link_devel_generate'
- link_devel_generate in ./
link.devel_generate.inc - Implements hook_devel_generate().
File
- ./
link.devel_generate.inc, line 23 - Devel Generate support for Link module.
Code
function _link_devel_generate($object, $field, $instance, $bundle) {
$url = 'http://example.com/' . devel_generate_word(mt_rand(6, 12));
$link = array(
'url' => url($url, array(
'absolute' => TRUE,
)),
'attributes' => _link_default_attributes(),
);
if ($instance['settings']['title'] != 'none') {
$link['title'] = devel_create_greeking(mt_rand(1, 3), TRUE);
}
return $link;
}