print.admin.inc 20.2 KB
Newer Older
jcnventura's avatar
jcnventura committed
1 2
<?php

jcnventura's avatar
jcnventura committed
3 4 5 6 7 8
/**
 * @file
 * Contains the administrative functions of the PF module.
 *
 * This file is included by the core PF module, and includes the
 * settings form.
9 10
 *
 * @ingroup print
jcnventura's avatar
jcnventura committed
11
 */
jcnventura's avatar
jcnventura committed
12 13

/**
jcnventura's avatar
jcnventura committed
14 15 16
 * Menu callback for the Printer-friendly pages module settings form.
 *
 * @ingroup forms
jcnventura's avatar
jcnventura committed
17 18
 */
function print_main_settings() {
19 20
  $print_css = variable_get('print_css', PRINT_CSS_DEFAULT);
  // Check that the stylesheet path is indeed valid and relative to base_path()
21
  if (!empty($print_css) && empty($_POST)) {
jcnventura's avatar
jcnventura committed
22
    $css_path = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . strtr($print_css, array('%t' => drupal_get_path('theme', variable_get('theme_default', 'garland'))));
23 24 25 26 27
    if (!is_file($css_path) || !is_readable($css_path)) {
      drupal_set_message(t("File %file is not readable by the web server.", array('%file' => $css_path)), 'warning', FALSE);
    }
  }

28 29
  $form['settings'] = array(
    '#type' => 'fieldset',
jcnventura's avatar
jcnventura committed
30
    '#title' => t('Common settings'),
31 32
  );

33
  $form['settings']['print_css'] = array(
jcnventura's avatar
jcnventura committed
34
    '#type' => 'textfield',
jcnventura's avatar
jcnventura committed
35
    '#title' => t('Custom stylesheet'),
36
    '#default_value' => $print_css,
jcnventura's avatar
jcnventura committed
37
    '#size' => 60,
38
    '#maxlength' => 250,
39
    '#description' => t('The path to your custom print cascading stylesheet, if any. The path provided must be relative to the base path. When none is specified, the default module CSS file is used.') . '<br />' .
jcnventura's avatar
jcnventura committed
40
                      t('Macros: %t (path to theme: "%theme")', array('%theme' => drupal_get_path('theme', variable_get('theme_default', 'bartik')))) . '<br />' .
41
                      t('Requires the <em>Administer site configuration</em> permission.'),
42
    '#disabled' => !user_access('administer site configuration'),
jcnventura's avatar
jcnventura committed
43 44
  );

45 46 47 48 49 50 51
  $form['settings']['print_keep_theme_css'] = array(
    '#type' => 'checkbox',
    '#title' => t('Keep the current theme CSS'),
    '#default_value' => variable_get('print_keep_theme_css', PRINT_KEEP_THEME_CSS_DEFAULT),
    '#description' => t('If set, the current theme css will still be applied to the printer-friendly versions.'),
  );

52
  $form['settings']['print_urls'] = array(
jcnventura's avatar
jcnventura committed
53 54
    '#type' => 'checkbox',
    '#title' => t('Printer-friendly URLs list'),
55
    '#default_value' => variable_get('print_urls', PRINT_URLS_DEFAULT),
jcnventura's avatar
jcnventura committed
56
    '#description' => t('If set, a list of the destination URLs for the page links will be displayed at the bottom of the page.') . '<br />' .
57
                      t('Note that you can enable/disable the URL list for each content type individually from the !url.', array('!url' => l(t('Content Types page'), 'admin/structure/types'))),
jcnventura's avatar
jcnventura committed
58 59
  );

60 61 62 63 64 65 66
  $form['settings']['print_urls_anchors'] = array(
    '#type' => 'checkbox',
    '#title' => t('Include named anchors in printer-friendly URLs list'),
    '#default_value' => variable_get('print_urls_anchors', PRINT_URLS_ANCHORS_DEFAULT),
    '#description' => t('If set, the list of the URLs at the bottom of the page will include anchors links on the same page.'),
  );

67
  $form['settings']['print_comments'] = array(
jcnventura's avatar
jcnventura committed
68 69
    '#type' => 'checkbox',
    '#title' => t('Include comments in printer-friendly version'),
70
    '#default_value' => variable_get('print_comments', PRINT_COMMENTS_DEFAULT),
jcnventura's avatar
jcnventura committed
71 72 73
    '#description' => t('When this option is active, user comments are also included in the printer-friendly version. Requires the comment module.'),
  );

74
  $form['settings']['print_newwindow'] = array(
jcnventura's avatar
jcnventura committed
75
    '#type' => 'radios',
76
    '#title' => t('New window method'),
77 78
    '#options' => array(t('Use HTML target (does not validate as XHTML Strict)'), t('Use Javascript (requires browser support)')),
    '#default_value' => variable_get('print_newwindow', PRINT_NEWWINDOW_DEFAULT),
79
    '#description' => t('Choose the method used to open pages in a new window/tab.'),
jcnventura's avatar
jcnventura committed
80 81
  );

82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
  $form['settings']['logo'] = array(
    '#type' => 'fieldset',
    '#title' => t('Logo options'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );

  $form['settings']['logo']['print_logo_options'] = array(
    '#type' => 'radios',
    '#title' => t('Logo type'),
    '#options' => array(t('None (Disabled)'), t("Current theme's logo"), t('User-specified')),
    '#default_value' => variable_get('print_logo_options', PRINT_LOGO_OPTIONS_DEFAULT),
    '#description' => t("Select the type of logo to display on the printer-friendly version. In case of a user-specified location, insert the path or URL below."),
  );

  $form['settings']['logo']['print_logo_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Logo URL'),
    '#default_value' => variable_get('print_logo_url', PRINT_LOGO_URL_DEFAULT),
    '#size' => 60,
    '#maxlength' => 250,
  );

  $form['settings']['logo']['print_logo_upload'] = array(
    '#type' => 'file',
    '#title' => t('Upload logo'),
    '#size' => 60,
    '#maxlength' => 250,
    '#description' => t("If you don't have direct file access to the server, use this field to upload your logo."),
  );

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
  $form['settings']['footer'] = array(
    '#type' => 'fieldset',
    '#title' => t('Footer options'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );

  $form['settings']['footer']['print_footer_options'] = array(
    '#type' => 'radios',
    '#title' => t('Footer type'),
    '#options' => array(t('None (Disabled)'), t("Site's footer"), t('User-specified')),
    '#default_value' => variable_get('print_footer_options', PRINT_FOOTER_OPTIONS_DEFAULT),
    '#description' => t("Select the type of footer to display on the printer-friendly version. In case of a user-specified footer, insert it below."),
  );

  $form['settings']['footer']['print_footer_user'] = array(
    '#type' => 'textfield',
    '#title' => t('User-specified'),
    '#default_value' => variable_get('print_footer_user', PRINT_FOOTER_USER_DEFAULT),
    '#size' => 60,
    '#maxlength' => 250,
  );

136
  $form['settings']['print_sourceurl_settings'] = array(
137 138 139 140
    '#type' => 'fieldset',
    '#title' => t('Source URL'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
jcnventura's avatar
jcnventura committed
141 142
  );

143
  $form['settings']['print_sourceurl_settings']['print_sourceurl_enabled'] = array(
jcnventura's avatar
jcnventura committed
144 145
    '#type' => 'checkbox',
    '#title' => t('Display source URL'),
146
    '#default_value' => variable_get('print_sourceurl_enabled', PRINT_SOURCEURL_ENABLED_DEFAULT),
jcnventura's avatar
jcnventura committed
147 148 149
    '#description' => t('When this option is selected, the URL for the original page will be displayed at the bottom of the printer-friendly version.'),
  );

150
  $form['settings']['print_sourceurl_settings']['print_sourceurl_date'] = array(
jcnventura's avatar
jcnventura committed
151 152
    '#type' => 'checkbox',
    '#title' => t('Add current time/date to the source URL'),
153
    '#default_value' => variable_get('print_sourceurl_date', PRINT_SOURCEURL_DATE_DEFAULT),
jcnventura's avatar
jcnventura committed
154 155 156
    '#description' => t('Display the current date and time in the Source URL line.'),
  );

157
  $form['settings']['print_sourceurl_settings']['print_sourceurl_forcenode'] = array(
jcnventura's avatar
jcnventura committed
158 159
    '#type' => 'checkbox',
    '#title' => t('Force use of node ID in source URL'),
160 161
    '#default_value' => variable_get('print_sourceurl_forcenode', PRINT_SOURCEURL_FORCENODE_DEFAULT),
    '#description' => t("Drupal will attempt to use the page's defined alias in case there is one. To force the use of the fixed URL, activate this option."),
jcnventura's avatar
jcnventura committed
162 163
  );

jcnventura's avatar
jcnventura committed
164
  $form['#attributes'] = array('enctype' => 'multipart/form-data');
165 166
  $form['#validate'][] = '_print_main_settings_validate';

jcnventura's avatar
jcnventura committed
167 168 169
  return system_settings_form($form);
}

170 171 172 173
/**
 * Validate print_main_settings form.
 */
function _print_main_settings_validate($form, &$form_state) {
174
  global $base_root;
175

176 177 178 179 180
  // Check for a new uploaded logo, and use that instead.
  if ($file = file_save_upload('print_logo_upload', array('file_validate_is_image' => array()))) {
    // The image was saved using file_save_upload() and was added to the
    // files table as a temporary file. We'll make a copy and let the garbage
    // collector delete the original upload.
181 182 183
    if ($filename = file_unmanaged_copy($file->uri)) {
      $wrapper = file_stream_wrapper_get_instance_by_uri($filename);

184
      $form_state['values']['print_logo_options'] = 2;
185
      $form_state['values']['print_logo_url'] = str_replace($base_root, '', $wrapper->getExternalUrl());
186 187 188 189
    }
  }
}

190 191 192 193 194
/**
 * Menu callback for the Printer-friendly pages HTML settings form.
 *
 * @ingroup forms
 */
jcnventura's avatar
jcnventura committed
195
function print_html_settings() {
196 197 198 199
  $form['settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Web page options'),
  );
jcnventura's avatar
jcnventura committed
200

201
  $form['settings']['print_html_link_pos'] = array(
202 203 204 205 206 207 208
    '#type' => 'checkboxes',
    '#title' => t('Printer-friendly page link'),
    '#default_value' => variable_get('print_html_link_pos', array(PRINT_HTML_LINK_POS_DEFAULT => PRINT_HTML_LINK_POS_DEFAULT)),
    '#options' => array('link' => t('Links area'), 'corner' => t('Content corner')),
    '#description' => t('Choose the location of the link(s) to the printer-friendly page. The Links area is usually below the node content, whereas the Content corner is placed in the upper-right corner of the node content. Unselect all options to disable the link. Even if the link is disabled, you can still view the print version of a node by going to !path/nid where nid is the numeric id of the node.', array('!path' => PRINT_PATH)),
  );

209 210 211 212 213 214 215
  $form['settings']['print_html_link_teaser'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display printer-friendly link in teaser'),
    '#default_value' => variable_get('print_html_link_teaser', PRINT_HTML_LINK_TEASER_DEFAULT),
    '#description' => t('Enabling this will display the link in teaser mode.'),
  );

216 217 218 219
  $form['settings']['adv_link'] = array(
    '#type' => 'fieldset',
    '#title' => t('Advanced link options'),
    '#collapsible' => TRUE,
220
    '#collapsed' => FALSE,
221 222 223
  );

  $form['settings']['adv_link']['print_html_show_link'] = array(
jcnventura's avatar
jcnventura committed
224
    '#type' => 'radios',
225
    '#title' => t('Link style'),
226
    '#default_value' => variable_get('print_html_show_link', PRINT_HTML_SHOW_LINK_DEFAULT),
227 228
    '#options' => array(1 => t('Text only'), 2 => t('Icon only'), 3 => t('Icon and Text')),
    '#description' => t('Select the visual style of the link.'),
jcnventura's avatar
jcnventura committed
229 230
  );

231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
  $form['settings']['adv_link']['print_html_link_use_alias'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use URL alias instead of node ID'),
    '#default_value' => variable_get('print_html_link_use_alias', PRINT_HTML_LINK_USE_ALIAS_DEFAULT),
    '#description' => t('Enabling this will create the link using the URL alias instead of the node ID.'),
  );

  $form['settings']['adv_link']['print_html_link_class'] = array(
    '#type' => 'textfield',
    '#title' => t('Link class'),
    '#default_value' => variable_get('print_html_link_class', PRINT_HTML_LINK_CLASS_DEFAULT),
    '#size' => 60,
    '#maxlength' => 250,
    '#description' => t('This can be used by themers to change the link style or by jQuery modules to open in a new window (e.g. greybox or thickbox). Multiple classes can be specified, separated by spaces.'),
  );

247
  $form['settings']['adv_link']['print_html_node_link_visibility'] = array(
248 249
    '#type' => 'radios',
    '#title' => t('Link visibility'),
250
    '#default_value' => variable_get('print_html_node_link_visibility', PRINT_HTML_NODE_LINK_VISIBILITY_DEFAULT),
251 252 253
    '#options' => array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.')),
  );

254
  $form['settings']['adv_link']['print_html_node_link_pages'] = array(
255
    '#type' => 'textarea',
256
    '#default_value' => variable_get('print_html_node_link_pages', PRINT_HTML_NODE_LINK_PAGES_DEFAULT),
257 258 259 260
    '#rows' => 3,
    '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
  );

261 262
  if (module_exists('php')) {
    $access = user_access('use PHP for settings');
jcnventura's avatar
jcnventura committed
263

264 265 266 267 268 269 270 271
    if ($form['settings']['adv_link']['print_html_node_link_visibility']['#default_value'] == 2 && !$access) {
      $form['settings']['adv_link']['print_html_node_link_visibility'] = array('#type' => 'value', '#value' => 2);
      $form['settings']['adv_link']['print_html_node_link_pages'] = array('#type' => 'value', '#value' => $form['settings']['adv_link']['print_html_node_link_pages']['#default_value']);
    }
    elseif ($access) {
      $form['settings']['adv_link']['print_html_node_link_visibility']['#options'][] = t('Show if the following PHP code returns <code>TRUE</code> (PHP-mode, experts only).');
      $form['settings']['adv_link']['print_html_node_link_pages']['#description'] .= ' ' . t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => '<?php ?>'));
    }
jcnventura's avatar
jcnventura committed
272 273
  }

274
  $form['settings']['adv_link']['print_html_sys_link_visibility'] = array(
275 276
    '#type' => 'radios',
    '#title' => t('Show link in system (non-content) pages'),
277
    '#description' => 'Any page that is not a Drupal node. Usually pages generated by Drupal or a module such as Views or Panels.',
278
    '#default_value' => variable_get('print_html_sys_link_visibility', PRINT_HTML_SYS_LINK_VISIBILITY_DEFAULT),
279 280 281
    '#options' => array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.')),
  );

282
  $form['settings']['adv_link']['print_html_sys_link_pages'] = array(
283
    '#type' => 'textarea',
284
    '#default_value' => variable_get('print_html_sys_link_pages', PRINT_HTML_SYS_LINK_PAGES_DEFAULT),
285
    '#rows' => 3,
jcnventura's avatar
jcnventura committed
286
    '#description' => t('Setting this option will add a printer-friendly version page link on pages created by Drupal or the enabled modules.') . '<br />' .
287
                      t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
jcnventura's avatar
jcnventura committed
288 289
  );

290 291 292 293 294 295 296 297 298
  if (module_exists('php')) {
    if ($form['settings']['adv_link']['print_html_sys_link_visibility']['#default_value'] == 2 && !$access) {
      $form['settings']['adv_link']['print_html_sys_link_visibility'] = array('#type' => 'value', '#value' => 2);
      $form['settings']['adv_link']['print_html_sys_link_pages'] = array('#type' => 'value', '#value' => $form['settings']['adv_link']['print_html_sys_link_pages']['#default_value']);
    }
    elseif ($access) {
      $form['settings']['adv_link']['print_html_sys_link_visibility']['#options'][] = t('Show if the following PHP code returns <code>TRUE</code> (PHP-mode, experts only).');
      $form['settings']['adv_link']['print_html_sys_link_pages']['#description'] .= ' ' . t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => '<?php ?>'));
    }
jcnventura's avatar
jcnventura committed
299 300
  }

301
  $form['settings']['adv_link']['print_html_book_link'] = array(
302 303
    '#type' => 'radios',
    '#title' => t('Link in book hierarchy nodes'),
304
    '#default_value' => variable_get('print_html_book_link', PRINT_HTML_BOOK_LINK_DEFAULT),
305
    '#options' => array(t('Book module link not modified'), t('Current page and sub-pages'), t('Current page only')),
jcnventura's avatar
jcnventura committed
306 307
  );

308
  $form['settings']['print_html_new_window'] = array(
309 310
    '#type' => 'checkbox',
    '#title' => t('Open the printer-friendly version in a new window'),
311
    '#default_value' => variable_get('print_html_new_window', PRINT_HTML_NEW_WINDOW_DEFAULT),
312 313 314
    '#description' => t('Setting this option will make the printer-friendly version open in a new window/tab.'),
  );

315
  $form['settings']['print_html_sendtoprinter'] = array(
jcnventura's avatar
jcnventura committed
316 317
    '#type' => 'checkbox',
    '#title' => t('Send to printer'),
318 319
    '#default_value' => variable_get('print_html_sendtoprinter', PRINT_HTML_SENDTOPRINTER_DEFAULT),
    '#description' => t("Automatically calls the browser's print function when the printer-friendly version is displayed."),
jcnventura's avatar
jcnventura committed
320 321
  );

322 323 324 325 326 327 328
  $form['settings']['print_html_windowclose'] = array(
    '#type' => 'checkbox',
    '#title' => t('Close window after sending to printer'),
    '#default_value' => variable_get('print_html_windowclose', PRINT_HTML_WINDOWCLOSE_DEFAULT),
    '#description' => t("When the above options are enabled, this option will close the window after its contents are printed."),
  );

329 330 331 332 333 334 335
  $form['settings']['print_display_sys_urllist'] = array(
    '#type' => 'checkbox',
    '#title' => t('Printer-friendly URLs list in system pages'),
    '#default_value' => variable_get('print_display_sys_urllist', PRINT_TYPE_SYS_URLLIST_DEFAULT),
    '#description' => t('Enabling this option will display a list of printer-friendly destination URLs at the bottom of the page.'),
  );

336
  $form['settings']['print_robots_settings'] = array(
jcnventura's avatar
jcnventura committed
337 338
      '#type' => 'fieldset',
      '#title' => t('Robots META tags'),
339
      '#collapsible' => TRUE,
340
      '#collapsed' => TRUE,
jcnventura's avatar
jcnventura committed
341 342
  );

343
  $form['settings']['print_robots_settings']['print_robots_noindex'] = array(
jcnventura's avatar
jcnventura committed
344 345
    '#type' => 'checkbox',
    '#title' => t('Add noindex'),
346
    '#default_value' => variable_get('print_robots_noindex', PRINT_ROBOTS_NOINDEX_DEFAULT),
347
    '#description' => t('Instruct robots to not index printer-friendly pages. Recommended for good search engine karma.'),
jcnventura's avatar
jcnventura committed
348 349
  );

350
  $form['settings']['print_robots_settings']['print_robots_nofollow'] = array(
jcnventura's avatar
jcnventura committed
351 352
    '#type' => 'checkbox',
    '#title' => t('Add nofollow'),
353
    '#default_value' => variable_get('print_robots_nofollow', PRINT_ROBOTS_NOFOLLOW_DEFAULT),
354
    '#description' => t('Instruct robots to not follow outgoing links on printer-friendly pages.'),
jcnventura's avatar
jcnventura committed
355 356
  );

357
  $form['settings']['print_robots_settings']['print_robots_noarchive'] = array(
jcnventura's avatar
jcnventura committed
358 359
    '#type' => 'checkbox',
    '#title' => t('Add noarchive'),
360
    '#default_value' => variable_get('print_robots_noarchive', PRINT_ROBOTS_NOARCHIVE_DEFAULT),
361
    '#description' => t('Non-standard tag to instruct search engines to not show a "Cached" link for your printer-friendly pages. Recognized by Googlebot.'),
jcnventura's avatar
jcnventura committed
362 363 364 365
  );

  return system_settings_form($form);
}
366 367

/**
jcnventura's avatar
jcnventura committed
368
 * Menu callback for the common print module text strings settings form
369 370 371 372
 *
 * @ingroup forms
 */
function print_main_strings_settings() {
373 374
  drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning');

375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
  $form['print_main_text'] = array(
    '#type' => 'fieldset',
    '#title' => t('Text strings'),
  );

  $form['print_main_text']['print_text_published'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('print_text_published', t('Published on %site_name')),
  );
  $form['print_main_text']['print_text_source_url'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('print_text_source_url', t('Source URL')),
  );
  $form['print_main_text']['print_text_retrieved'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('print_text_retrieved', t('retrieved on %date')),
  );
  $form['print_main_text']['print_text_links'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('print_text_links', t('Links')),
  );
396 397 398 399 400
  $form['print_main_text']['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset to defaults'),
    '#submit' => array('print_main_strings_settings_delete'),
  );
401 402 403 404

  return system_settings_form($form);
}

405 406 407 408 409 410 411 412 413 414 415 416
/**
 * Reset button callback for text strings settings form
 *
 * @ingroup forms
 */
function print_main_strings_settings_delete() {
  variable_del('print_text_published');
  variable_del('print_text_source_url');
  variable_del('print_text_retrieved');
  variable_del('print_text_links');
}

417
/**
jcnventura's avatar
jcnventura committed
418
 * Menu callback for the printer-friendly version text strings settings form
419 420 421 422
 *
 * @ingroup forms
 */
function print_html_strings_settings() {
423 424
  drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning');

425 426 427 428 429 430 431 432 433 434 435
  $form['print_html_text'] = array(
    '#type' => 'fieldset',
    '#title' => t('Text strings'),
  );

  $form['print_html_text']['print_html_link_text'] = array(
    '#type' => 'textfield',
    '#title' => t('Link text'),
    '#default_value' => variable_get('print_html_link_text', t('Printer-friendly version')),
    '#description' => t('Text used in the link to the printer-friendly version.'),
  );
436 437 438 439 440
  $form['print_html_text']['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset to defaults'),
    '#submit' => array('print_html_strings_settings_delete'),
  );
441 442 443

  return system_settings_form($form);
}
444 445 446 447 448 449 450 451 452

/**
 * Reset button callback for text strings settings form
 *
 * @ingroup forms
 */
function print_html_strings_settings_delete() {
  variable_del('print_html_link_text');
}