0) return true;
else return false;
}
// retreives image from the post
function getImage($num) {
global $more;
$more = 1;
$content = get_the_content();
$count = substr_count($content, '');
$postOutput = substr($post, 0, $imgEnd+1);
$image[$i] = $postOutput;
$start=$imgEnd+1;
$cleanF = strpos($image[$num],'src="')+5;
$cleanB = strpos($image[$num],'"',$cleanF)-$cleanF;
$imgThumb = substr($image[$num],$cleanF,$cleanB);
}
if(stristr($image[$num],'
)(.*?)!ise', " '$1' . stripslashes( str_replace(array('<','>'),array('<','>'),'$2') ) . '' ", $content_text);
return $content_text;
}
add_filter('the_content','mish_code_filter', 1, 1);
// CUSTOM GRAVATARS
function string_limit_words($string, $word_limit){ $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words);};
if ( !function_exists('fb_addgravatar') ) {
function fb_addgravatar( $avatar_defaults ) {
$myavatar = get_bloginfo('stylesheet_directory') . '/images/people-avatar.png';
$avatar_defaults[$myavatar] = 'people';
$myavatar2 = get_bloginfo('stylesheet_directory') . '/images/admin-avatar.png';
$avatar_defaults[$myavatar2] = 'Admin';
return $avatar_defaults;
}
add_filter( 'avatar_defaults', 'fb_addgravatar' );
};
function the_title2($before = '', $after = '', $echo = true, $length = false) {
$title = get_the_title();
if ( $length && is_numeric($length) ) {
$title = substr( $title, 0, $length );
}
if ( strlen($title)> 0 ) {
$title = apply_filters('the_title2', $before . $title . $after, $before, $after);
if ( $echo )
echo $title;
else
return $title;
}
}
?>
'.$themename.' settings saved.
'.$themename.' settings reset.
To easily use the theme, you can use the menu below.