-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog styles from JC #118
Blog styles from JC #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpcs scanning turned up:
🚫 7 errors
hashes-api-scanning skipped
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); | ||
|
||
if ( 'post' === get_post_type() ) : | ||
?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Line indented incorrectly; expected 4 tabs, found 3 (Generic.WhiteSpace.ScopeIndent.IncorrectExact).
@@ -0,0 +1,33 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Filenames should be all lowercase with hyphens as word separators. Expected phpcs-scan-4kewkr.php, but found phpcs-scan-4KewkR.php (WordPress.Files.FileName.NotHyphenatedLowercase).
while ( have_posts() ) : | ||
the_post(); | ||
/* Start the Loop */ | ||
while ( have_posts() ) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Line indented incorrectly; expected 0 tabs, found 4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact).
@@ -19,36 +19,49 @@ | |||
<?php | |||
if ( have_posts() ) : | |||
|
|||
if ( is_home() && ! is_front_page() ) : | |||
if ( ! is_home() && ! is_front_page() ) : | |||
?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Line indented incorrectly; expected 4 tabs, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact).
'excluded_terms' => '', | ||
'taxonomy' => 'category', | ||
'screen_reader_text' => __( 'Post navigation' ), | ||
) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Closing parenthesis of a multi-line function call must be on a line by itself (PEAR.Functions.FunctionCallSignature.CloseBracketLine).
* @author JC Palmes | ||
*/ | ||
function dctx_the_post_navigation( $args = array() ) { | ||
$args = wp_parse_args( $args, array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Only one argument is allowed per line in a multi-line function call (PEAR.Functions.FunctionCallSignature.MultipleArguments).
* @author JC Palmes | ||
*/ | ||
function dctx_the_post_navigation( $args = array() ) { | ||
$args = wp_parse_args( $args, array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Opening parenthesis of a multi-line function call must be the last content on the line (PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket).
} | ||
|
||
/* translators: used between list items, there is a space after the comma */ | ||
$tags_list = get_the_tag_list( '', esc_html__( ', ', 'dctx' ) ); | ||
if ( $tags_list ) { | ||
/* translators: the post tags */ | ||
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'dctx' ) . '</span>', $tags_list ); // WPCS: XSS OK. | ||
printf( '<span class="tags-links">' . esc_html__( ' tagged %1$s', 'dctx' ) . '.</span> ', $tags_list ); // WPCS: XSS OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Hide category and tag text for pages. | ||
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__( ', ', 'dctx' ) ); | ||
if ( $categories_list && dctx_categorized_blog() ) { | ||
/* translators: the post category */ | ||
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'dctx' ) . '</span>', $categories_list ); // WPCS: XSS OK. | ||
printf( '<span class="cat-links">' . esc_html__( ' under %1$s', 'dctx' ) . '.</span> ', $categories_list ); // WPCS: XSS OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -41,38 +41,38 @@ function dctx_posted_on() { | |||
|
|||
echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[do-not-scan]
#92