diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-01-27 12:57:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-01-27 12:57:08 +0000 |
commit | 467dbdc4a1d51d9139df1e7ea9efdc8a310867bb (patch) | |
tree | 1b3e028512564ef835a8db90485ba426454e1f10 /includes | |
parent | 3c21bdfd5d4c83c50a946eae4f4514f7e66954f6 (diff) | |
download | brdo-467dbdc4a1d51d9139df1e7ea9efdc8a310867bb.tar.gz brdo-467dbdc4a1d51d9139df1e7ea9efdc8a310867bb.tar.bz2 |
- Patch #16253 by Goba: this simple and straightforward patch adds the ability to define different types of markers (while retaining the old default behaviour of the new and required markers to look the same). Someone with enough time on his hands might be able to partition the new marker to a real new marker and a changed marker (since node_is_new() returns TRUE even if nodes changed, and not only when they are new). This is the base on which the new patch can be worked though.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index ae93fd605..e8539f3ca 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -522,7 +522,7 @@ function theme_node($node, $teaser = FALSE, $page = FALSE) { function theme_form_element($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) { $output = "<div class=\"form-item\">\n"; - $required = $required ? theme('mark') : ''; + $required = $required ? theme('mark', 'required') : ''; if ($title) { if ($id) { @@ -698,10 +698,12 @@ function theme_block($block) { * Return a themed marker, useful for marking new comments or required form * elements. * + * @param $type + * Type of marker to return: 'new' or 'required' * @return * A string containing the marker. */ -function theme_mark() { +function theme_mark($type = 'new') { return '<span class="marker">*</span>'; } |