You are here

function styleguide_paragraph in Style Guide 6

Same name and namespace in other branches
  1. 7 styleguide.module \styleguide_paragraph()

Generate paragraph(s) of random text.

Parameters

$size: The number of paragraphs to return.

Return value

HTML paragraphs.

4 calls to styleguide_paragraph()
hook_styleguide in ./styleguide.api.php
Register a style guide element for display.
styleguide_form in ./styleguide.module
Sample form, showing all elements.
styleguide_sentence in ./styleguide.module
Generate a random sentence.
styleguide_styleguide in ./styleguide.styleguide.inc
Implements hook_styleguide().

File

./styleguide.module, line 299

Code

function styleguide_paragraph($size = 5) {
  $text = styleguide_lorem($size, 0, 'mixed', TRUE, TRUE, TRUE);
  $output = '';
  foreach ($text as $item) {
    $output .= '<p>' . trim($item) . '</p>';
  }
  return $output;
}