Skrajšaj besedilo na določeno število besed

<?php
/**
* Get the excerpt and limit it to n number of words
**/
$excerpt = get_the_excerpt();
$excerpt = (( sizeof( explode(' ', $excerpt) ) > 15 )) ? implode(' ', array_slice(explode(' ', $excerpt), 0, 15)).'&mldr;' : $excerpt;
echo apply_filters('the_content',$excerpt);