Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Blog styles from JC #118

wants to merge 1 commit into from

Conversation

eabquina
Copy link
Member

@eabquina eabquina commented Apr 20, 2020

[do-not-scan]
#92

Copy link
Collaborator

@wpugphil wpugphil left a 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

⚠️ 3 warnings


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() ) :
?>
Copy link
Collaborator

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
Copy link
Collaborator

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() ) :
Copy link
Collaborator

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() ) :
?>
Copy link
Collaborator

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' ),
) );
Copy link
Collaborator

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(
Copy link
Collaborator

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(
Copy link
Collaborator

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Using the WPCS native whitelist comments is deprecated. Please use the PHPCS native "phpcs:ignore Standard.Category.SniffName.ErrorCode" annotations instead. Found: // WPCS: XSS OK.\n (WordPress.Security.EscapeOutput.DeprecatedWhitelistCommentFound).

// 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Using the WPCS native whitelist comments is deprecated. Please use the PHPCS native "phpcs:ignore Standard.Category.SniffName.ErrorCode" annotations instead. Found: // WPCS: XSS OK.\n (WordPress.Security.EscapeOutput.DeprecatedWhitelistCommentFound).

@@ -41,38 +41,38 @@ function dctx_posted_on() {

echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Using the WPCS native whitelist comments is deprecated. Please use the PHPCS native "phpcs:ignore Standard.Category.SniffName.ErrorCode" annotations instead. Found: // WPCS: XSS OK.\n (WordPress.Security.EscapeOutput.DeprecatedWhitelistCommentFound).

@eabquina eabquina closed this Apr 20, 2020
@eabquina eabquina deleted the 92-archive-styles branch April 20, 2020 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants