). * This tag will be wrapped around the content. In Drupal 7, this element is * deprecated in favor of theme_html_tag(). * -- 'attributes' (optional). An array of attributes to apply to a tag element. * -- 'group' (optional). A string indicating the context of this element. * Groups are organized within the preview interface. If no group is * provided, the item will be assigned to the 'Common' group. * * @return $items * An array of items to render. */ function hook_styleguide() { $items['ul'] = array( 'title' => t('Unordered list'), 'theme' => 'item_list', 'variables' => array('items' => styleguide_list(), 'type' => 'ul'), 'group' => t('Common'), ); $items['text'] => array( 'title' => t('Text block'), 'content' => styleguide_paragraph(3), 'group' => t('Text'), 'description' => t('A block of three paragraphs'), ); $items['h1'] = array( 'title' => t('Text block'), 'tag' => 'h1', 'content' => styleguide_word(3), 'group' => t('Text'), ); $items['div-format'] = array( 'title' => t('Div special'), 'description' => t('Add the "format" class to emphasize an entire section.'), 'tag' => 'div', 'attributes' => array('class' => 'format'), 'content' => styleguide_paragraph(1), ); return $items; } /** * Alter styleguide elements. * * @param &$items * An array of items to be displayed. * * @return * No return value. Modify $items by reference. * * @see hook_styleguide() */ function hook_styleguide_alter(&$items) { // Add a class to the text test. $items['text']['content'] = '