Sha256: d3deaadc37640c6a4ce77d64919f10a10d01e5a67797e06bb948f940a6ec07c9
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
<?php /** * Page titles */ function roots_title() { if (is_home()) { if (get_option('page_for_posts', true)) { return get_the_title(get_option('page_for_posts', true)); } else { return __('Latest Posts', 'roots'); } } elseif (is_archive()) { $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); if ($term) { return apply_filters('single_term_title', $term->name); } elseif (is_post_type_archive()) { return apply_filters('the_title', get_queried_object()->labels->name); } elseif (is_day()) { return sprintf(__('Daily Archives: %s', 'roots'), get_the_date()); } elseif (is_month()) { return sprintf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y')); } elseif (is_year()) { return sprintf(__('Yearly Archives: %s', 'roots'), get_the_date('Y')); } elseif (is_author()) { $author = get_queried_object(); return sprintf(__('Author Archives: %s', 'roots'), $author->display_name); } else { return single_cat_title('', false); } } elseif (is_search()) { return sprintf(__('Search Results for %s', 'roots'), get_search_query()); } elseif (is_404()) { return __('Not Found', 'roots'); } else { return get_the_title(); } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stump-cli-0.1.3 | lib/wp/wp-content/themes/stump/lib/titles.php |
stump-cli-0.1.2 | lib/wp/wp-content/themes/stump/lib/titles.php |
stump-cli-0.1.1 | lib/wp/wp-content/themes/stump/lib/titles.php |