Beispiel #1
0
$catID = $_GET['c'] ? $_GET['c'] : '';
global $page, $paged;
wp_title('|', true, 'right');
if (is_single()) {
    $tcat = get_the_category();
    echo $tcat['0']->name . ' | ';
} elseif (is_search()) {
    if ($tag != '') {
        echo urldecode($tag) . ' | ';
    }
    if ($catID != '' || $catID == 'all') {
        echo get_cat_name(1) . ' | ';
    }
}
bloginfo('name');
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page())) {
    echo " | {$site_description}";
}
if ($paged >= 2 || $page >= 2) {
    echo ' | ' . sprintf(__('Page %s', 'twentyten'), max($paged, $page));
}
?>
</title>
<?php 
theme_keywords();
?>

<?php 
theme_description();
Beispiel #2
0
 /**
  * @param string $description
  * @return string
  */
 public function description($description = '')
 {
     if (!empty($description)) {
         $this->description = htmlShorten($description, AppConfig::MEDIUM_SHORTEN_TEXT_LENGTH);
         add_filter('open_graph_tags_before_render', new CallableObject(function ($data) {
             $data['og:description'] = theme_description();
             return $data;
         }));
     }
     return $this->description;
 }