summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-06 09:58:34 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-06 09:58:34 +0000
commitd83289f857853b2efca194cd663267c24dbfd305 (patch)
treeb950cd9d0c4df0068164d6131c2f40fafad7022f /includes
parentbaf6910cc1002c7b40b2899162a122b3ed441e6d (diff)
downloadbrdo-d83289f857853b2efca194cd663267c24dbfd305.tar.gz
brdo-d83289f857853b2efca194cd663267c24dbfd305.tar.bz2
#196667 (GHOP 45) by fberci: add '@ingroup themeable' to all themeable functions
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc53
-rw-r--r--includes/locale.inc2
-rw-r--r--includes/menu.inc8
-rw-r--r--includes/pager.inc2
-rw-r--r--includes/theme.inc10
-rw-r--r--includes/theme.maintenance.inc2
6 files changed, 76 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 0748b20d6..d7a41e482 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -1315,6 +1315,8 @@ function form_options_flatten($array, $reset = TRUE) {
* @return
* A themed HTML string representing the form element.
*
+ * @ingroup themeable
+ *
* It is possible to group options together; to do this, change the format of
* $options to an associative array in which the keys are group labels, and the
* values are associative arrays in the normal $options format.
@@ -1417,6 +1419,8 @@ function form_get_options($element, $key) {
* Properties used: attributes, title, value, description, children, collapsible, collapsed
* @return
* A themed HTML string representing the form item group.
+ *
+ * @ingroup themeable
*/
function theme_fieldset($element) {
if ($element['#collapsible']) {
@@ -1443,6 +1447,8 @@ function theme_fieldset($element) {
* Properties used: required, return_value, value, attributes, title, description
* @return
* A themed HTML string representing the form item group.
+ *
+ * @ingroup themeable
*/
function theme_radio($element) {
_form_set_class($element, array('form-radio'));
@@ -1467,6 +1473,8 @@ function theme_radio($element) {
* Properties used: title, value, options, description, required and attributes.
* @return
* A themed HTML string representing the radio button set.
+ *
+ * @ingroup themeable
*/
function theme_radios($element) {
$class = 'form-radios';
@@ -1491,6 +1499,8 @@ function theme_radios($element) {
* Properties used: title, value, id, required, error.
* @return
* A themed HTML string representing the form item.
+ *
+ * @ingroup themeable
*/
function theme_password_confirm($element) {
return theme('form_element', $element, $element['#children']);
@@ -1557,6 +1567,8 @@ function password_confirm_validate($form, &$form_state) {
* Properties used: title, value, options, description, required and attributes.
* @return
* A themed HTML string representing the date selection boxes.
+ *
+ * @ingroup themeable
*/
function theme_date($element) {
return theme('form_element', $element, '<div class="container-inline">'. $element['#children'] .'</div>');
@@ -1748,6 +1760,8 @@ function form_expand_ahah($element) {
* Properties used: title, value, description, required, error
* @return
* A themed HTML string representing the form item.
+ *
+ * @ingroup themeable
*/
function theme_item($element) {
return theme('form_element', $element, $element['#value'] . (!empty($element['#children']) ? $element['#children'] : ''));
@@ -1761,6 +1775,8 @@ function theme_item($element) {
* Properties used: title, value, return_value, description, required
* @return
* A themed HTML string representing the checkbox.
+ *
+ * @ingroup themeable
*/
function theme_checkbox($element) {
_form_set_class($element, array('form-checkbox'));
@@ -1787,6 +1803,8 @@ function theme_checkbox($element) {
* An associative array containing the properties of the element.
* @return
* A themed HTML string representing the checkbox set.
+ *
+ * @ingroup themeable
*/
function theme_checkboxes($element) {
$class = 'form-checkboxes';
@@ -1819,10 +1837,20 @@ function expand_checkboxes($element) {
return $element;
}
+/**
+ * Theme a form submit button.
+ *
+ * @ingroup themeable
+ */
function theme_submit($element) {
return theme('button', $element);
}
+/**
+ * Theme a form button.
+ *
+ * @ingroup themeable
+ */
function theme_button($element) {
// Make sure not to overwrite classes.
if (isset($element['#attributes']['class'])) {
@@ -1836,7 +1864,9 @@ function theme_button($element) {
}
/**
- * Theme an image button.
+ * Theme a form image button.
+ *
+ * @ingroup themeable
*/
function theme_image_button($element) {
// Make sure not to overwrite classes.
@@ -1864,11 +1894,18 @@ function theme_image_button($element) {
* Properties used: value, edit
* @return
* A themed HTML string representing the hidden form field.
+ *
+ * @ingroup themeable
*/
function theme_hidden($element) {
return '<input type="hidden" name="'. $element['#name'] .'" id="'. $element['#id'] .'" value="'. check_plain($element['#value']) ."\" ". drupal_attributes($element['#attributes']) ." />\n";
}
+/**
+ * Format a form token.
+ *
+ * @ingroup themeable
+ */
function theme_token($element) {
return theme('hidden', $element);
}
@@ -1881,6 +1918,8 @@ function theme_token($element) {
* Properties used: title, value, description, size, maxlength, required, attributes autocomplete_path
* @return
* A themed HTML string representing the textfield.
+ *
+ * @ingroup themeable
*/
function theme_textfield($element) {
$size = empty($element['#size']) ? '' : ' size="'. $element['#size'] .'"';
@@ -1917,6 +1956,8 @@ function theme_textfield($element) {
* Properties used: action, method, attributes, children
* @return
* A themed HTML string representing the form.
+ *
+ * @ingroup themeable
*/
function theme_form($element) {
// Anonymous div to satisfy XHTML compliance.
@@ -1932,6 +1973,8 @@ function theme_form($element) {
* Properties used: title, value, description, rows, cols, required, attributes
* @return
* A themed HTML string representing the textarea.
+ *
+ * @ingroup themeable
*/
function theme_textarea($element) {
$class = array('form-textarea');
@@ -1965,6 +2008,8 @@ function theme_textarea($element) {
* Properties used: value, children.
* @return
* A themed HTML string representing the HTML markup.
+ *
+ * @ingroup themeable
*/
function theme_markup($element) {
@@ -1979,6 +2024,8 @@ function theme_markup($element) {
* Properties used: title, value, description, size, maxlength, required, attributes
* @return
* A themed HTML string representing the form.
+ *
+ * @ingroup themeable
*/
function theme_password($element) {
$size = $element['#size'] ? ' size="'. $element['#size'] .'" ' : '';
@@ -2019,6 +2066,8 @@ function process_weight($element) {
* @return
* A themed HTML string representing the field.
*
+ * @ingroup themeable
+ *
* For assistance with handling the uploaded file correctly, see the API
* provided by file.inc.
*/
@@ -2037,6 +2086,8 @@ function theme_file($element) {
* The form element's data.
* @return
* A string representing the form element.
+ *
+ * @ingroup themeable
*/
function theme_form_element($element, $value) {
// This is also used in the installer, pre-database setup.
diff --git a/includes/locale.inc b/includes/locale.inc
index a97d3497a..e05732d46 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -63,6 +63,8 @@ function locale_languages_overview_form() {
/**
* Theme the language overview form.
+ *
+ * @ingroup themeable
*/
function theme_locale_languages_overview_form($form) {
$default = language_default();
diff --git a/includes/menu.inc b/includes/menu.inc
index b25ad9376..0b59c9362 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -979,6 +979,8 @@ function _menu_tree_data($result, $parents, $depth, $previous_element = '') {
/**
* Generate the HTML output for a single menu link.
+ *
+ * @ingroup themeable
*/
function theme_menu_item_link($link) {
if (empty($link['options'])) {
@@ -990,6 +992,8 @@ function theme_menu_item_link($link) {
/**
* Generate the HTML output for a menu tree
+ *
+ * @ingroup themeable
*/
function theme_menu_tree($tree) {
return '<ul class="menu">'. $tree .'</ul>';
@@ -997,6 +1001,8 @@ function theme_menu_tree($tree) {
/**
* Generate the HTML output for a menu item and submenu.
+ *
+ * @ingroup themeable
*/
function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));
@@ -1011,6 +1017,8 @@ function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FA
/**
* Generate the HTML output for a single local task link.
+ *
+ * @ingroup themeable
*/
function theme_menu_local_task($link, $active = FALSE) {
return '<li '. ($active ? 'class="active" ' : '') .'>'. $link .'</li>';
diff --git a/includes/pager.inc b/includes/pager.inc
index 11f4db002..68e453ac7 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -369,6 +369,8 @@ function theme_pager_last($text, $limit, $element = 0, $parameters = array()) {
* An associative array of HTML attributes to apply to a pager anchor tag.
* @return
* An HTML string that generates the link.
+ *
+ * @ingroup themeable
*/
function theme_pager_link($text, $page_new, $element, $parameters = array(), $attributes = array()) {
$page = isset($_GET['page']) ? $_GET['page'] : '';
diff --git a/includes/theme.inc b/includes/theme.inc
index 04271ae1c..e621c139c 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1545,6 +1545,16 @@ function theme_username($object) {
return $output;
}
+/**
+ * Return a themed progress bar.
+ *
+ * @param $percent
+ * The percentage of the progress.
+ * @param $message
+ * A string containing information to be displayed.
+ * @return
+ * A themed HTML string representing the progress bar.
+ */
function theme_progress_bar($percent, $message) {
$output = '<div id="progress" class="progress">';
$output .= '<div class="bar"><div class="filled" style="width: '. $percent .'%"></div></div>';
diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc
index 142ae91ee..3570ede69 100644
--- a/includes/theme.maintenance.inc
+++ b/includes/theme.maintenance.inc
@@ -78,6 +78,8 @@ function _theme_load_offline_registry($theme, $base_theme = NULL, $theme_engine
/**
* Return a themed list of maintenance tasks to perform.
+ *
+ * @ingroup themeable
*/
function theme_task_list($items, $active = NULL) {
$done = isset($items[$active]) || $active == NULL;