Commit 06a489fa authored by dragonwize's avatar dragonwize
Browse files

Added ability to change the long tips link text in settings

parent 7c4e513d
......@@ -76,6 +76,9 @@ function better_formats_theme() {
'file' => 'better_formats_defaults.admin.inc',
'arguments' => array('form' => NULL),
),
'better_formats_filter_tips_more_info' => array(
'arguments' => array(),
),
);
}
......@@ -505,7 +508,7 @@ function better_formats_filter_form($value = FILTER_FORMAT_DEFAULT, $node_type =
}
if ($show_tips) {
$extra = theme('filter_tips_more_info');
$extra = theme('better_formats_filter_tips_more_info');
$form[] = array('#value' => $extra);
}
else {
......@@ -524,7 +527,7 @@ function better_formats_filter_form($value = FILTER_FORMAT_DEFAULT, $node_type =
'#parents' => $parents
);
if ($show_tips) {
$extra = theme('filter_tips_more_info');
$extra = theme('better_formats_filter_tips_more_info');
$tips = _filter_tips($format->format, FALSE);
$form['format']['guidelines'] = array(
'#title' => t('Formatting guidelines'),
......@@ -553,6 +556,14 @@ function better_formats_filter_form($value = FILTER_FORMAT_DEFAULT, $node_type =
return $form;
}
function theme_better_formats_filter_tips_more_info() {
$text = variable_get('better_formats_long_tips_link_text', '');
$text = $text ? $text : t('More information about formatting options');
return '<p>' . l($text, 'filter/tips') . '</p>';
}
/**
* Retrieves the formats available to users by role.
*
......
......@@ -25,6 +25,12 @@ function better_formats_settings_admin_form() {
'#title' => t('Selection title'),
'#description' => t('Change the format selection title. Defaults to "Input format"'),
);
$form[$key]['better_formats_long_tips_link_text'] = array(
'#type' => 'textfield',
'#default_value' => variable_get('better_formats_long_tips_link_text', ''),
'#title' => t('More info link text'),
'#description' => t('Change the format full tips link text. Defaults to "More information about formatting options"'),
);
$key = 'better_formats_settings_control';
......
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