You are here

function textsize_display in Text Size 7

Same name and namespace in other branches
  1. 5 textsize.module \textsize_display()
  2. 6 textsize.module \textsize_display()

Cacluclate the text size for the display and link title

Return value

The text size for the display.

10 calls to textsize_display()
template_preprocess_textsize_image in includes/textsize.block.inc
Process variables for textsize-image.tpl.php.
template_preprocess_textsize_text in includes/textsize.block.inc
Process variables for textsize-text.tpl.php.
textsize_block_form_options in includes/textsize.block.inc
Returns an array of available values for the select element in the block text size.
textsize_decrease in includes/textsize.block.inc
Menu callback; decrease the textsize, then redirects to the previous page.
textsize_form in includes/textsize.block.inc
Implement hook_form().

... See full list

4 string references to 'textsize_display'
textsize_admin_settings in includes/textsize.admin.inc
Builds and returns the textsize settings form.
textsize_get_current in ./textsize.module
Return the current text size.
textsize_print_js_css in ./textsize.module
Print Javascript and CSS in the head.
textsize_uninstall in ./textsize.install
Implement hook_uninstall().

File

./textsize.module, line 294
Display a text size changer on the page for a better web accessibility.

Code

function textsize_display($value, $tsround) {
  $textsize_normal = variable_get('textsize_normal', 76);
  $textsize_display = round(100 * $value / $textsize_normal, $tsround);
  if (variable_get('textsize_display', 1) == 1) {
    return $textsize_display;
  }
  else {
    return $value;
  }
}