From 1f1b45b5f336f4e275295702173d832cbc3b2c5f Mon Sep 17 00:00:00 2001 From: Joel Kuczmarski Date: Wed, 12 Dec 2012 21:07:25 -0600 Subject: [PATCH] reformat roots_title syntax again --- lib/utils.php | 64 +++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/utils.php b/lib/utils.php index 2055932..0b07bb1 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -7,38 +7,38 @@ */ function roots_title() { - if (is_home()) { - if (get_option('page_for_posts', true)) { - echo get_the_title(get_option('page_for_posts', true)); - } else { - _e('Latest Posts', 'roots'); - } - } elseif (is_archive()) { - $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); - if ($term) { - echo $term->name; - } elseif (is_post_type_archive()) { - echo get_queried_object()->labels->name; - } elseif (is_day()) { - printf(__('Daily Archives: %s', 'roots'), get_the_date()); - } elseif (is_month()) { - printf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y')); - } elseif (is_year()) { - printf(__('Yearly Archives: %s', 'roots'), get_the_date('Y')); - } elseif (is_author()) { - global $post; - $author_id = $post->post_author; - printf(__('Author Archives: %s', 'roots'), get_the_author_meta('display_name', $author_id)); - } else { - single_cat_title(); - } - } elseif (is_search()) { - printf(__('Search Results for %s', 'roots'), get_search_query()); - } elseif (is_404()) { - _e('File Not Found', 'roots'); - } else { - the_title(); - } + if (is_home()) { + if (get_option('page_for_posts', true)) { + echo get_the_title(get_option('page_for_posts', true)); + } else { + _e('Latest Posts', 'roots'); + } + } elseif (is_archive()) { + $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); + if ($term) { + echo $term->name; + } elseif (is_post_type_archive()) { + echo get_queried_object()->labels->name; + } elseif (is_day()) { + printf(__('Daily Archives: %s', 'roots'), get_the_date()); + } elseif (is_month()) { + printf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y')); + } elseif (is_year()) { + printf(__('Yearly Archives: %s', 'roots'), get_the_date('Y')); + } elseif (is_author()) { + global $post; + $author_id = $post->post_author; + printf(__('Author Archives: %s', 'roots'), get_the_author_meta('display_name', $author_id)); + } else { + single_cat_title(); + } + } elseif (is_search()) { + printf(__('Search Results for %s', 'roots'), get_search_query()); + } elseif (is_404()) { + _e('File Not Found', 'roots'); + } else { + the_title(); + } } function roots_template_path() {