summaryrefslogtreecommitdiffstats
path: root/print_mail
diff options
context:
space:
mode:
authorDevinCarlson2012-08-28 15:52:40 +0000
committerJoao Ventura2012-08-28 15:52:40 +0000
commit9d21706e1178108d1e59651648b56b4c62316828 (patch)
tree1376e913f8355d0e2e3cd10284d9799041ea88ae /print_mail
parent7815650f1c490eda82b168bb669fbf04c2477309 (diff)
Issue #1707892: use hook_variable_info() for i18n support to the link text custom variable.
Diffstat (limited to 'print_mail')
-rw-r--r--print_mail/print_mail.admin.inc2
-rw-r--r--print_mail/print_mail.module16
2 files changed, 16 insertions, 2 deletions
diff --git a/print_mail/print_mail.admin.inc b/print_mail/print_mail.admin.inc
index 349c5a5..c5ab91a 100644
--- a/print_mail/print_mail.admin.inc
+++ b/print_mail/print_mail.admin.inc
@@ -82,13 +82,11 @@ function print_mail_settings() {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
-
$form['settings']['link_text']['print_mail_link_text_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enable custom link text'),
'#default_value' => variable_get('print_mail_link_text_enabled', PRINT_TYPE_LINK_TEXT_ENABLED_DEFAULT),
);
-
$form['settings']['link_text']['print_mail_link_text'] = array(
'#type' => 'textfield',
'#default_value' => variable_get('print_mail_link_text', $link['text']),
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index f52a6df..e419a36 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -90,6 +90,22 @@ function print_mail_menu() {
}
/**
+ * Implements hook_variable_info().
+ */
+function print_mail_variable_info($options) {
+ $link = print_mail_print_link();
+
+ $variable['print_mail_link_text'] = array(
+ 'title' => t('Send by email'),
+ 'description' => t('Text used in the link to the send by email form.'),
+ 'type' => 'string',
+ 'default' => t($link['text']),
+ );
+
+ return $variable;
+}
+
+/**
* Implements hook_requirements().
*/
function print_mail_requirements($phase) {