Skip to content

Commit

Permalink
* Added code block termination comments
Browse files Browse the repository at this point in the history
 * Refactored code formatting
 * Refactored to be more i18n compatible
  • Loading branch information
Cais committed Mar 14, 2013
1 parent 762a963 commit 2b580af
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 24 deletions.
3 changes: 2 additions & 1 deletion sidebar.php
Expand Up @@ -10,8 +10,9 @@
* @link http://wordpress.org/extend/themes/nona
*
* @author Edward Caissie <edward.caissie@gmail.com>
* @copyright Copyright (c) 2009-2012, Edward Caissie
* @copyright Copyright (c) 2009-2013, Edward Caissie
*/ ?>

<div id="sidebar">
<div id="sidebar-inside">
<div id="sidebar-1">
Expand Down
97 changes: 74 additions & 23 deletions single.php
Expand Up @@ -10,54 +10,105 @@
* @link http://wordpress.org/extend/themes/nona
*
* @author Edward Caissie <edward.caissie@gmail.com>
* @copyright Copyright (c) 2009-2012, Edward Caissie
* @copyright Copyright (c) 2009-2013, Edward Caissie
*
* @version 1.6
* @date July 10, 2012
* Updated post to post navigation
*
* @version 1.8
* @date March 14, 2013
* Added code block termination comments
* Refactored code formatting
* Refactored to be more i18n compatible
*/

get_header(); ?>

<div id="main-blog">

<div id="before-content"></div>

<div id="content">

<?php
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'nona' ); ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="post-details">
<?php printf( __( 'Posted by %1$s on %2$s ', 'nona' ), get_the_author_meta( 'display_name' ), get_the_time( get_option( 'date_format' ) ) ); ?> | <a class="rss" href="<?php bloginfo( 'rss2_url' ); ?>" title="<?php _e( 'Subscribe to my feed', 'nona' ); ?>"><?php _e( 'Subscribe', 'nona' ); ?></a>
<?php
edit_post_link( __( 'Edit', 'nona' ), __( ' | ', 'nona' ), __( '', 'nona' ) );
_e( '<br />in ', 'nona' ); the_category( ', ' ); ?><br />
<?php the_tags( __( 'as ', 'nona' ), ', ', '' ); ?><br />
</div><!-- .post-details -->
<?php the_content( __( 'Read more ...', 'nona' ) ); ?>
<div class="clear"></div><!-- For inserted media at the end of the post -->
<?php wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages: ', 'nona') . '</strong>', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?>
<div id="author_link">
<?php printf( __( '... other posts by %1$s', 'nona' ), '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a>' ); ?>
</div>
</div><!-- .post #post-ID -->
if ( have_posts() ) :
while ( have_posts() ) :
the_post(); ?>

<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">

<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'nona' ); ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h2>

<div class="post-details">
<?php
printf( __( 'Posted by %1$s on %2$s', 'nona' ),
get_the_author_meta( 'display_name' ),
get_the_time( get_option( 'date_format' ) )
);

edit_post_link( __( 'Edit', 'nona' ), __( ' | ', 'nona' ), __( '', 'nona' ) );

printf( __( '<div class="nona-categories-list">in %1$s</div>', 'nona' ),
get_the_category_list( ', ' )
);
the_tags( __( 'as ', 'nona' ), ', ', '' ); ?>

</div><!-- .post-details -->

<?php the_content( __( 'Read more ...', 'nona' ) ); ?>

<div class="clear"></div><!-- For inserted media at the end of the post -->

<?php wp_link_pages( array( 'before' => '<p><strong>' . __( 'Pages: ', 'nona') . '</strong>', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?>

<div id="author-link">
<?php
printf( __( '... other posts by %1$s', 'nona' ),
'<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a>'
); ?>
</div><!-- #author-link -->

</div><!-- .post #post-ID -->

<?php
comments_template();
endwhile; ?>
endwhile; ?>

<div id="nav-global" class="navigation">
<div class="left">
<?php next_posts_link( __( '&laquo; Older posts', 'nona' ) ); ?>
</div>
<div class="right">
<?php previous_posts_link( __( 'Newer posts &raquo;', 'nona' ) ); ?>
</div>
</div>
</div><!-- navigation -->

<div class="clear"></div>

<?php else : ?>
<h2><?php printf( __( 'Search Results for: %s', 'nona' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h2>

<h2>
<?php
printf( __( 'Search Results for: %s', 'nona' ),
'<span>' . esc_html( get_search_query() ) . '</span>'
); ?>
</h2>
<p><?php _e( 'Sorry, but you are looking for something that is not here.', 'nona' ); ?></p>
<?php get_search_form();

<?php
get_search_form();

endif; ?>

</div><!-- #content -->

<div id="after-content"></div>

</div><!-- #main-blog -->
<?php get_sidebar();

<?php
get_sidebar();
get_footer();

0 comments on commit 2b580af

Please sign in to comment.