From 467dbdc4a1d51d9139df1e7ea9efdc8a310867bb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 27 Jan 2005 12:57:08 +0000 Subject: - 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. --- includes/theme.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'includes') 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 = "
\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 '*'; } -- cgit v1.2.3