Skip to content

Commit

Permalink
Use Pressbooks coding standards (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Jul 24, 2018
1 parent 6cfac83 commit 743e20f
Show file tree
Hide file tree
Showing 27 changed files with 650 additions and 449 deletions.
9 changes: 6 additions & 3 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<main id="main" class="site-main">

<?php
if ( have_posts() ) : ?>
if ( have_posts() ) :
?>

<header class="page-header">
<?php
Expand All @@ -24,7 +25,8 @@

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

/*
* Include the Post-Format-specific template for the content.
Expand All @@ -41,7 +43,8 @@

get_template_part( 'template-parts/content', 'none' );

endif; ?>
endif;
?>

</main><!-- #main -->
</div><!-- #primary -->
Expand Down
21 changes: 13 additions & 8 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
if ( have_comments() ) :
?>
<h2 class="comments-title">
<?php
$comment_count = get_comments_number();
Expand All @@ -49,19 +50,23 @@

<ol class="comment-list">
<?php
wp_list_comments( [
'style' => 'ol',
'short_ping' => true,
] );
wp_list_comments(
[
'style' => 'ol',
'short_ping' => true,
]
);
?>
</ol><!-- .comment-list -->

<?php the_comments_navigation();
<?php
the_comments_navigation();

// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() ) : ?>
if ( ! comments_open() ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'pressbooks-aldine' ); ?></p>
<?php
<?php
endif;

endif; // Check for have_comments().
Expand Down
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"issues": "https://github.com/pressbooks/pressbooks-aldine/issues",
"forum": "https://discourse.pressbooks.org/"
},
"config": {
"platform": {
"php": "7.0.27"
}
},
"require": {
"php": ">=7",
"composer/installers": "~1.0",
Expand All @@ -25,8 +30,7 @@
"spatie/color": "^1.1"
},
"require-dev": {
"humanmade/coding-standards": "^0.2.1",
"squizlabs/php_codesniffer": "^2.8.0",
"pressbooks/coding-standards": "dev-master",
"wpreadme2markdown/wp2md": "^3.0"
},
"scripts": {
Expand Down
Loading

0 comments on commit 743e20f

Please sign in to comment.