This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Truncates text. | |
* | |
* Cuts a string to the length of $length and replaces the last characters | |
* with the ending if the text is longer than length. | |
* | |
* See: oikos.org.uk/2013/02/tech-notes-a-wordpress-excerpt-with-html-tags/ | |
* See also: wpengineer.com/2410/dont-use-strlen/ | |
* See also also: oikos.org.uk/2013/02/tech-notes-a-wordpress-excerpt-with-html-tags/#comment-1467093876 |