function _read_more_link_options in Read More Link 7
Add link options as prescribed in the Read More link config page.
1 call to _read_more_link_options()
File
- ./
read_more.module, line 143 - Customize the "Read More" link shown in teasers.
Code
function _read_more_link_options($uri) {
// Build link options array.
$link_options = $uri['options'];
$link_options['attributes']['title'] = _read_more_link_title($uri['options']['entity']);
$link_options['html'] = TRUE;
// Add anchor to link if the option is enabled.
if (variable_get('read_more_anchor', FALSE)) {
$link_options['fragment'] = 'more';
}
// Add rel="nofollow" to link if the option is enabled.
if (variable_get('read_more_nofollow', TRUE)) {
$link_options['attributes']['rel'] = 'nofollow';
}
// Add target="blank" to link if the option is enabled.
if (variable_get('read_more_newwindow', FALSE)) {
$link_options['attributes']['target'] = '_blank';
}
return $link_options;
}