public static function DrupalMetaTagInterface::textSummary in Metatag 7
Copied from text.module with the following changes:.
Change 1: $size is required. Change 2: $format is removed. Change 3: Don't trim at the end of short sentences (https://www.drupal.org/node/1620104). Change 4: Word boundaries (https://www.drupal.org/node/1482178). Change 5: Trim the final string.
Parameters
string $text: The string to be processed.
int $size: The maximum length to trim the string to.
Return value
string The string after it is truncated.
1 method overrides DrupalMetaTagInterface::textSummary()
- DrupalDefaultMetaTag::textSummary in ./
metatag.inc - Copied from text.module with the following changes:.
File
- ./
metatag.inc, line 73 - Metatag primary classes.
Class
- DrupalMetaTagInterface
- The master interface for all tags.
Code
public static function textSummary($text, $size);