File: /home/dwauav0tm6jp/hosted/palmetto_old/wp-content/themes/palmettomain/includes/theme-function.php
<?php
// The excerpt based on words
function my_string_limit_words($string, $word_limit)
{
$words = explode(' ', $string, ($word_limit + 1));
if(count($words) > $word_limit)
array_pop($words);
return implode(' ', $words).'... ';
}
// The excerpt based on character
function my_string_limit_char($excerpt, $substr=0)
{
$string = strip_tags(str_replace('...', '...', $excerpt));
if ($substr>0) {
$string = substr($string, 0, $substr);
}
return $string;
}
add_action( 'after_setup_theme', 'my_setup' );
add_filter('wp_default_editor', create_function('', 'return "html";'));
?>