Permalink
Browse files

Make title and header always link to the home page.

  • Loading branch information...
1 parent 9645e29 commit 2c19f0ecffae5cbd052c2efd3fec2318ba2cf068 @beastaugh committed Dec 16, 2012
Showing with 25 additions and 27 deletions.
  1. +1 −0 changelog.txt
  2. +19 −26 library/helpers/template_helper.php
  3. +1 −1 style.css
  4. +4 −0 style.dev.css
View
@@ -5,6 +5,7 @@
* Added option to display featured post images in the header.
* Moved language files to `/languages` directory.
* Added POT file to theme files in `languages` directory.
+ * Title and header always link to the home page.
* Removed uses of call-time pass-by-reference for compatibility with PHP 5.4.
* Replaced use of deprecated `add_custom_image_header` function.
* Stop defining and using header image constants.
@@ -310,25 +310,25 @@ function tarski_headerimage() {
$header_img_url);
}
- if (!(get_tarski_option('display_title') || is_front_page()))
- $header_img_tag = sprintf(
- '<a title="%s" rel="home" href="%s">%s</a>',
- __('Return to main page', 'tarski'),
- user_trailingslashit(home_url()),
- $header_img_tag);
+ $header_img_tag = sprintf(
+ '<a title="%s" rel="home" href="%s">%s</a>',
+ __('Return to main page', 'tarski'),
+ user_trailingslashit(home_url()),
+ $header_img_tag);
echo "<div id=\"header-image\">$header_img_tag</div>\n\n";
}
/**
* Returns site title, wrapped in appropriate markup.
*
- * The title on the home page will appear inside an h1 element,
- * whereas on other pages it will be a link (to the home page),
- * wrapped in a p (paragraph) element.
- *
* @since 1.5
*
+ * @uses get_bloginfo
+ * @uses get_tarski_option
+ * @uses user_trailingslashit
+ * @uses home_url
+ *
* @return string
*
* @hook filter tarski_sitetitle
@@ -337,21 +337,13 @@ function tarski_headerimage() {
function tarski_sitetitle() {
if (!get_tarski_option('display_title')) return '';
- $site_title = get_bloginfo('name');
-
- if (!is_front_page()) {
- $site_title = sprintf(
- '<a title="%1$s" href="%2$s" rel="home">%3$s</a>',
- __('Return to main page','tarski'),
- user_trailingslashit(home_url()),
- $site_title);
- }
-
- if ((get_option('show_on_front') == 'posts') && is_home()) {
- $site_title = sprintf('<h1 id="blog-title">%s</h1>', $site_title);
- } else {
- $site_title = sprintf('<p id="blog-title">%s</p>', $site_title);
- }
+ $site_title = sprintf(
+ '<h1 id="blog-title">' .
+ '<a title="%1$s" href="%2$s" rel="home">%3$s</a>' .
+ '</h1>',
+ __('Return to main page','tarski'),
+ user_trailingslashit(home_url()),
+ get_bloginfo('name'));
return apply_filters('tarski_sitetitle', $site_title);
}
@@ -368,7 +360,8 @@ function tarski_sitetitle() {
*/
function tarski_tagline() {
$tagline = get_bloginfo('description', 'display');
- $tagline = (get_tarski_option('display_tagline') && strlen($tagline)) ? sprintf('<p id="tagline">%s</p>', $tagline) : '';
+ $tagline = (get_tarski_option('display_tagline') && strlen($tagline))
+ ? sprintf('<p id="tagline">%s</p>', $tagline) : '';
return apply_filters('tarski_tagline', $tagline);
}
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -415,6 +415,10 @@ body .content li {
line-height: 120%;
}
+#blog-title a {
+ color: #404040;
+}
+
#tagline {
font-family: 'Times New Roman', Times, serif;
font-size: 1.5em;

0 comments on commit 2c19f0e

Please sign in to comment.