Skip to content

Commit

Permalink
Update comparisons to resolve the strict comparison warnings. See Aut…
Browse files Browse the repository at this point in the history
  • Loading branch information
grantpalin authored and MarkBatchelder committed Nov 3, 2015
1 parent 4ae21cb commit 03d2d12
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'marker' ); ?></p>
<?php endif; ?>
Expand Down
4 changes: 2 additions & 2 deletions inc/custom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function marker_header_style() {

// If no custom options for text are set, let's bail
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value.
if ( HEADER_TEXTCOLOR == $header_text_color ) {
if ( HEADER_TEXTCOLOR === $header_text_color ) {
return;
}

Expand All @@ -56,7 +56,7 @@ function marker_header_style() {
<style type="text/css">
<?php
// Has the text been hidden?
if ( 'blank' == $header_text_color ) :
if ( 'blank' === $header_text_color ) :
?>
.site-title,
.site-description {
Expand Down
2 changes: 1 addition & 1 deletion inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function marker_posted_on() {
*/
function marker_entry_footer() {
// Hide category and tag text for pages.
if ( 'post' == get_post_type() ) {
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( esc_html__( ', ', 'marker' ) );
if ( $categories_list && marker_categorized_blog() ) {
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php marker_posted_on(); ?>
</div><!-- .entry-meta -->
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php marker_posted_on(); ?>
</div><!-- .entry-meta -->
Expand Down

0 comments on commit 03d2d12

Please sign in to comment.