| 1 |
<?php
|
| 2 |
|
| 3 |
/**
|
| 4 |
* Utility function that creates a link with prefix and suffix text
|
| 5 |
*
|
| 6 |
* @param $prefix
|
| 7 |
* The text to prefix the link.
|
| 8 |
* @param $suffix
|
| 9 |
* The text to suffix the link.
|
| 10 |
* @param $text
|
| 11 |
* The text to be enclosed with the anchor tag.
|
| 12 |
* @param $path
|
| 13 |
* The Drupal path being linked to, such as "admin/content/node". Can be an external
|
| 14 |
* or internal URL.
|
| 15 |
* - If you provide the full URL, it will be considered an
|
| 16 |
* external URL.
|
| 17 |
* - If you provide only the path (e.g. "admin/content/node"), it is considered an
|
| 18 |
* internal link. In this case, it must be a system URL as the url() function
|
| 19 |
* will generate the alias.
|
| 20 |
* @param $options
|
| 21 |
* An associative array that contains the following other arrays and values
|
| 22 |
* @param $attributes
|
| 23 |
* An associative array of HTML attributes to apply to the anchor tag.
|
| 24 |
* @param $query
|
| 25 |
* A query string to append to the link.
|
| 26 |
* @param $fragment
|
| 27 |
* A fragment identifier (named anchor) to append to the link.
|
| 28 |
* @param $absolute
|
| 29 |
* Whether to force the output to be an absolute link (beginning with http:).
|
| 30 |
* Useful for links that will be displayed outside the site, such as in an RSS
|
| 31 |
* feed.
|
| 32 |
* @param $html
|
| 33 |
* Whether the title is HTML or not (plain text)
|
| 34 |
* @return
|
| 35 |
* an HTML string containing a link to the given path.
|
| 36 |
*/
|
| 37 |
function _themesettings_link($prefix, $suffix, $text, $path, $options) {
|
| 38 |
return $prefix . (($text) ? l($text, $path, $options) : '') . $suffix;
|
| 39 |
}
|
| 40 |
|
| 41 |
function zen_id_safe($string) {
|
| 42 |
if (is_numeric($string{0})) {
|
| 43 |
// If the first character is numeric, add 'n' in front
|
| 44 |
$string = 'n'. $string;
|
| 45 |
}
|
| 46 |
return strtolower(preg_replace('/[^a-zA-Z0-9_-]+/', '-', $string));
|
| 47 |
}
|
| 48 |
|
| 49 |
// including functions for color manipulations, if they are available
|
| 50 |
if(is_file($theme_path . 'color/color-utility-functions.inc')) {
|
| 51 |
include('color/color-utility-functions.inc');
|
| 52 |
}
|