Ejemplo n.º 1
0
 public function getAuthor()
 {
     $pathway = array();
     $user = wpi_get_current_author();
     //  rss
     $pathway['first'] = array($user->display_name . ' feeds', array('href' => get_author_feed_link($user->ID), 'type' => 'application/rss+xml', 'title' => __($user->display_name . ' | Subscribe to this author feed', WPI_META), 'hreflang' => get_hreflang(), 'rel' => self::RSS_REL, 'class' => 'rtxt rss16', 'rev' => 'feed:rss2'));
     // home
     $pathway['home'] = $this->getFrontpage();
     $pathway['archive'] = array(__('Author', WPI_META), array('href' => '#content-top', 'title' => __('Author | Skip to content', WPI_META)));
     $pathway['last'] = array($user->display_name, array('href' => '#content-top', 'class' => self::DN_ARROW, 'title' => __('Author | Skip to content', WPI_META)));
     return $pathway;
 }
Ejemplo n.º 2
0
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);
}