/** * Creates the meta-tag description */ function thematic_create_description() { $content = ''; if (thematic_seo()) { if (is_single() || is_page()) { if (have_posts()) { while (have_posts()) { the_post(); if (thematic_the_excerpt() == "") { if (thematic_use_autoexcerpt()) { $content = "\t"; $content .= "<meta name=\"description\" content=\""; $content .= thematic_excerpt_rss(); $content .= "\" />"; $content .= "\n\n"; } } else { if (thematic_use_excerpt()) { $content = "\t"; $content .= "<meta name=\"description\" content=\""; $content .= thematic_the_excerpt(); $content .= "\" />"; $content .= "\n\n"; } } } } } elseif (is_home() || is_front_page()) { $content = "\t"; $content .= "<meta name=\"description\" content=\""; $content .= get_bloginfo('description'); $content .= "\" />"; $content .= "\n\n"; } echo apply_filters('thematic_create_description', $content); } }
/** * Display the meta-tag description * * This can be switched off by filtering either thematic_seo or thematic_show_description and returning FALSE * * Filter: thematic_show_description boolean filter to to display the meta description defaults to ON * Filter: thematic_use_autoexcerpt boolean filter to switch ON auto-excerpted descriptions defaults to OFF * Filter: thematic_use_autoexcerpt boolean filter to switch OFF auto-excerpted descriptions defaults to ON * Filter: thematic_create_description */ function thematic_meta_description() { if (thematic_seo()) { $display = apply_filters('thematic_show_description', $display = TRUE); if ($display) { $content = ''; if (is_single() || is_page()) { if (have_posts()) { while (have_posts()) { the_post(); if (thematic_the_excerpt() == "") { if (apply_filters('thematic_use_autoexcerpt', $display = FALSE)) { $content = '<meta name="description" content="'; $content .= thematic_excerpt_rss(); $content .= '" />'; $content .= "\n"; } } else { if (apply_filters('thematic_use_excerpt', $display = TRUE)) { $content = '<meta name="description" content="'; $content .= thematic_the_excerpt(); $content .= '" />'; $content .= "\n"; } } } } } elseif (is_home() || is_front_page()) { $content = '<meta name="description" content="'; $content .= get_bloginfo('description', 'display'); $content .= '" />'; $content .= "\n"; } echo apply_filters('thematic_create_description', $content); } } // end thematic_meta_description }