Skip to content

Commit 11d4528

Browse files
committed
PHPCS fixes
1 parent 3293466 commit 11d4528

9 files changed

+92
-59
lines changed

.phpcs.xml.dist

+2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
<!-- Check the whole Theme, with exclusions. -->
2222
<file>.</file>
2323
<exclude-pattern>acf-json/index.php</exclude-pattern>
24+
<exclude-pattern>wp-config.sample.php</exclude-pattern>
2425
<exclude-pattern>*/inc/*</exclude-pattern>
2526
<exclude-pattern>*/vendor/*</exclude-pattern>
27+
<exclude-pattern>*/assets/dist/svg/*</exclude-pattern>
2628

2729
<!-- Include WordPress ruleset, with exclusions. -->
2830
<rule ref="WordPress">

comments.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
<?php
3131
printf(
3232
/* translators: 1: Comments count. */
33-
esc_html( _n( '%d Comment.', '%d Comments.', get_comments_number(), 'awps' ) ), absint( get_comments_number() ) );
33+
esc_html( _n( '%d Comment.', '%d Comments.', get_comments_number(), 'awps' ) ),
34+
absint( get_comments_number() )
35+
);
3436
?>
3537
</h2><!-- .comments-title -->
3638

@@ -48,10 +50,12 @@
4850

4951
<ol class="comment-list">
5052
<?php
51-
wp_list_comments( array(
52-
'style' => 'ol',
53-
'short_ping' => true,
54-
) );
53+
wp_list_comments(
54+
array(
55+
'style' => 'ol',
56+
'short_ping' => true,
57+
)
58+
);
5559
?>
5660
</ol><!-- .comment-list -->
5761

footer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
<div class="site-info">
2525
<?php
26-
printf( '<a %s href="%s">%s</a>',
26+
printf(
27+
'<a %s href="%s">%s</a>',
2728
is_customize_preview() ? 'id="awps-footer-copy-control"' : '',
2829
esc_url( __( 'https://github.com/Alecaddd/awps', 'awps' ) ),
2930
esc_html( Awps\Api\Customizer::text( 'awps_footer_copy_text' ) )

header.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<div class="site-branding">
4040
<h1 class="site-title">
4141
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
42-
<?php svg('wordpress'); ?>
42+
<?php svg( 'WordPress' ); ?>
4343
<?php bloginfo( 'name' ); ?>
4444
</a>
4545
</h1>
@@ -60,11 +60,13 @@
6060
<nav id="site-navigation" class="main-navigation" role="navigation">
6161
<?php
6262
if ( has_nav_menu( 'primary' ) ) :
63-
wp_nav_menu( array(
64-
'theme_location' => 'primary',
65-
'menu_id' => 'primary-menu',
66-
'walker' => new Awps\Core\WalkerNav(),
67-
) );
63+
wp_nav_menu(
64+
array(
65+
'theme_location' => 'primary',
66+
'menu_id' => 'primary-menu',
67+
'walker' => new Awps\Core\WalkerNav(),
68+
)
69+
);
6870
endif;
6971
?>
7072
</nav>

search.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
<?php
2828
printf(
2929
/* translators: %s: Search Term. */
30-
esc_html__( 'Search Results for: %s', 'awps' ), '<span>' . get_search_query() . '</span>'
30+
esc_html__( 'Search Results for: %s', 'awps' ),
31+
'<span>' . get_search_query() . '</span>'
3132
);
3233
?>
3334
</h1>

views/content-none.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@
2222
<p>
2323
<?php
2424
printf(
25-
/* translators: 1: link. */
26-
wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'awps' ), array(
27-
'a' => array(
28-
'href' => array(),
29-
),
30-
) ), esc_url( admin_url( 'post-new.php' ) )
25+
wp_kses(
26+
/* translators: 1: link. */
27+
__( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'awps' ),
28+
array(
29+
'a' => array(
30+
'href' => array(),
31+
),
32+
)
33+
),
34+
esc_url( admin_url( 'post-new.php' ) )
3135
);
3236
?>
3337
</p>

views/content-page.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
<?php
1919
the_content();
2020

21-
wp_link_pages( array(
22-
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'awps' ),
23-
'after' => '</div>',
24-
) );
21+
wp_link_pages(
22+
array(
23+
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'awps' ),
24+
'after' => '</div>',
25+
)
26+
);
2527
?>
2628
</div><!-- .entry-content -->
2729

views/content-search.php

+21-12
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,28 @@
2323

2424
<div class="entry-content">
2525
<?php
26-
the_content( sprintf(
27-
/* translators: %s: Name of current post. */
28-
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'awps' ), array(
29-
'span' => array(
30-
'class' => array(),
31-
),
32-
) ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) ) );
26+
the_content(
27+
sprintf(
28+
wp_kses(
29+
/* translators: %s: Name of current post. */
30+
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'awps' ),
31+
array(
32+
'span' => array(
33+
'class' => array(),
34+
),
35+
)
36+
),
37+
the_title( '<span class="screen-reader-text">"', '"</span>', false )
38+
)
39+
);
3340

34-
wp_link_pages( array(
35-
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'awps' ),
36-
'after' => '</div>',
37-
) );
38-
?>
41+
wp_link_pages(
42+
array(
43+
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'awps' ),
44+
'after' => '</div>',
45+
)
46+
);
47+
?>
3948
</div><!-- .entry-content -->
4049

4150
<footer class="entry-footer">

views/content.php

+32-24
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,47 @@
1212
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
1313
<header class="entry-header">
1414
<?php
15-
if ( is_single() ) :
16-
the_title( '<h1 class="entry-title">', '</h1>' );
17-
else :
18-
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
19-
endif;
15+
if ( is_single() ) :
16+
the_title( '<h1 class="entry-title">', '</h1>' );
17+
else :
18+
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
19+
endif;
2020

21-
if ( 'post' === get_post_type() ) :
21+
if ( 'post' === get_post_type() ) :
2222
?>
23-
<div class="entry-meta">
24-
<?php
25-
Awps\Core\Tags::posted_on();
26-
?>
27-
</div><!-- .entry-meta -->
23+
<div class="entry-meta">
24+
<?php
25+
Awps\Core\Tags::posted_on();
26+
?>
27+
</div><!-- .entry-meta -->
2828
<?php
29-
endif;
29+
endif;
3030
?>
3131
</header><!-- .entry-header -->
3232

3333
<div class="entry-content">
3434
<?php
35-
the_content( sprintf(
36-
/* translators: %s: Name of current post. */
37-
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'awps' ), array(
38-
'span' => array(
39-
'class' => array(),
40-
),
41-
) ),
42-
the_title( '<span class="screen-reader-text">"', '"</span>', false ) ) );
35+
the_content(
36+
sprintf(
37+
wp_kses(
38+
/* translators: %s: Name of current post. */
39+
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'awps' ),
40+
array(
41+
'span' => array(
42+
'class' => array(),
43+
),
44+
)
45+
),
46+
the_title( '<span class="screen-reader-text">"', '"</span>', false )
47+
)
48+
);
4349

44-
wp_link_pages( array(
45-
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'awps' ),
46-
'after' => '</div>',
47-
) );
50+
wp_link_pages(
51+
array(
52+
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'awps' ),
53+
'after' => '</div>',
54+
)
55+
);
4856
?>
4957
</div><!-- .entry-content -->
5058

0 commit comments

Comments
 (0)