/functions/template/general_util.php

Description

general_util.php

This file is intended to contain helper functions for template sets that would like to use them.

Functions
create_css_link (line 28)

Create stylesheet links that will work for multiple browsers

  • return: The full text of the stylesheet link.
string create_css_link (string $uri, [string $name = ''], [boolean $alt = TRUE], [string $mtype = 'screen'])
  • string $uri: The URI to the linked stylesheet.
  • string $name: The title of the stylesheet (optional; default empty).
  • boolean $alt: Whether or not this is an alternate stylesheet (optional; default TRUE).
  • string $mtype: The target media display type (optional; default "screen").
displayErrors (line 158)

Display error messages for use in footer.tpl

  • author: Steve Brown
  • since: 1.5.2
void displayErrors ()
getIcon (line 91)

Checks for an image icon and returns a complete image tag or a text string with the text icon based on what is found and user prefs.

  • return: String containing icon that can be echo'ed
  • author: Steve Brown
  • since: 1.5.2
string getIcon (string $icon_theme_path, string $icon_name, string $text_icon, string $alt_text, [integer $w = NULL], [integer $h = NULL])
  • string $icon_theme_path: User's chosen icon set
  • string $icon_name: File name of the desired icon
  • string $text_icon: Text-based icon to display if desired
  • string $alt_text: Text for alt/title attribute of image
  • integer $w: Optional. Width of requested image.
  • integer $h: Optional. Height of requested image.
getIconPath (line 126)

Gets the path to the specified icon or returns NULL if the image is not found. This has been separated from getIcon to allow the path to be fetched for use w/ third party packages, e.g. dTree.

  • return: String containing path to icon that can be used in an IMG tag, or NULL if the image is not found.
  • author: Steve Brown
  • since: 1.5.2
string getIconPath (string $icon_theme_path, string $icon_name)
  • string $icon_theme_path: User's chosen icon set
  • string $icon_name: File name of the desired icon
humanReadableSize (line 175)

Make the internal show_readable_size() function available to templates.

  • return: human-readable form
  • since: 1.5.2
string humanReadableSize (int $size)
  • int $size: size to be converted to human-readable

Documentation generated on Mon, 13 Jan 2020 04:22:39 +0100 by phpDocumentor 1.4.3