- Patch #252013 by Eaton, pwolanin, Susurrus et al: drupal_render() now printes #markup, not #value.
parent
11b9f390bf
commit
57fe5103da
|
@ -2741,26 +2741,15 @@ function drupal_render(&$elements) {
|
|||
// Render all the children that use a theme function.
|
||||
if (isset($elements['#theme']) && empty($elements['#theme_used'])) {
|
||||
$elements['#theme_used'] = TRUE;
|
||||
|
||||
$previous = array();
|
||||
foreach (array('#value', '#type', '#prefix', '#suffix') as $key) {
|
||||
$previous[$key] = isset($elements[$key]) ? $elements[$key] : NULL;
|
||||
}
|
||||
// If we rendered a single element, then we will skip the renderer.
|
||||
if (empty($children)) {
|
||||
$elements['#printed'] = TRUE;
|
||||
}
|
||||
else {
|
||||
$elements['#value'] = '';
|
||||
$elements['#markup'] = '';
|
||||
}
|
||||
$elements['#type'] = 'markup';
|
||||
|
||||
unset($elements['#prefix'], $elements['#suffix']);
|
||||
$content = theme($elements['#theme'], $elements);
|
||||
|
||||
foreach (array('#value', '#type', '#prefix', '#suffix') as $key) {
|
||||
$elements[$key] = isset($previous[$key]) ? $previous[$key] : NULL;
|
||||
}
|
||||
}
|
||||
// Render each of the children using drupal_render and concatenate them.
|
||||
if (!isset($content) || $content === '') {
|
||||
|
|
|
@ -1836,7 +1836,7 @@ function form_expand_ahah($element) {
|
|||
* @ingroup themeable
|
||||
*/
|
||||
function theme_item($element) {
|
||||
return theme('form_element', $element, $element['#value'] . (!empty($element['#children']) ? $element['#children'] : ''));
|
||||
return theme('form_element', $element, $element['#markup'] . (!empty($element['#children']) ? $element['#children'] : ''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2085,7 +2085,7 @@ function theme_textarea($element) {
|
|||
*/
|
||||
|
||||
function theme_markup($element) {
|
||||
return (isset($element['#value']) ? $element['#value'] : '') . (isset($element['#children']) ? $element['#children'] : '');
|
||||
return (isset($element['#markup']) ? $element['#markup'] : '') . (isset($element['#children']) ? $element['#children'] : '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,9 +46,9 @@ function locale_languages_overview_form() {
|
|||
'#type' => 'weight',
|
||||
'#default_value' => $language->weight
|
||||
);
|
||||
$form['name'][$langcode] = array('#value' => check_plain($language->name));
|
||||
$form['native'][$langcode] = array('#value' => check_plain($language->native));
|
||||
$form['direction'][$langcode] = array('#value' => ($language->direction == LANGUAGE_RTL ? t('Right to left') : t('Left to right')));
|
||||
$form['name'][$langcode] = array('#markup' => check_plain($language->name));
|
||||
$form['native'][$langcode] = array('#markup' => check_plain($language->native));
|
||||
$form['direction'][$langcode] = array('#markup' => ($language->direction == LANGUAGE_RTL ? t('Right to left') : t('Left to right')));
|
||||
}
|
||||
$form['enabled'] = array('#type' => 'checkboxes',
|
||||
'#options' => $options,
|
||||
|
@ -230,7 +230,7 @@ function _locale_languages_common_controls(&$form, $language = NULL) {
|
|||
$form['langcode_view'] = array(
|
||||
'#type' => 'item',
|
||||
'#title' => t('Language code'),
|
||||
'#value' => $language->language
|
||||
'#markup' => $language->language
|
||||
);
|
||||
$form['langcode'] = array(
|
||||
'#type' => 'value',
|
||||
|
@ -782,7 +782,7 @@ function locale_translate_edit_form(&$form_state, $lid) {
|
|||
'original' => array(
|
||||
'#type' => 'item',
|
||||
'#title' => t('Original text'),
|
||||
'#value' => check_plain(wordwrap($source->source, 0)),
|
||||
'#markup' => check_plain(wordwrap($source->source, 0)),
|
||||
),
|
||||
'lid' => array(
|
||||
'#type' => 'value',
|
||||
|
|
|
@ -231,7 +231,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
|
|||
|
||||
if (count($db_types) == 0) {
|
||||
$form['no_db_types'] = array(
|
||||
'#value' => st('Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that <a href="@drupal-databases">Drupal supports</a>.', array('@drupal-databases' => 'http://drupal.org/node/270#database')),
|
||||
'#markup' => st('Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that <a href="@drupal-databases">Drupal supports</a>.', array('@drupal-databases' => 'http://drupal.org/node/270#database')),
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
@ -995,7 +995,7 @@ function install_task_list($active = NULL) {
|
|||
function install_configure_form(&$form_state, $url) {
|
||||
|
||||
$form['intro'] = array(
|
||||
'#value' => st('To configure your website, please provide the following information.'),
|
||||
'#markup' => st('To configure your website, please provide the following information.'),
|
||||
'#weight' => -10,
|
||||
);
|
||||
$form['site_information'] = array(
|
||||
|
@ -1024,7 +1024,7 @@ function install_configure_form(&$form_state, $url) {
|
|||
);
|
||||
$form['admin_account']['account']['#tree'] = TRUE;
|
||||
$form['admin_account']['markup'] = array(
|
||||
'#value' => '<p class="description">' . st('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.') . '</p>',
|
||||
'#markup' => '<p class="description">' . st('The administrator account has complete access to the site; it will automatically be granted all permissions and can perform any administrative activity. This will be the only account that can perform certain activities, so keep its credentials safe.') . '</p>',
|
||||
'#weight' => -10,
|
||||
);
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ function aggregator_categorize_items($items, $feed_source = '') {
|
|||
'#tree' => TRUE,
|
||||
);
|
||||
foreach ($items as $item) {
|
||||
$form['items'][$item->iid] = array('#value' => theme('aggregator_item', $item));
|
||||
$form['items'][$item->iid] = array('#markup' => theme('aggregator_item', $item));
|
||||
$form['categories'][$item->iid] = array();
|
||||
$categories_result = db_query('SELECT c.cid, c.title, ci.iid FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid AND ci.iid = %d', $item->iid);
|
||||
$selected = array();
|
||||
|
|
|
@ -53,7 +53,7 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) {
|
|||
'#value' => $block['delta'],
|
||||
);
|
||||
$form[$key]['info'] = array(
|
||||
'#value' => check_plain($block['info']),
|
||||
'#markup' => check_plain($block['info']),
|
||||
);
|
||||
$form[$key]['theme'] = array(
|
||||
'#type' => 'hidden',
|
||||
|
@ -69,7 +69,7 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) {
|
|||
'#options' => $block_regions,
|
||||
);
|
||||
$form[$key]['configure'] = array(
|
||||
'#value' => l(t('configure'),
|
||||
'#markup' => l(t('configure'),
|
||||
'admin/build/block/configure/' . $block['module'] . '/' . $block['delta']),
|
||||
);
|
||||
if ($block['module'] == 'block') {
|
||||
|
|
|
@ -49,7 +49,7 @@ function blog_user($type, &$edit, &$user) {
|
|||
$user->content['summary']['blog'] = array(
|
||||
'#type' => 'user_profile_item',
|
||||
'#title' => t('Blog'),
|
||||
'#value' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $user->name))))),
|
||||
'#markup' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $user->name))))),
|
||||
'#attributes' => array('class' => 'blog'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -692,7 +692,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) {
|
|||
if (!$teaser) {
|
||||
if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) {
|
||||
$node->content['book_navigation'] = array(
|
||||
'#value' => theme('book_navigation', $node->book),
|
||||
'#markup' => theme('book_navigation', $node->book),
|
||||
'#weight' => 100,
|
||||
);
|
||||
|
||||
|
@ -790,7 +790,7 @@ function book_form_node_delete_confirm_alter(&$form, $form_state) {
|
|||
|
||||
if (isset($node->book) && $node->book['has_children']) {
|
||||
$form['book_warning'] = array(
|
||||
'#value' => '<p>' . t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) . '</p>',
|
||||
'#markup' => '<p>' . t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) . '</p>',
|
||||
'#weight' => -10,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ function color_form_alter(&$form, $form_state, $form_id) {
|
|||
foreach (element_children($form) as $theme) {
|
||||
if ($screenshot = variable_get('color_' . $theme . '_screenshot', NULL)) {
|
||||
if (isset($form[$theme]['screenshot'])) {
|
||||
$form[$theme]['screenshot']['#value'] = theme('image', $screenshot, '', '', array('class' => 'screenshot'), FALSE);
|
||||
$form[$theme]['screenshot']['#markup'] = theme('image', $screenshot, '', '', array('class' => 'screenshot'), FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,19 +76,19 @@ function comment_admin_overview($type = 'new', $arg) {
|
|||
$comments[$comment->cid] = '';
|
||||
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
|
||||
$form['subject'][$comment->cid] = array(
|
||||
'#value' => l($comment->subject, 'node/' . $comment->nid, array('attributes' => array('title' => truncate_utf8($comment->comment, 128)), 'fragment' => 'comment-' . $comment->cid))
|
||||
'#markup' => l($comment->subject, 'node/' . $comment->nid, array('attributes' => array('title' => truncate_utf8($comment->comment, 128)), 'fragment' => 'comment-' . $comment->cid))
|
||||
);
|
||||
$form['username'][$comment->cid] = array(
|
||||
'#value' => theme('username', $comment)
|
||||
'#markup' => theme('username', $comment)
|
||||
);
|
||||
$form['node_title'][$comment->cid] = array(
|
||||
'#value' => l($comment->node_title, 'node/' . $comment->nid)
|
||||
'#markup' => l($comment->node_title, 'node/' . $comment->nid)
|
||||
);
|
||||
$form['timestamp'][$comment->cid] = array(
|
||||
'#value' => format_date($comment->timestamp, 'small')
|
||||
'#markup' => format_date($comment->timestamp, 'small')
|
||||
);
|
||||
$form['operations'][$comment->cid] = array(
|
||||
'#value' => l(t('edit'), 'comment/edit/' . $comment->cid, array('query' => $destination))
|
||||
'#markup' => l(t('edit'), 'comment/edit/' . $comment->cid, array('query' => $destination))
|
||||
);
|
||||
}
|
||||
$form['comments'] = array(
|
||||
|
@ -96,7 +96,7 @@ function comment_admin_overview($type = 'new', $arg) {
|
|||
'#options' => isset($comments) ? $comments: array()
|
||||
);
|
||||
$form['pager'] = array(
|
||||
'#value' => theme('pager', NULL, 50, 0)
|
||||
'#markup' => theme('pager', NULL, 50, 0)
|
||||
);
|
||||
|
||||
return $form;
|
||||
|
@ -169,7 +169,7 @@ function theme_comment_admin_overview($form) {
|
|||
}
|
||||
|
||||
$output .= theme('table', $form['header']['#value'], $rows);
|
||||
if ($form['pager']['#value']) {
|
||||
if ($form['pager']['#markup']) {
|
||||
$output .= drupal_render($form['pager']);
|
||||
}
|
||||
|
||||
|
|
|
@ -1267,7 +1267,7 @@ function comment_form(&$form_state, $edit, $title = NULL) {
|
|||
$form['_author'] = array(
|
||||
'#type' => 'item',
|
||||
'#title' => t('Your name'),
|
||||
'#value' => theme('username', $user),
|
||||
'#markup' => theme('username', $user),
|
||||
);
|
||||
$form['author'] = array(
|
||||
'#type' => 'value',
|
||||
|
@ -1452,7 +1452,7 @@ function comment_form_add_preview($form, &$form_state) {
|
|||
}
|
||||
|
||||
$form['comment_preview'] = array(
|
||||
'#value' => $output,
|
||||
'#markup' => $output,
|
||||
'#weight' => -100,
|
||||
'#prefix' => '<div class="preview">',
|
||||
'#suffix' => '</div>',
|
||||
|
@ -1473,7 +1473,7 @@ function comment_form_add_preview($form, &$form_state) {
|
|||
}
|
||||
|
||||
$form['comment_preview_below'] = array(
|
||||
'#value' => $output,
|
||||
'#markup' => $output,
|
||||
'#weight' => 100,
|
||||
);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ function contact_mail_page() {
|
|||
|
||||
if (count($categories) > 0) {
|
||||
$form['#token'] = $user->uid ? $user->name . $user->mail : '';
|
||||
$form['contact_information'] = array('#value' => filter_xss_admin(variable_get('contact_form_information', t('You can leave a message using the contact form below.'))));
|
||||
$form['contact_information'] = array('#markup' => filter_xss_admin(variable_get('contact_form_information', t('You can leave a message using the contact form below.'))));
|
||||
$form['name'] = array('#type' => 'textfield',
|
||||
'#title' => t('Your name'),
|
||||
'#maxlength' => 255,
|
||||
|
@ -177,11 +177,11 @@ function contact_mail_user(&$form_state, $recipient) {
|
|||
$form['recipient'] = array('#type' => 'value', '#value' => $recipient);
|
||||
$form['from'] = array('#type' => 'item',
|
||||
'#title' => t('From'),
|
||||
'#value' => check_plain($user->name) . ' <' . check_plain($user->mail) . '>',
|
||||
'#markup' => check_plain($user->name) . ' <' . check_plain($user->mail) . '>',
|
||||
);
|
||||
$form['to'] = array('#type' => 'item',
|
||||
'#title' => t('To'),
|
||||
'#value' => check_plain($recipient->name),
|
||||
'#markup' => check_plain($recipient->name),
|
||||
);
|
||||
$form['subject'] = array('#type' => 'textfield',
|
||||
'#title' => t('Subject'),
|
||||
|
|
|
@ -30,10 +30,10 @@ function filter_admin_overview() {
|
|||
}
|
||||
$default = ($id == variable_get('filter_default_format', 1));
|
||||
$options[$id] = '';
|
||||
$form[$id]['name'] = array('#value' => $format->name);
|
||||
$form[$id]['roles'] = array('#value' => $default ? t('All roles may use default format') : ($roles ? implode(', ', $roles) : t('No roles may use this format')));
|
||||
$form[$id]['configure'] = array('#value' => l(t('configure'), 'admin/settings/filters/' . $id));
|
||||
$form[$id]['delete'] = array('#value' => $default ? '' : l(t('delete'), 'admin/settings/filters/delete/' . $id));
|
||||
$form[$id]['name'] = array('#markup' => $format->name);
|
||||
$form[$id]['roles'] = array('#markup' => $default ? t('All roles may use default format') : ($roles ? implode(', ', $roles) : t('No roles may use this format')));
|
||||
$form[$id]['configure'] = array('#markup' => l(t('configure'), 'admin/settings/filters/' . $id));
|
||||
$form[$id]['delete'] = array('#markup' => $default ? '' : l(t('delete'), 'admin/settings/filters/delete/' . $id));
|
||||
$form[$id]['weight'] = array('#type' => 'weight', '#default_value' => $format->weight);
|
||||
}
|
||||
$form['default'] = array('#type' => 'radios', '#options' => $options, '#default_value' => variable_get('filter_default_format', 1));
|
||||
|
@ -166,7 +166,7 @@ function filter_admin_format_form(&$form_state, $format) {
|
|||
}
|
||||
$group = '<p>' . t('These are the guidelines that users will see for posting in this input format. They are automatically generated from the filter settings.') . '</p>';
|
||||
$group .= $tiplist;
|
||||
$form['tips'] = array('#value' => '<h2>' . t('Formatting guidelines') . '</h2>' . $group);
|
||||
$form['tips'] = array('#markup' => '<h2>' . t('Formatting guidelines') . '</h2>' . $group);
|
||||
}
|
||||
$form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
|
||||
|
||||
|
@ -325,7 +325,7 @@ function filter_admin_configure(&$form_state, $format) {
|
|||
$form = system_settings_form($form);
|
||||
}
|
||||
else {
|
||||
$form['error'] = array('#value' => t('No settings are available.'));
|
||||
$form['error'] = array('#markup' => t('No settings are available.'));
|
||||
}
|
||||
$form['format'] = array('#type' => 'hidden', '#value' => $format->format);
|
||||
$form['#submit'][] = 'filter_admin_configure_submit';
|
||||
|
@ -360,7 +360,7 @@ function filter_admin_order(&$form_state, $format = NULL) {
|
|||
|
||||
$form['weights'] = array('#tree' => TRUE);
|
||||
foreach ($filters as $id => $filter) {
|
||||
$form['names'][$id] = array('#value' => $filter->name);
|
||||
$form['names'][$id] = array('#markup' => $filter->name);
|
||||
$form['weights'][$id] = array('#type' => 'weight', '#default_value' => $filter->weight);
|
||||
}
|
||||
$form['format'] = array('#type' => 'hidden', '#value' => $format->format);
|
||||
|
|
|
@ -508,10 +508,10 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = NULL, $parents =
|
|||
$tips = _filter_tips(variable_get('filter_default_format', 1), FALSE);
|
||||
$form['format']['guidelines'] = array(
|
||||
'#title' => t('Formatting guidelines'),
|
||||
'#value' => theme('filter_tips', $tips, FALSE, $extra),
|
||||
'#markup' => theme('filter_tips', $tips, FALSE, $extra),
|
||||
);
|
||||
}
|
||||
$form[] = array('#value' => $extra);
|
||||
$form[] = array('#markup' => $extra);
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,12 +225,12 @@ function forum_overview(&$form_state) {
|
|||
foreach (element_children($form) as $key) {
|
||||
if (isset($form[$key]['#term'])) {
|
||||
$term = $form[$key]['#term'];
|
||||
$form[$key]['view']['#value'] = l($term['name'], 'forum/' . $term['tid']);
|
||||
$form[$key]['view']['#markup'] = l($term['name'], 'forum/' . $term['tid']);
|
||||
if (in_array($form[$key]['#term']['tid'], variable_get('forum_containers', array()))) {
|
||||
$form[$key]['edit']['#value'] = l(t('edit container'), 'admin/build/forum/edit/container/' . $term['tid']);
|
||||
$form[$key]['edit']['#markup'] = l(t('edit container'), 'admin/build/forum/edit/container/' . $term['tid']);
|
||||
}
|
||||
else {
|
||||
$form[$key]['edit']['#value'] = l(t('edit forum'), 'admin/build/forum/edit/forum/' . $term['tid']);
|
||||
$form[$key]['edit']['#markup'] = l(t('edit forum'), 'admin/build/forum/edit/forum/' . $term['tid']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ function forum_nodeapi(&$node, $op, $teaser, $page) {
|
|||
|
||||
if (!$teaser) {
|
||||
$node->content['forum_navigation'] = array(
|
||||
'#value' => theme('forum_topic_navigation', $node),
|
||||
'#markup' => theme('forum_topic_navigation', $node),
|
||||
'#weight' => 100,
|
||||
);
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ function forum_form_alter(&$form, $form_state, $form_id) {
|
|||
// Hide critical options from forum vocabulary.
|
||||
if ($form_id == 'taxonomy_form_vocabulary') {
|
||||
$form['help_forum_vocab'] = array(
|
||||
'#value' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
|
||||
'#markup' => t('This is the designated forum vocabulary. Some of the normal vocabulary options have been removed.'),
|
||||
'#weight' => -1,
|
||||
);
|
||||
$form['content_types']['nodes']['#required'] = TRUE;
|
||||
|
|
|
@ -51,7 +51,7 @@ function menu_overview_form(&$form_state, $menu) {
|
|||
);
|
||||
}
|
||||
else {
|
||||
$form['empty_menu'] = array('#value' => t('There are no menu items yet.'));
|
||||
$form['empty_menu'] = array('#markup' => t('There are no menu items yet.'));
|
||||
}
|
||||
return $form;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ function _menu_overview_tree_form($tree) {
|
|||
$mlid = 'mlid:' . $item['mlid'];
|
||||
$form[$mlid]['#item'] = $item;
|
||||
$form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => 'menu-disabled') : array('class' => 'menu-enabled');
|
||||
$form[$mlid]['title']['#value'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' (' . t('disabled') . ')' : '');
|
||||
$form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' (' . t('disabled') . ')' : '');
|
||||
$form[$mlid]['hidden'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#default_value' => !$item['hidden'],
|
||||
|
@ -106,7 +106,7 @@ function _menu_overview_tree_form($tree) {
|
|||
|
||||
$form[$mlid]['operations'] = array();
|
||||
foreach ($operations as $op => $value) {
|
||||
$form[$mlid]['operations'][$op] = array('#value' => $value);
|
||||
$form[$mlid]['operations'][$op] = array('#markup' => $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -600,7 +600,7 @@ function menu_reset_item_confirm_submit($form, &$form_state) {
|
|||
function menu_configure() {
|
||||
$form['intro'] = array(
|
||||
'#type' => 'item',
|
||||
'#value' => t('The menu module allows on-the-fly creation of menu links in the content authoring forms. The following option sets the default menu in which a new link will be added.'),
|
||||
'#markup' => t('The menu module allows on-the-fly creation of menu links in the content authoring forms. The following option sets the default menu in which a new link will be added.'),
|
||||
);
|
||||
|
||||
$menu_options = menu_get_menus();
|
||||
|
@ -635,4 +635,3 @@ function menu_configure() {
|
|||
|
||||
return system_settings_form($form);
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ function node_type_form(&$form_state, $type = NULL) {
|
|||
$form['identity']['type_display'] = array(
|
||||
'#title' => t('Type'),
|
||||
'#type' => 'item',
|
||||
'#value' => theme('placeholder', $type->type),
|
||||
'#markup' => theme('placeholder', $type->type),
|
||||
'#description' => t('The machine-readable name of this content type. This field cannot be modified for system-defined content types.'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ function node_configure() {
|
|||
'#type' => 'fieldset',
|
||||
'#title' => t('Node access status'),
|
||||
);
|
||||
$form['access']['status'] = array('#value' => $status);
|
||||
$form['access']['status'] = array('#markup' => $status);
|
||||
$form['access']['rebuild'] = array(
|
||||
'#type' => 'submit',
|
||||
'#value' => t('Rebuild permissions'),
|
||||
|
@ -236,10 +236,10 @@ function node_filter_form() {
|
|||
$value = $filters[$type]['options'][$value];
|
||||
}
|
||||
if ($i++) {
|
||||
$form['filters']['current'][] = array('#value' => t('<em>and</em> where <strong>%a</strong> is <strong>%b</strong>', array('%a' => $filters[$type]['title'], '%b' => $value)));
|
||||
$form['filters']['current'][] = array('#markup' => t('<em>and</em> where <strong>%a</strong> is <strong>%b</strong>', array('%a' => $filters[$type]['title'], '%b' => $value)));
|
||||
}
|
||||
else {
|
||||
$form['filters']['current'][] = array('#value' => t('<strong>%a</strong> is <strong>%b</strong>', array('%a' => $filters[$type]['title'], '%b' => $value)));
|
||||
$form['filters']['current'][] = array('#markup' => t('<strong>%a</strong> is <strong>%b</strong>', array('%a' => $filters[$type]['title'], '%b' => $value)));
|
||||
}
|
||||
if (in_array($type, array('type', 'language'))) {
|
||||
// Remove the option if it is already being filtered on.
|
||||
|
@ -495,17 +495,17 @@ function node_admin_nodes() {
|
|||
while ($node = db_fetch_object($result)) {
|
||||
$nodes[$node->nid] = '';
|
||||
$options = empty($node->language) ? array() : array('language' => $languages[$node->language]);
|
||||
$form['title'][$node->nid] = array('#value' => l($node->title, 'node/' . $node->nid, $options) . ' ' . theme('mark', node_mark($node->nid, $node->changed)));
|
||||
$form['name'][$node->nid] = array('#value' => check_plain(node_get_types('name', $node)));
|
||||
$form['username'][$node->nid] = array('#value' => theme('username', $node));
|
||||
$form['status'][$node->nid] = array('#value' => ($node->status ? t('published') : t('not published')));
|
||||
$form['title'][$node->nid] = array('#markup' => l($node->title, 'node/' . $node->nid, $options) . ' ' . theme('mark', node_mark($node->nid, $node->changed)));
|
||||
$form['name'][$node->nid] = array('#markup' => check_plain(node_get_types('name', $node)));
|
||||
$form['username'][$node->nid] = array('#markup' => theme('username', $node));
|
||||
$form['status'][$node->nid] = array('#markup' => ($node->status ? t('published') : t('not published')));
|
||||
if ($multilanguage) {
|
||||
$form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : t($languages[$node->language]->name));
|
||||
$form['language'][$node->nid] = array('#markup' => empty($node->language) ? t('Language neutral') : t($languages[$node->language]->name));
|
||||
}
|
||||
$form['operations'][$node->nid] = array('#value' => l(t('edit'), 'node/' . $node->nid . '/edit', array('query' => $destination)));
|
||||
$form['operations'][$node->nid] = array('#markup' => l(t('edit'), 'node/' . $node->nid . '/edit', array('query' => $destination)));
|
||||
}
|
||||
$form['nodes'] = array('#type' => 'checkboxes', '#options' => $nodes);
|
||||
$form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
|
||||
$form['pager'] = array('#markup' => theme('pager', NULL, 50, 0));
|
||||
$form['#theme'] = 'node_admin_nodes';
|
||||
return $form;
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ function theme_node_admin_nodes($form) {
|
|||
}
|
||||
|
||||
$output .= theme('table', $header, $rows);
|
||||
if ($form['pager']['#value']) {
|
||||
if ($form['pager']['#markup']) {
|
||||
$output .= drupal_render($form['pager']);
|
||||
}
|
||||
|
||||
|
@ -632,4 +632,3 @@ function node_multiple_delete_confirm_submit($form, &$form_state) {
|
|||
$form_state['redirect'] = 'admin/content/node';
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1074,7 +1074,7 @@ function node_prepare($node, $teaser = FALSE) {
|
|||
}
|
||||
|
||||
$node->content['body'] = array(
|
||||
'#value' => $teaser ? $node->teaser : $node->body,
|
||||
'#markup' => $teaser ? $node->teaser : $node->body,
|
||||
'#weight' => 0,
|
||||
);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ function openid_form_alter(&$form, $form_state, $form_id) {
|
|||
);
|
||||
|
||||
$form['openid_links'] = array(
|
||||
'#value' => theme('item_list', $items),
|
||||
'#markup' => theme('item_list', $items),
|
||||
'#weight' => 1,
|
||||
);
|
||||
|
||||
|
|
|
@ -552,12 +552,12 @@ function poll_view($node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
|
|||
|
||||
if (!empty($node->allowvotes) && ($block || empty($node->show_results))) {
|
||||
$node->content['body'] = array(
|
||||
'#value' => drupal_get_form('poll_view_voting', $node, $block),
|
||||
'#markup' => drupal_get_form('poll_view_voting', $node, $block),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$node->content['body'] = array(
|
||||
'#value' => poll_view_results($node, $teaser, $page, $block),
|
||||
'#markup' => poll_view_results($node, $teaser, $page, $block),
|
||||
);
|
||||
}
|
||||
return $node;
|
||||
|
|
|
@ -22,13 +22,13 @@ function profile_admin_overview() {
|
|||
$categories[] = $field->category;
|
||||
|
||||
// Save all field information
|
||||
$form[$field->fid]['name'] = array('#value' => check_plain($field->name));
|
||||
$form[$field->fid]['title'] = array('#value' => check_plain($field->title));
|
||||
$form[$field->fid]['type'] = array('#value' => $field->type);
|
||||
$form[$field->fid]['name'] = array('#markup' => check_plain($field->name));
|
||||
$form[$field->fid]['title'] = array('#markup' => check_plain($field->title));
|
||||
$form[$field->fid]['type'] = array('#markup' => $field->type);
|
||||
$form[$field->fid]['category'] = array('#type' => 'select', '#default_value' => $field->category, '#options' => array());
|
||||
$form[$field->fid]['weight'] = array('#type' => 'weight', '#default_value' => $field->weight);
|
||||
$form[$field->fid]['edit'] = array('#value' => l(t('edit'), "admin/user/profile/edit/$field->fid"));
|
||||
$form[$field->fid]['delete'] = array('#value' => l(t('delete'), "admin/user/profile/delete/$field->fid"));
|
||||
$form[$field->fid]['edit'] = array('#markup' => l(t('edit'), "admin/user/profile/edit/$field->fid"));
|
||||
$form[$field->fid]['delete'] = array('#markup' => l(t('delete'), "admin/user/profile/delete/$field->fid"));
|
||||
}
|
||||
|
||||
// Add the cateogory combo boxes
|
||||
|
@ -58,7 +58,7 @@ function profile_admin_overview() {
|
|||
$addnewfields .= '<li>' . l($value, "admin/user/profile/add/$key") . '</li>';
|
||||
}
|
||||
$addnewfields .= '</ul>';
|
||||
$form['addnewfields'] = array('#value' => $addnewfields);
|
||||
$form['addnewfields'] = array('#markup' => $addnewfields);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ function profile_view_profile(&$user) {
|
|||
$user->content[$field->category][$field->name] = array(
|
||||
'#type' => 'user_profile_item',
|
||||
'#title' => $title,
|
||||
'#value' => $value,
|
||||
'#markup' => $value,
|
||||
'#weight' => $field->weight,
|
||||
'#attributes' => array('class' => 'profile-' . $field->name),
|
||||
);
|
||||
|
|
|
@ -48,7 +48,7 @@ function search_admin_settings() {
|
|||
$percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) . '%';
|
||||
$status = '<p><strong>' . t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) . ' ' . $count . '</strong></p>';
|
||||
$form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status'));
|
||||
$form['status']['status'] = array('#value' => $status);
|
||||
$form['status']['status'] = array('#markup' => $status);
|
||||
$form['status']['wipe'] = array('#type' => 'submit', '#value' => t('Re-index site'));
|
||||
|
||||
$items = drupal_map_assoc(array(10, 20, 50, 100, 200, 500));
|
||||
|
@ -58,7 +58,7 @@ function search_admin_settings() {
|
|||
$form['indexing_throttle']['search_cron_limit'] = array('#type' => 'select', '#title' => t('Number of items to index per cron run'), '#default_value' => variable_get('search_cron_limit', 100), '#options' => $items, '#description' => t('The maximum number of items indexed in each pass of a <a href="@cron">cron maintenance task</a>. If necessary, reduce the number of items to prevent timeouts and memory errors while indexing.', array('@cron' => url('admin/reports/status'))));
|
||||
// Indexing settings:
|
||||
$form['indexing_settings'] = array('#type' => 'fieldset', '#title' => t('Indexing settings'));
|
||||
$form['indexing_settings']['info'] = array('#value' => t('<p><em>Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</em></p><p><em>The default settings should be appropriate for the majority of sites.</em></p>'));
|
||||
$form['indexing_settings']['info'] = array('#markup' => t('<p><em>Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</em></p><p><em>The default settings should be appropriate for the majority of sites.</em></p>'));
|
||||
$form['indexing_settings']['minimum_word_size'] = array('#type' => 'textfield', '#title' => t('Minimum word length to index'), '#default_value' => variable_get('minimum_word_size', 3), '#size' => 5, '#maxlength' => 3, '#description' => t('The number of characters a word has to be to be indexed. A lower setting means better search result ranking, but also a larger database. Each search query must contain at least one keyword that is this size (or longer).'));
|
||||
$form['indexing_settings']['overlap_cjk'] = array('#type' => 'checkbox', '#title' => t('Simple CJK handling'), '#default_value' => variable_get('overlap_cjk', TRUE), '#description' => t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.'));
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ function simpletest_test_form() {
|
|||
'#collapsed' => $ok,
|
||||
'#description' => $info['description'],
|
||||
);
|
||||
$element['result_table']['#value'] = theme('table', $header, $element['result_table']['#rows']);
|
||||
$element['result_table']['#markup'] = theme('table', $header, $element['result_table']['#rows']);
|
||||
$element['summary']['#ok'] = $ok;
|
||||
$group_ok = $group_ok && $ok;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ function image_gd_settings() {
|
|||
if (image_gd_check_settings()) {
|
||||
$form = array();
|
||||
$form['status'] = array(
|
||||
'#value' => t('The GD toolkit is installed and working properly.')
|
||||
'#markup' => t('The GD toolkit is installed and working properly.')
|
||||
);
|
||||
|
||||
$form['image_jpeg_quality'] = array(
|
||||
|
|
|
@ -196,7 +196,7 @@ function system_themes_form() {
|
|||
}
|
||||
$screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
|
||||
|
||||
$form[$theme->name]['screenshot'] = array('#value' => $screenshot);
|
||||
$form[$theme->name]['screenshot'] = array('#markup' => $screenshot);
|
||||
$form[$theme->name]['info'] = array(
|
||||
'#type' => 'value',
|
||||
'#value' => $theme->info,
|
||||
|
@ -204,7 +204,7 @@ function system_themes_form() {
|
|||
$options[$theme->name] = '';
|
||||
|
||||
if (!empty($theme->status) || $theme->name == variable_get('admin_theme', '0')) {
|
||||
$form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/' . $theme->name) );
|
||||
$form[$theme->name]['operations'] = array('#markup' => l(t('configure'), 'admin/build/themes/settings/' . $theme->name) );
|
||||
}
|
||||
else {
|
||||
// Dummy element for drupal_render. Cleaner than adding a check in the theme function.
|
||||
|
@ -645,15 +645,15 @@ function system_modules($form_state = array()) {
|
|||
$disabled = array();
|
||||
// Traverse the files retrieved and build the form.
|
||||
foreach ($files as $filename => $file) {
|
||||
$form['name'][$filename] = array('#value' => $file->info['name']);
|
||||
$form['version'][$filename] = array('#value' => $file->info['version']);
|
||||
$form['description'][$filename] = array('#value' => t($file->info['description']));
|
||||
$form['name'][$filename] = array('#markup' => $file->info['name']);
|
||||
$form['version'][$filename] = array('#markup' => $file->info['version']);
|
||||
$form['description'][$filename] = array('#markup' => t($file->info['description']));
|
||||
|
||||
// Generate link for module's help page, if there is one.
|
||||
if ($help_arg && module_hook($filename, 'help')) {
|
||||
if (module_invoke($filename, 'help', "admin/help#$filename", $help_arg)) {
|
||||
// Module has a help page.
|
||||
$form['help'][$filename] = array('#value' => theme('more_help_link', url("admin/help/$filename")));
|
||||
$form['help'][$filename] = array('#markup' => theme('more_help_link', url("admin/help/$filename")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -690,7 +690,7 @@ function system_modules($form_state = array()) {
|
|||
// Add text for dependencies.
|
||||
if (!empty($dependencies)) {
|
||||
$form['description'][$filename]['dependencies'] = array(
|
||||
'#value' => t('Depends on: !dependencies', array('!dependencies' => implode(', ', $dependencies))),
|
||||
'#markup' => t('Depends on: !dependencies', array('!dependencies' => implode(', ', $dependencies))),
|
||||
'#prefix' => '<div class="admin-dependencies">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
|
@ -713,7 +713,7 @@ function system_modules($form_state = array()) {
|
|||
// Add text for enabled dependents.
|
||||
if (!empty($dependents)) {
|
||||
$form['description'][$filename]['required'] = array(
|
||||
'#value' => t('Required by: !required', array('!required' => implode(', ', $dependents))),
|
||||
'#markup' => t('Required by: !required', array('!required' => implode(', ', $dependents))),
|
||||
'#prefix' => '<div class="admin-required">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
|
@ -811,7 +811,7 @@ function system_modules_confirm_form($modules, $storage) {
|
|||
);
|
||||
$items[] = format_plural(count($missing_dependencies), 'You must enable the @dependencies module to install @module.', 'You must enable the @dependencies modules to install @module.', $t_argument);
|
||||
}
|
||||
$form['text'] = array('#value' => theme('item_list', $items));
|
||||
$form['text'] = array('#markup' => theme('item_list', $items));
|
||||
|
||||
if ($form) {
|
||||
// Set some default form values
|
||||
|
@ -991,8 +991,8 @@ function system_modules_uninstall($form_state = NULL) {
|
|||
// If the hook exists, the module can be uninstalled.
|
||||
module_load_install($module->name);
|
||||
if (module_hook($module->name, 'uninstall')) {
|
||||
$form['modules'][$module->name]['name'] = array('#value' => $info['name'] ? $info['name'] : $module->name);
|
||||
$form['modules'][$module->name]['description'] = array('#value' => t($info['description']));
|
||||
$form['modules'][$module->name]['name'] = array('#markup' => $info['name'] ? $info['name'] : $module->name);
|
||||
$form['modules'][$module->name]['description'] = array('#markup' => t($info['description']));
|
||||
$options[$module->name] = '';
|
||||
}
|
||||
}
|
||||
|
@ -1044,7 +1044,7 @@ function system_modules_uninstall_confirm_form($storage) {
|
|||
if (isset($uninstall)) {
|
||||
$form['#confirmed'] = TRUE;
|
||||
$form['uninstall']['#tree'] = TRUE;
|
||||
$form['modules'] = array('#value' => '<p>' . t('The following modules will be completely uninstalled from your site, and <em>all data from these modules will be lost</em>!') . '</p>' . theme('item_list', $uninstall));
|
||||
$form['modules'] = array('#markup' => '<p>' . t('The following modules will be completely uninstalled from your site, and <em>all data from these modules will be lost</em>!') . '</p>' . theme('item_list', $uninstall));
|
||||
$form = confirm_form(
|
||||
$form,
|
||||
t('Confirm uninstall'),
|
||||
|
|
|
@ -291,7 +291,7 @@ function system_elements() {
|
|||
* Form structure.
|
||||
*/
|
||||
$type['item'] = array(
|
||||
'#value' => '',
|
||||
'#markup' => '',
|
||||
);
|
||||
|
||||
$type['hidden'] = array(
|
||||
|
@ -868,8 +868,8 @@ function system_theme_select_form($description = '', $default_value = '', $weigh
|
|||
|
||||
$screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $info->name)), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
|
||||
|
||||
$form['themes'][$info->key]['screenshot'] = array('#value' => $screenshot);
|
||||
$form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#value' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '<br /> <em>' . t('(site default theme)') . '</em>' : ''));
|
||||
$form['themes'][$info->key]['screenshot'] = array('#markup' => $screenshot);
|
||||
$form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#markup' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '<br /> <em>' . t('(site default theme)') . '</em>' : ''));
|
||||
$options[$info->key] = '';
|
||||
}
|
||||
|
||||
|
@ -1305,12 +1305,12 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
|
|||
$form['#skip_duplicate_check'] = TRUE;
|
||||
|
||||
$form['#attributes'] = array('class' => 'confirmation');
|
||||
$form['description'] = array('#value' => $description);
|
||||
$form['description'] = array('#markup' => $description);
|
||||
$form[$name] = array('#type' => 'hidden', '#value' => 1);
|
||||
|
||||
$form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
|
||||
$form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
|
||||
$form['actions']['cancel'] = array('#value' => $cancel);
|
||||
$form['actions']['cancel'] = array('#markup' => $cancel);
|
||||
$form['#theme'] = 'confirm_form';
|
||||
return $form;
|
||||
}
|
||||
|
|
|
@ -23,12 +23,12 @@ function taxonomy_overview_vocabularies() {
|
|||
$types[] = $node_type ? check_plain($node_type) : check_plain($type);
|
||||
}
|
||||
$form[$vocabulary->vid]['#vocabulary'] = (array)$vocabulary;
|
||||
$form[$vocabulary->vid]['name'] = array('#value' => check_plain($vocabulary->name));
|
||||
$form[$vocabulary->vid]['types'] = array('#value' => implode(', ', $types));
|
||||
$form[$vocabulary->vid]['name'] = array('#markup' => check_plain($vocabulary->name));
|
||||
$form[$vocabulary->vid]['types'] = array('#markup' => implode(', ', $types));
|
||||
$form[$vocabulary->vid]['weight'] = array('#type' => 'weight', '#delta' => 10, '#default_value' => $vocabulary->weight);
|
||||
$form[$vocabulary->vid]['edit'] = array('#value' => l(t('edit vocabulary'), "admin/content/taxonomy/edit/vocabulary/$vocabulary->vid"));
|
||||
$form[$vocabulary->vid]['list'] = array('#value' => l(t('list terms'), "admin/content/taxonomy/$vocabulary->vid"));
|
||||
$form[$vocabulary->vid]['add'] = array('#value' => l(t('add terms'), "admin/content/taxonomy/$vocabulary->vid/add/term"));
|
||||
$form[$vocabulary->vid]['edit'] = array('#markup' => l(t('edit vocabulary'), "admin/content/taxonomy/edit/vocabulary/$vocabulary->vid"));
|
||||
$form[$vocabulary->vid]['list'] = array('#markup' => l(t('list terms'), "admin/content/taxonomy/$vocabulary->vid"));
|
||||
$form[$vocabulary->vid]['add'] = array('#markup' => l(t('add terms'), "admin/content/taxonomy/$vocabulary->vid/add/term"));
|
||||
}
|
||||
|
||||
// Only make this form include a submit button and weight if more than one
|
||||
|
@ -387,7 +387,7 @@ function taxonomy_overview_terms(&$form_state, $vocabulary) {
|
|||
unset($form[$key]['#term']['parents'], $term->parents);
|
||||
}
|
||||
|
||||
$form[$key]['view'] = array('#value' => l($term->name, "taxonomy/term/$term->tid"));
|
||||
$form[$key]['view'] = array('#markup' => l($term->name, "taxonomy/term/$term->tid"));
|
||||
if (!$vocabulary->tags && $vocabulary->hierarchy < 2 && count($tree) > 1) {
|
||||
$form['#parent_fields'] = TRUE;
|
||||
$form[$key]['tid'] = array(
|
||||
|
@ -405,7 +405,7 @@ function taxonomy_overview_terms(&$form_state, $vocabulary) {
|
|||
'#default_value' => $term->depth,
|
||||
);
|
||||
}
|
||||
$form[$key]['edit'] = array('#value' => l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array('query' => drupal_get_destination())));
|
||||
$form[$key]['edit'] = array('#markup' => l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array('query' => drupal_get_destination())));
|
||||
}
|
||||
|
||||
$form['#total_entries'] = $total_entries;
|
||||
|
|
|
@ -173,7 +173,7 @@ function trigger_assign_form($form_state, $hook, $op, $description) {
|
|||
}
|
||||
else {
|
||||
$form[$op]['none'] = array(
|
||||
'#value' => t('No available actions for this trigger.')
|
||||
'#markup' => t('No available actions for this trigger.')
|
||||
);
|
||||
}
|
||||
return $form;
|
||||
|
|
|
@ -107,7 +107,7 @@ function upload_admin_settings() {
|
|||
'#field_suffix' => t('MB'),
|
||||
);
|
||||
|
||||
$form['settings_general']['upload_max_size'] = array('#value' => '<p>' . t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) . '</p>');
|
||||
$form['settings_general']['upload_max_size'] = array('#markup' => '<p>' . t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) . '</p>');
|
||||
|
||||
$roles = user_roles(FALSE, 'upload files');
|
||||
$form['roles'] = array('#type' => 'value', '#value' => $roles);
|
||||
|
|
|
@ -283,7 +283,7 @@ function upload_nodeapi(&$node, $op, $teaser) {
|
|||
if (count($node->files)) {
|
||||
if (!$teaser && user_access('view uploaded files')) {
|
||||
$node->content['files'] = array(
|
||||
'#value' => theme('upload_attachments', $node->files),
|
||||
'#markup' => theme('upload_attachments', $node->files),
|
||||
'#weight' => 50,
|
||||
);
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ function _upload_form($node) {
|
|||
$description = file_create_url($file->filepath);
|
||||
$description = "<small>" . check_plain($description) . "</small>";
|
||||
$form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => !empty($file->description) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description );
|
||||
$form['files'][$key]['size'] = array('#value' => format_size($file->filesize));
|
||||
$form['files'][$key]['size'] = array('#markup' => format_size($file->filesize));
|
||||
$form['files'][$key]['remove'] = array('#type' => 'checkbox', '#default_value' => !empty($file->remove));
|
||||
$form['files'][$key]['list'] = array('#type' => 'checkbox', '#default_value' => $file->list);
|
||||
$form['files'][$key]['weight'] = array('#type' => 'weight', '#delta' => count($node->files), '#default_value' => $file->weight);
|
||||
|
|
|
@ -49,10 +49,10 @@ function user_filter_form() {
|
|||
$options = $type == 'permission' ? call_user_func_array('array_merge', $filters[$type]['options']) : $filters[$type]['options'];
|
||||
$params = array('%property' => $filters[$type]['title'] , '%value' => $options[$value]);
|
||||
if ($i++ > 0) {
|
||||
$form['filters']['current'][] = array('#value' => t('<em>and</em> where <strong>%property</strong> is <strong>%value</strong>', $params));
|
||||
$form['filters']['current'][] = array('#markup' => t('<em>and</em> where <strong>%property</strong> is <strong>%value</strong>', $params));
|
||||
}
|
||||
else {
|
||||
$form['filters']['current'][] = array('#value' => t('<strong>%property</strong> is <strong>%value</strong>', $params));
|
||||
$form['filters']['current'][] = array('#markup' => t('<strong>%property</strong> is <strong>%value</strong>', $params));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,24 +171,24 @@ function user_admin_account() {
|
|||
$accounts = array();
|
||||
while ($account = db_fetch_object($result)) {
|
||||
$accounts[$account->uid] = '';
|
||||
$form['name'][$account->uid] = array('#value' => theme('username', $account));
|
||||
$form['status'][$account->uid] = array('#value' => $status[$account->status]);
|
||||
$form['name'][$account->uid] = array('#markup' => theme('username', $account));
|
||||
$form['status'][$account->uid] = array('#markup' => $status[$account->status]);
|
||||
$users_roles = array();
|
||||
$roles_result = db_query('SELECT rid FROM {users_roles} WHERE uid = %d', $account->uid);
|
||||
while ($user_role = db_fetch_object($roles_result)) {
|
||||
$users_roles[] = $roles[$user_role->rid];
|
||||
}
|
||||
asort($users_roles);
|
||||
$form['roles'][$account->uid][0] = array('#value' => theme('item_list', $users_roles));
|
||||
$form['member_for'][$account->uid] = array('#value' => format_interval(time() - $account->created));
|
||||
$form['last_access'][$account->uid] = array('#value' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never'));
|
||||
$form['operations'][$account->uid] = array('#value' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination)));
|
||||
$form['roles'][$account->uid][0] = array('#markup' => theme('item_list', $users_roles));
|
||||
$form['member_for'][$account->uid] = array('#markup' => format_interval(time() - $account->created));
|
||||
$form['last_access'][$account->uid] = array('#markup' => $account->access ? t('@time ago', array('@time' => format_interval(time() - $account->access))) : t('never'));
|
||||
$form['operations'][$account->uid] = array('#markup' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination)));
|
||||
}
|
||||
$form['accounts'] = array(
|
||||
'#type' => 'checkboxes',
|
||||
'#options' => $accounts
|
||||
);
|
||||
$form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
|
||||
$form['pager'] = array('#markup' => theme('pager', NULL, 50, 0));
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ function user_admin_perm($form_state, $rid = NULL) {
|
|||
foreach (module_list(FALSE, FALSE, TRUE) as $module) {
|
||||
if ($permissions = module_invoke($module, 'perm')) {
|
||||
$form['permission'][] = array(
|
||||
'#value' => $module,
|
||||
'#markup' => $module,
|
||||
);
|
||||
ksort($permissions);
|
||||
foreach ($permissions as $perm => $description) {
|
||||
|
@ -525,7 +525,7 @@ function user_admin_perm($form_state, $rid = NULL) {
|
|||
$options[$perm] = '';
|
||||
$form['permission'][$perm] = array(
|
||||
'#type' => 'item',
|
||||
'#value' => t($perm),
|
||||
'#markup' => t($perm),
|
||||
'#description' => $hide_descriptions ? $description : NULL,
|
||||
);
|
||||
foreach ($role_names as $rid => $name) {
|
||||
|
@ -541,7 +541,7 @@ function user_admin_perm($form_state, $rid = NULL) {
|
|||
// Have to build checkboxes here after checkbox arrays are built
|
||||
foreach ($role_names as $rid => $name) {
|
||||
$form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => isset($status[$rid]) ? $status[$rid] : array());
|
||||
$form['role_names'][$rid] = array('#value' => $name, '#tree' => TRUE);
|
||||
$form['role_names'][$rid] = array('#markup' => $name, '#tree' => TRUE);
|
||||
}
|
||||
$form['submit'] = array('#type' => 'submit', '#value' => t('Save permissions'));
|
||||
|
||||
|
@ -740,7 +740,7 @@ function theme_user_admin_account($form) {
|
|||
}
|
||||
|
||||
$output .= theme('table', $header, $rows);
|
||||
if ($form['pager']['#value']) {
|
||||
if ($form['pager']['#markup']) {
|
||||
$output .= drupal_render($form['pager']);
|
||||
}
|
||||
|
||||
|
|
|
@ -653,7 +653,7 @@ function user_user($type, &$edit, &$account, $category = NULL) {
|
|||
$account->content['summary']['member_for'] = array(
|
||||
'#type' => 'user_profile_item',
|
||||
'#title' => t('Member for'),
|
||||
'#value' => format_interval(time() - $account->created),
|
||||
'#markup' => format_interval(time() - $account->created),
|
||||
);
|
||||
}
|
||||
if ($type == 'form' && $category == 'account') {
|
||||
|
@ -701,7 +701,7 @@ function user_login_block() {
|
|||
$items[] = l(t('Create new account'), 'user/register', array('attributes' => array('title' => t('Create a new user account.'))));
|
||||
}
|
||||
$items[] = l(t('Request new password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
|
||||
$form['links'] = array('#value' => theme('item_list', $items));
|
||||
$form['links'] = array('#markup' => theme('item_list', $items));
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ function user_edit_form(&$form_state, $uid, $edit, $register = FALSE) {
|
|||
$form['picture'] = array('#type' => 'fieldset', '#title' => t('Picture'), '#weight' => 1);
|
||||
$picture = theme('user_picture', (object)$edit);
|
||||
if ($edit['picture']) {
|
||||
$form['picture']['current_picture'] = array('#value' => $picture);
|
||||
$form['picture']['current_picture'] = array('#markup' => $picture);
|
||||
$form['picture']['picture_delete'] = array('#type' => 'checkbox', '#title' => t('Delete picture'), '#description' => t('Check this box to delete your current picture.'));
|
||||
}
|
||||
else {
|
||||
|
@ -2335,7 +2335,7 @@ function user_register() {
|
|||
|
||||
// Display the registration form.
|
||||
if (!$admin) {
|
||||
$form['user_registration_help'] = array('#value' => filter_xss_admin(variable_get('user_registration_help', '')));
|
||||
$form['user_registration_help'] = array('#markup' => filter_xss_admin(variable_get('user_registration_help', '')));
|
||||
}
|
||||
|
||||
// Merge in the default user edit fields.
|
||||
|
|
|
@ -105,8 +105,8 @@ function user_pass_reset(&$form_state, $uid, $timestamp, $hashed_pass, $action =
|
|||
drupal_goto('user/' . $user->uid . '/edit');
|
||||
}
|
||||
else {
|
||||
$form['message'] = array('#value' => t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to login to the site and change your password.</p>', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout))));
|
||||
$form['help'] = array('#value' => '<p>' . t('This login can be used only once.') . '</p>');
|
||||
$form['message'] = array('#markup' => t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to login to the site and change your password.</p>', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout))));
|
||||
$form['help'] = array('#markup' => '<p>' . t('This login can be used only once.') . '</p>');
|
||||
$form['submit'] = array('#type' => 'submit', '#value' => t('Log in'));
|
||||
$form['#action'] = url("user/reset/$uid/$timestamp/$hashed_pass/login");
|
||||
return $form;
|
||||
|
@ -186,7 +186,7 @@ function template_preprocess_user_profile(&$variables) {
|
|||
*/
|
||||
function template_preprocess_user_profile_item(&$variables) {
|
||||
$variables['title'] = $variables['element']['#title'];
|
||||
$variables['value'] = $variables['element']['#value'];
|
||||
$variables['value'] = $variables['element']['#markup'];
|
||||
$variables['attributes'] = '';
|
||||
if (isset($variables['element']['#attributes'])) {
|
||||
$variables['attributes'] = drupal_attributes($variables['element']['#attributes']);
|
||||
|
|
|
@ -223,7 +223,7 @@ function update_script_selection_form() {
|
|||
$last_removed = module_invoke($module, 'update_last_removed');
|
||||
if ($schema_version < $last_removed) {
|
||||
$form['start'][$module] = array(
|
||||
'#value' => '<em>' . $module . '</em> module can not be updated. Its schema version is ' . $schema_version . '. Updates up to and including ' . $last_removed . ' have been removed in this release. In order to update <em>' . $module . '</em> module, you will first <a href="http://drupal.org/upgrade">need to upgrade</a> to the last version in which these updates were available.',
|
||||
'#markup' => '<em>' . $module . '</em> module can not be updated. Its schema version is ' . $schema_version . '. Updates up to and including ' . $last_removed . ' have been removed in this release. In order to update <em>' . $module . '</em> module, you will first <a href="http://drupal.org/upgrade">need to upgrade</a> to the last version in which these updates were available.',
|
||||
'#prefix' => '<div class="warning">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue