Permalink
Browse files

Clean up theme according to WP Theme Review

  • Loading branch information...
1 parent 212023b commit 632a1b0562365d4212e594aabafd38118afc3a3c @nblue nblue committed Jul 6, 2011
Showing with 182 additions and 128 deletions.
  1. +2 −2 404.php
  2. +7 −7 archive.php
  3. +38 −36 comments.php
  4. +2 −2 css/pagestyle.php
  5. +3 −5 footer.php
  6. +2 −2 functions.php
  7. +29 −21 header.php
  8. +16 −16 inc/banner-edit.php
  9. +4 −4 inc/meta.php
  10. +6 −13 inc/page-style.php
  11. +6 −5 inc/post-options.php
  12. +42 −8 inc/theme-options.php
  13. +3 −3 loop.php
  14. +13 −0 readme.txt
  15. +1 −1 search.php
  16. +1 −1 searchform.php
  17. +1 −1 sidebar.php
  18. +6 −1 style.css
View
@@ -1,8 +1,8 @@
<?php get_header(); ?>
<div id="page_main" role="main" class="full_content">
- <h2><?php _e('Page not found')?></h2>
+ <h2><?php _e('Page not found','protean')?></h2>
<br/>
- <p><?php _e('Apologies, but the page you requested could not be found. Perhaps searching will help.')?></p>
+ <p><?php _e('Apologies, but the page you requested could not be found. Perhaps searching will help.','protean')?></p>
</div><!-- page_main -->
<hr/>
<?php get_sidebar(); ?>
View
@@ -4,25 +4,25 @@
<?php if(have_posts())the_post(); ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
- <h2><?php _e('Archive for the')?> &#8216;<?php single_cat_title(); ?>&#8217; <?php _e('Category')?></h2>
+ <h2><?php _e('Archive for the','protean')?> &#8216;<?php single_cat_title(); ?>&#8217; <?php _e('Category','protean')?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
- <h2><?php _e('Posts Tagged')?> &#8216;<?php single_tag_title(); ?>&#8217;</h2>
+ <h2><?php _e('Posts Tagged','protean')?> &#8216;<?php single_tag_title(); ?>&#8217;</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
- <h2><?php _e('Archive for')?> <?php the_time('F jS, Y'); ?></h2>
+ <h2><?php _e('Archive for','protean')?> <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
- <h2><?php _e('Archive for')?> <?php the_time('F, Y'); ?></h2>
+ <h2><?php _e('Archive for','protean')?> <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
- <h2 class="pagetitle"><?php _e('Archive for')?> <?php the_time('Y'); ?></h2>
+ <h2 class="pagetitle"><?php _e('Archive for','protean')?> <?php the_time('Y'); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
- <h2 class="pagetitle"><?php _e('Author Archive for')?> &#8216;<?php the_author() ?>&#8217;</h2>
+ <h2 class="pagetitle"><?php _e('Author Archive for','protean')?> &#8216;<?php the_author() ?>&#8217;</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
- <h2 class="pagetitle"><?php _e('Blog Archives')?></h2>
+ <h2 class="pagetitle"><?php _e('Blog Archives','protean')?></h2>
<?php } ?>
</div><!-- full_content -->
View
@@ -3,7 +3,7 @@
die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?>
- <p class="center"><?php _e('This post is password protected. Enter the password to view comments.')?></p><br/><br/>
+ <p class="center"><?php _e('This post is password protected. Enter the password to view comments.','protean')?></p><br/><br/>
<hr/>
<?php
return;
@@ -16,21 +16,22 @@
foreach ( $comments as $comment ) get_comment_type() == "comment" ? ++$comment_count : ++$ping_count;?>
<?php if ($comment_count>0) { ?>
- <div class="content_main"><h3 class="comment_head"><?php printf($comment_count > 1 ? __('%d Comments') : __('One Comment'), $comment_count) ?></h3></div>
+ <div class="content_main"><h3 class="comment_head"><?php printf($comment_count > 1 ? __('%d Comments','protean') : __('One Comment','protean'), $comment_count) ?></h3></div>
+
<ol id="commentlist">
<?php wp_list_comments('type=comment&callback=protean_comment&stye=div'); ?>
</ol>
<?php } ?>
<?php if ($ping_count>0) { ?>
- <div class="content_main"><h3 class="comment_head"><?php printf($ping_count > 1 ? __('%d Trackbacks') : __('One Trackback'), $ping_count) ?></h3></div>
+ <div class="content_main"><h3 class="comment_head"><?php printf($ping_count > 1 ? __('%d Trackbacks','protean') : __('One Trackback','protean'), $ping_count) ?></h3></div>
<ul id="pinglist">
<?php wp_list_comments('type=pings&callback=protean_ping'); ?>
</ul>
<?php } ?>
<nav class="commentnav">
<div class="next-posts"><?php previous_comments_link() ?></div>
- <div class="prev-posts"><?php next_comments_link() ?></div>
+ <div class="prev-posts fl_right"><?php next_comments_link() ?></div>
</nav>
<?php endif; ?>
@@ -39,38 +40,39 @@
<?php
$defaults =
array(
- 'comment_notes_before' => '<p class="content_main content_narrow">' . __( 'Your email address is <em>never</em> published nor shared.' ) . ( $req ? '*' : '' ) . '</p>',
+ 'comment_notes_before' => '<p class="content_main content_narrow">' . __( 'Your email address is <em>never</em> published nor shared.','protean' ) . ( $req ? '*' : '' ) . '</p>',
'comment_notes_after' => '',
- 'fields' => array(
- 'author' => '<div>
- <div class="content_main">
- <input type="text" name="author" id="author" class="box accent nospace full '
- . (($req) ? "required" : "" ) . '" value="'. esc_attr($comment_author).
- '" size="22" tabindex="1" ' . (($req) ? "aria-required='true'" : "" ) . '/>
- </div>
- <div class="content_aside"><label for="author" class="box primary fl_right">'. __('Name') . ( $req ? "*" : "" ) . '</label></div>
- </div>',
- 'email' => '<div>
- <div class="content_main"><input type="text" class="box accent nospace full '
- . ( $req ? "required email" : '' ) . '" name="email" id="email" value="'
- . esc_attr($comment_author_email) . '" size="22" tabindex="2" '. ( $req ? "aria-required='true'" : "" ) .' /></div>
- <div class="content_aside"><label for="email" class="box primary fl_right">'. __('Email') . ( $req ? "*" : "" ) .'</label></div>
- </div>',
- 'url' => '<div>
- <div class="content_main"><input type="text" class="box accent nospace full" name="url" id="url" value="'
- . esc_attr($comment_author_url) .'" size="22" tabindex="3" /></div>
- <div class="content_aside"><label for="url" class="box primary fl_right">'. __('Website') .'</label></div>
- </div>'
- ),
- 'comment_field' => '<div>
- <div class="content_main"><textarea name="comment" class="box accent nospace full required" id="comment" cols="58" rows="10" tabindex="4"></textarea></div>
- <div class="content_aside"><label for="comment" class="box primary fl_right">'. __('Comment') .' *</label></div>
- </div>'
+ 'fields' =>
+ array(
+ 'author' => '<div>
+ <div class="content_main">
+ <input type="text" name="author" id="author" class="box accent nospace full '
+ . (($req) ? "required" : "" ) . '" value="'. esc_attr($comment_author).
+ '" size="22" tabindex="1" ' . (($req) ? "aria-required='true'" : "" ) . '/>
+ </div>
+ <div class="content_aside"><label for="author" class="box primary fl_right">'. __('Name','protean') . ( $req ? "*" : "" ) . '</label></div>
+ </div>',
+ 'email' => '<div>
+ <div class="content_main"><input type="text" class="box accent nospace full '
+ . ( $req ? "required email" : '' ) . '" name="email" id="email" value="'
+ . esc_attr($comment_author_email) . '" size="22" tabindex="2" '. ( $req ? "aria-required='true'" : "" ) .' /></div>
+ <div class="content_aside"><label for="email" class="box primary fl_right">'. __('Email','protean') . ( $req ? "*" : "" ) .'</label></div>
+ </div>',
+ 'url' => '<div>
+ <div class="content_main"><input type="text" class="box accent nospace full" name="url" id="url" value="'
+ . esc_attr($comment_author_url) .'" size="22" tabindex="3" /></div>
+ <div class="content_aside"><label for="url" class="box primary fl_right">'. __('Website','protean') .'</label></div>
+ </div>'
+ ),
+ 'comment_field' => '<div>
+ <div class="content_main"><textarea name="comment" class="box accent nospace full required" id="comment" cols="58" rows="10" tabindex="4"></textarea></div>
+ <div class="content_aside"><label for="comment" class="box primary fl_right">'. __('Comment','protean') .' *</label></div>
+ </div>'
);
?>
<?php comment_form($defaults) ?>
<?php else : // comments are closed ?>
- <p class="center"><i><?php _e('Comment closed for this post.')?></i></p>
+ <p class="center"><i><?php _e('Comment closed for this post.','protean')?></i></p>
<?php endif; ?>
</footer><!-- comments -->
<hr/>
@@ -90,11 +92,11 @@
</aside>
<div class="content_main">
<?php if ($comment->comment_approved == '0') : ?>
- <p><em><?php _e('Your comment is awaiting moderation.') ?></em></p>
+ <p><em><?php _e('Your comment is awaiting moderation.','protean') ?></em></p>
<?php endif; ?>
<?php comment_text() ?>
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
- <?php edit_comment_link(__('(Edit)'),' ','') ?>
+ <?php edit_comment_link(__('(Edit)','protean'),' ','') ?>
</div>
<?php }
function protean_ping($comment, $args, $depth) {
@@ -103,19 +105,19 @@ function protean_ping($comment, $args, $depth) {
<?php $color = 'primary'; if($comment->user_id==get_the_author_meta('ID'))$color='accent';?>
<aside class="content_aside">
<a class="box <?php echo $color ?> comment_date" href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
- <?php printf(__('%1$s'), get_comment_date()) ?>
+ <?php printf(__('%1$s','protean'), get_comment_date()) ?>
</a>
</aside>
<div class="content_main">
<?php if ($comment->comment_approved == '0') : ?>
- <p><em><?php _e('Your comment is awaiting moderation.') ?></em></p>
+ <p><em><?php _e('Your comment is awaiting moderation.','protean') ?></em></p>
<?php endif; ?>
<?php if(get_comment_author_url()){ ?>
<a href="<?php echo get_comment_author_url() ?>" class="ping_source"><?php echo comment_author(); ?></a>
<?php }else{ ?>
<span class="ping_source"><?php echo comment_author(); ?></span>
<?php } ?>
<div class="ping_blurb"><?php comment_text() ?></div>
- <?php edit_comment_link(__('(Edit)'),' ','') ?>
+ <?php edit_comment_link(__('(Edit)','protean'),' ','') ?>
</div>
<?php } ?>
View
@@ -57,9 +57,9 @@
if(isset($options['primary_color']))printStyle('border-left: 2px solid #',';',$options['primary_color']);
?>
}
-td, th{
+td,th {
<?php
- if(isset($options['primary_text']))printStyle('border: 1px solid #',';',$options['primary_text']);
+ if(isset($options['accent_color']))printStyle('border: 1px solid #',';',$options['accent_color']);
?>
}
input[type=text],input[type=password],input[type=submit],input[type=button], button
View
@@ -1,13 +1,11 @@
<footer id="page_footer">
- <div id="poweredby" class="fl_left">Powered by the Protean Theme from Landau Reece.</div>
- <!-- &copy;<?php echo date("Y"); echo " "; bloginfo('name'); ?> -->
+ <div id="poweredby" class="fl_left"><?php _e('Powered by the Protean Theme from Landau Reece.','protean')?></div>
<div id="feed_link" class="fl_right">
- <a href="<?php bloginfo('rss2_url'); ?>" class="box accent"><?php _e('Entries RSS')?></a>
- <a href="<?php bloginfo('comments_rss2_url'); ?>" class="box accent"><?php _e('Comments RSS')?></a>
+ <a href="<?php bloginfo('rss2_url'); ?>" class="box accent"><?php _e('Entries RSS','protean')?></a>
+ <a href="<?php bloginfo('comments_rss2_url'); ?>" class="box accent"><?php _e('Comments RSS','protean')?></a>
</div>
</footer><!-- page_footer -->
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/protean_script.js"></script>
<?php wp_footer(); ?>
- <!-- end scripts-->
</body>
</html>
View
@@ -24,12 +24,12 @@
}
// Clean up the <head>
-function removeHeadLinks() {
+function protean_removeHeadLinks() {
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
}
-add_action('init', 'removeHeadLinks');
+add_action('init', 'protean_removeHeadLinks');
remove_action('wp_head', 'wp_generator');
if (function_exists('register_sidebar')) {
View
@@ -3,26 +3,34 @@
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
- <title>
- <?php
+ <title><?php
if (function_exists('is_tag') && is_tag()) {
- single_tag_title("Tag Archive for &quot;"); echo '&quot; - '; }
- elseif (is_archive()) {
- wp_title(''); echo ' Archive - '; }
- elseif (is_search()) {
- echo 'Search for &quot;'.esc_html($s).'&quot; - '; }
- elseif (!(is_404()) && (is_single()) || (is_page())) {
- wp_title(''); echo ' - '; }
- elseif (is_404()) {
- echo 'Not Found - '; }
+ single_tag_title(__("Tag Archive for &quot;",'protean'));
+ echo '&quot; - ';
+ }else if (is_archive()) {
+ wp_title('');
+ _e(' Archive - ','protean');
+ }else if (is_search()) {
+ _e('Search for &quot;','protean');
+ echo esc_html($s).'&quot; - ';
+ }else if (!(is_404()) && (is_single()) || (is_page())) {
+ wp_title('');
+ echo ' - ';
+ }else if (is_404()) {
+ _e('Not Found - ','protean');
+ }
+
if (is_home()) {
- bloginfo('name'); echo ' - '; bloginfo('description'); }
- else {
- bloginfo('name'); }
+ bloginfo('name'); echo ' - '; bloginfo('description');
+ }else {
+ bloginfo('name');
+ }
if ($paged>1) {
- echo ' - page '. $paged; }
- ?>
- </title>
+ _e(' - page ','protean');
+ echo $paged;
+ }
+ ?></title>
+
<?php if (is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
@@ -46,19 +54,19 @@
$idstr = 'ids='.implode(',',$postid);
} ?>
- <link rel="stylesheet" href="<?php echo home_url() ?>?action=protean_style&<?php echo $idstr ?>" type="text/css" />
+ <link rel="stylesheet" href="<?php echo home_url() ?>?action=protean_style&amp;<?php echo $idstr ?>" type="text/css" />
<?php get_template_part( 'inc/font-import') ?>
- <?php wp_head(); ?>
-
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/ie.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/css/print.css" type="text/css" media="print" />
+
+ <?php wp_head(); ?>
</head>
<?php
$options = get_option('protean_theme_options');
@@ -67,7 +75,7 @@
else $header = $options['header'];
?>
<body <?php body_class(); ?>>
- <a href="#page_main" id="skipnav"><?php _e('Skip navigation')?></a>
+ <a href="#page_main" id="skipnav"><?php _e('Skip navigation','protean')?></a>
<header id="page_header">
<?php get_template_part( 'inc/headlines/'.$header ); ?>
<?php get_search_form(); ?>
Oops, something went wrong.

0 comments on commit 632a1b0

Please sign in to comment.