| 237 |
'#description' => t('Use Markdown syntax [Title](plugin:url) in place of Freelinking syntax [[plugin:url|Title]]'), |
'#description' => t('Use Markdown syntax [Title](plugin:url) in place of Freelinking syntax [[plugin:url|Title]]'), |
| 238 |
); |
); |
| 239 |
|
|
| 240 |
|
$form['freelinking_wrapper'] = array( |
| 241 |
|
'#type' => 'checkbox', |
| 242 |
|
'#title' => t('Wrap links in') . ' <span>', |
| 243 |
|
'#default_value' => variable_get('freelinking_wrapper', FALSE), |
| 244 |
|
'#description' => t('Used for advanced CSS styling.'), |
| 245 |
|
); |
| 246 |
|
|
| 247 |
// loop through plugin settings functions, adding a fieldset for each |
// loop through plugin settings functions, adding a fieldset for each |
| 248 |
foreach ($plugin_with_settings as $plugin=>$callback) { |
foreach ($plugin_with_settings as $plugin=>$callback) { |
| 249 |
$form[$plugin] = array( |
$form[$plugin] = array( |
| 343 |
if ($link['extra']) { |
if ($link['extra']) { |
| 344 |
unset($link['extra']); |
unset($link['extra']); |
| 345 |
} |
} |
| 346 |
return call_user_func_array('l', $link); |
$rendered = call_user_func_array('l', $link); |
| 347 |
|
if (variable_get('freelinking_wrapper', FALSE)) { |
| 348 |
|
$rendered = '<span class="' . $link[2]['attributes']['class'] . '">' |
| 349 |
|
. $rendered . '</span>'; |
| 350 |
|
} |
| 351 |
|
return $rendered; |
| 352 |
} |
} |
| 353 |
|
|
| 354 |
/** |
/** |
| 358 |
if($message) { |
if($message) { |
| 359 |
$message = ': ' . $message; |
$message = ': ' . $message; |
| 360 |
} |
} |
| 361 |
return '<code class="freelink freelink-error freelink-$plugin" |
return '<span class="freelink freelink-error freelink-$plugin" |
| 362 |
. " freelink-error-$plugin">[' . t('Bad Link') . $message . ']</code>'; |
. " freelink-error-$plugin">[' . t('Bad Link') . $message . ']</code>'; |
| 363 |
} |
} |
| 364 |
|
|