function wpi_get_hatom_title() { $sc = is_at(); $att = array(); $att['href'] = get_permalink(); $att['rel'] = 'bookmark archive'; $att['rev'] = 'vote-for'; $att['class'] = 'taggedlink url fn'; if ($sc == wpiSection::ATTACHMENT || $sc == wpiSection::SINGLE || $sc == wpiSection::PAGE) { $att['class'] .= ' dn'; } $att['hreflang'] = get_hreflang(); $att['xml:lang'] = $att['hreflang']; $att['title'] = get_the_title(); $htm = _t('a', $att['title'], $att); if ($sc == wpiSection::HOME) { $htm .= wpi_get_subtitle(); } $htm = _t('h2', $htm, array('class' => 'entry-title item')); return apply_filters(wpiFilter::HTOM_TITLE, $htm); }
function wpi_content_meta_title_filter() { global $wp_query; $title = get_the_title(); $output = false; if ($wp_query->is_single || $wp_query->is_page) { $htm = _t('strong', $title); $htm .= wpi_get_subtitle(); $output = _t('h1', $htm); } if ($wp_query->is_category) { $title = single_cat_title('', false); $htm = _t('strong', $title); $output = _t('h1', $htm); if (($desc = $wp_query->queried_object->category_description) != '') { $output .= _t('blockquote', _t('p', $desc . ' '), array('cite' => self_uri(), 'class' => 'entry-summary r')); } else { $desc = WPI_BLOG_NAME . ''s archive for ' . $title . ', there is ' . $wp_query->queried_object->count . ' articles for this 'main' category.'; $output .= _t('blockquote', _t('p', $desc . ' '), array('cite' => self_uri(), 'class' => 'entry-summary r')); } } if ($wp_query->is_tag) { $title = single_tag_title('', false); $htm = _t('strong', $title); $output = _t('h1', $htm, array('title' => $title)); $desc = WPI_BLOG_NAME . ''s taxonomy archive for ' . $title . ', there is ' . $wp_query->queried_object->count . ' article(s) for this tag.'; $output .= _t('blockquote', _t('p', $desc . ' '), array('cite' => self_uri(), 'class' => 'entry-summary r')); } if ($wp_query->is_search) { $title = get_search_query(); $htm = _t('small', __('Search results for: ', WPI_META)); $htm .= _t('strong', $title); $output = _t('h1', $htm, array('title' => $title)); } if ($wp_query->is_year) { $title = get_the_time('Y'); $htm = _t('strong', $title); $output = _t('small', __('Archive for', WPI_META)); $output .= _t('h1', $htm, array('title' => $title)); } if ($wp_query->is_month) { $title = get_the_time('F, Y'); $htm = _t('strong', $title); $output = _t('small', __('Archive for', WPI_META)); $output .= _t('h1', $htm, array('title' => $title)); } if ($wp_query->is_day) { $title = get_the_time('F jS, Y'); $htm = _t('strong', $title); $output = _t('small', __('Archive for', WPI_META)); $output .= _t('h1', $htm, array('title' => $title)); } if ($wp_query->is_author) { $user = wpi_get_current_author(); $title = $user->display_name; $htm = _t('strong', $title); $output = _t('h1', $htm, array('title' => $title)); $desc = $user->user_description; $output .= _t('blockquote', _t('p', $desc . ' '), array('cite' => self_uri(), 'class' => 'entry-summary r')); } if ($wp_query->is_404) { $htm = _t('strong', __('404 Not Found', WPI_META)); $output = _t('h1', $htm, array('title' => $title)); $desc = 'Sorry, but you are looking for something that isn't here'; $output .= _t('blockquote', _t('p', $desc . ' '), array('cite' => self_uri(), 'class' => 'entry-summary r')); } $output = wpi_google_ads_targeting_filter($output); if ($output) { echo stab(1) . $output; } //wpi_dump($wp_query); exit; unset($output, $section, $title, $htm); }