cat_name;}
if(is_single() || is_page()) {
$post = $wp_query->post;
$post_custom = get_post_custom($post->ID);
$custom_desc_value = $post_custom["$custom_desc_key"][0];
$custom_keyw_value = $post_custom["$custom_keyw_key"][0];
if($custom_desc_value) {
$descr = trim(strip_tags($custom_desc_value));
} elseif(!empty($post->post_excerpt)) {
$descr = $post->post_excerpt;
} else {
$descr = $post->post_content;
}
$descr = str_replace(array("\r","\n"), " ", $descr);
$descr = trim(strip_tags($descr));
$descr= explode(' ', $descr);
$count=count($descr);
if($count > $enpost_desc_length) {
$l = $enpost_desc_length;
$ellipsis = '¡¡';
} elseif ($count > $zhpost_desc_length){
$l = $zhpost_desc_length;
$ellipsis = '¡¡';
} else {
$l = $count;
$ellipsis = '';
}
$description = '';
for ($i=0; $i<$l; $i++)
$description .= $descr[$i] . ' ';
$description .=$ellipsis;
if(is_single()){
$keywords='';
$tags = wp_get_post_tags($post->ID);
foreach ($tags as $tag ) {
$keywor[]=$tag->name;}if ($keywor==''){$keywords=$post->post_title;}else{
$keywords=implode(",",$keywor);}
}
elseif($custom_keyw_value) {
$keywords = trim(strip_tags($custom_keyw_value));
}
else {
if ($options['bname']){
$keywords=$post->post_title.','.strip_tags($boname);}else{
$keywords=$post->post_title;
}}
} elseif(is_category()) {
if ($options['bname']){
$keywords= $key.','.strip_tags($boname);}else{$keywords= $key;}
$category = $wp_query->get_queried_object();
$description = trim(strip_tags($category->category_description));if($description==""){$description=$key .",". trim(strip_tags(get_option('blogdescription')));}
} elseif(is_tag()) {
$tag= $wp_query->get_queried_object();
if ($options['bname']){
$keywords= $tag->name.','.strip_tags($boname);}else{$keywords= $tag->name;}
$tag = $wp_query->get_queried_object();
$description = trim(strip_tags($tag->tag_description));if($description==""){$description=$tag->name .",". trim(strip_tags(get_option('blogdescription')));}
}
else {
if ($options['gt_keywords'] && $options['gt_keywords_content']){
$keywords=($options['gt_keywords_content']);}else{$keywords=get_option('blogname');}
if ($options['gt_description'] && $options['gt_description_content']){
$description=($options['gt_description_content']);}else{$description=trim(strip_tags(get_option('blogdescription')));}
}
if($keywords){echo"