Skip to content

Commit

Permalink
Clean up code for coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisWiegman committed Mar 12, 2018
1 parent 4fff341 commit eb69e43
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 33 deletions.
5 changes: 3 additions & 2 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
</main><!-- #main -->
</section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();
32 changes: 16 additions & 16 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
single_tag_title();

elseif ( is_author() ) :
printf( __( 'Author: %s', 'chriswiegman' ), '<span class="vcard">' . get_the_author() . '</span>' );
printf( esc_html__( 'Author: %s', 'chriswiegman' ), '<span class="vcard">' . get_the_author() . '</span>' );

elseif ( is_day() ) :
printf( __( 'Day: %s', 'chriswiegman' ), '<span>' . get_the_date() . '</span>' );
printf( esc_html__( 'Day: %s', 'chriswiegman' ), '<span>' . get_the_date() . '</span>' );

elseif ( is_month() ) :
printf( __( 'Month: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'chriswiegman' ) ) . '</span>' );
printf( esc_html__( 'Month: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'chriswiegman' ) ) . '</span>' );

elseif ( is_year() ) :
printf( __( 'Year: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'chriswiegman' ) ) . '</span>' );
printf( esc_html__( 'Year: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'chriswiegman' ) ) . '</span>' );

elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
esc_html_e( 'Asides', 'chriswiegman' );
Expand Down Expand Up @@ -79,31 +79,31 @@
</h1>
</header><!-- .page-header -->

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
// Start the Loop.
while ( have_posts() ) :
the_post();

<?php
/**
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', get_post_format() );
?>
endwhile;

<?php endwhile; ?>
Template_Tags\paging_nav();

<?php Template_Tags\paging_nav(); ?>
else :

<?php else : ?>
get_template_part( 'template-parts/content', 'none' );

<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; ?>
endif;
?>

</main><!-- #main -->
</section><!-- #primary -->

<?php
get_sidebar();
get_footer();
get_sidebar();
get_footer();
1 change: 1 addition & 0 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

namespace CW\Theme\Templates\Footer;

?>

</div><!-- #content -->
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
new Post_Types\Project();
new Post_Types\Speaking();

// Use a CDN if properly defined
// Use a CDN if properly defined.
if ( defined( 'CW_USE_CDN' ) && true === CW_USE_CDN ) {

require CW_THEME_INCLUDES . 'classes/features/class-cdn.php';
Expand Down
1 change: 1 addition & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

namespace CW\Theme\Templates\Header;

?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
Expand Down
4 changes: 2 additions & 2 deletions home.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();
get_sidebar();
get_footer();
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();
get_sidebar();
get_footer();
12 changes: 8 additions & 4 deletions page-archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
Expand Down Expand Up @@ -74,12 +77,13 @@
<!-- .entry-footer -->
</article><!-- #post-## -->

<?php endwhile; // End of the loop.
<?php
endwhile; // End of the loop.
?>

</main><!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();
get_sidebar();
get_footer();
19 changes: 13 additions & 6 deletions page-developer.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

if ( has_term( 'wordpress-plugin', 'project-type', get_the_ID() ) ) {

$icon = 'wordpress';
$icon = 'WordPress';

} elseif ( has_term( 'google-chrome-extension', 'project-type', get_the_ID() ) ) {

Expand Down Expand Up @@ -128,20 +128,27 @@
</ul>
<!-- end .archive-projects-->

<p class="projects-note"><?php esc_html_e( 'Note that "archived" projects are projects I am no longer involved in for
one reason or another.', 'chriswiegman' ); ?></p>
<p class="projects-note">
<?php
esc_html_e(
'Note that "archived" projects are projects I am no longer involved in for
one reason or another.', 'chriswiegman'
);
?>
</p>

</div>

</div>

<?php } // End of the loop.
<?php
} // End of the loop.
?>
</article><!-- #post-## -->
</main>
<!-- #main -->
</div><!-- #primary -->

<?php
get_sidebar();
get_footer();
get_sidebar();
get_footer();

0 comments on commit eb69e43

Please sign in to comment.