Browse Source

Clean up code for coding standards

tags/8.0^2
Chris Wiegman 2 years ago
parent
commit
eb69e43555
No known key found for this signature in database GPG Key ID: 63C83F823595106A
9 changed files with 47 additions and 33 deletions
  1. +3
    -2
      404.php
  2. +16
    -16
      archive.php
  3. +1
    -0
      footer.php
  4. +1
    -1
      functions.php
  5. +1
    -0
      header.php
  6. +2
    -2
      home.php
  7. +2
    -2
      index.php
  8. +8
    -4
      page-archive.php
  9. +13
    -6
      page-developer.php

+ 3
- 2
404.php View File

@@ -34,5 +34,6 @@ get_header(); ?>
</main><!-- #main -->
</section><!-- #primary -->

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

+ 16
- 16
archive.php View File

@@ -33,16 +33,16 @@ get_header();
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' );
@@ -79,31 +79,31 @@ get_header();
</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
- 0
footer.php View File

@@ -10,6 +10,7 @@
*/

namespace CW\Theme\Templates\Footer;

?>

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


+ 1
- 1
functions.php View File

@@ -28,7 +28,7 @@ require CW_THEME_INCLUDES . 'classes/post-types/class-speaking.php';
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';


+ 1
- 0
header.php View File

@@ -12,6 +12,7 @@
*/

namespace CW\Theme\Templates\Header;

?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>


+ 2
- 2
home.php View File

@@ -44,5 +44,5 @@ get_header();
</div><!-- #primary -->

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

+ 2
- 2
index.php View File

@@ -50,5 +50,5 @@ get_header();
</div><!-- #primary -->

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

+ 8
- 4
page-archive.php View File

@@ -17,7 +17,10 @@ get_header();
<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">
@@ -74,12 +77,13 @@ get_header();
<!-- .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();

+ 13
- 6
page-developer.php View File

@@ -61,7 +61,7 @@ get_header();

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() ) ) {

@@ -128,14 +128,21 @@ get_header();
</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>
@@ -143,5 +150,5 @@ get_header();
</div><!-- #primary -->

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