Skip to content

Commit abf1b5b

Browse files
Fix PHP and Js linting issues
1 parent 41ce301 commit abf1b5b

File tree

6 files changed

+38
-28
lines changed

6 files changed

+38
-28
lines changed

assets/src/js/admin/customizer.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,40 @@
44
* Theme Customizer enhancements for a better user experience.
55
*
66
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
7+
* @param {Object} $ jQuery object.
78
*/
89

9-
(($) => {
10+
( ( $ ) => {
1011
// Site title and description.
11-
wp.customize('blogname', (value) => {
12-
value.bind(function (to) {
13-
$('.site-title a').text(to);
14-
});
15-
});
12+
wp.customize( 'blogname', ( value ) => {
13+
value.bind( function( to ) {
14+
$( '.site-title a' ).text( to );
15+
} );
16+
} );
1617

17-
wp.customize('blogdescription', (value) => {
18-
value.bind(function (to) {
19-
$('.site-description').text(to);
20-
});
21-
});
18+
wp.customize( 'blogdescription', ( value ) => {
19+
value.bind( function( to ) {
20+
$( '.site-description' ).text( to );
21+
} );
22+
} );
2223

2324
// Header text color.
24-
wp.customize('header_textcolor', (value) => {
25-
value.bind(function (to) {
26-
if ('blank' === to) {
27-
$('.site-title, .site-description').css({
25+
wp.customize( 'header_textcolor', ( value ) => {
26+
value.bind( function( to ) {
27+
if ( 'blank' === to ) {
28+
$( '.site-title, .site-description' ).css( {
2829
clip: 'rect(1px, 1px, 1px, 1px)',
2930
position: 'absolute',
30-
});
31+
} );
3132
} else {
32-
$('.site-title, .site-description').css({
33+
$( '.site-title, .site-description' ).css( {
3334
clip: 'auto',
3435
position: 'relative',
35-
});
36-
$('.site-title a, .site-description').css({
36+
} );
37+
$( '.site-title a, .site-description' ).css( {
3738
color: to,
38-
});
39+
} );
3940
}
40-
});
41-
});
42-
} )( jQuery ); // eslint-disable-line -- no-undef
41+
} );
42+
} );
43+
} )( jQuery ); // eslint-disable-line no-undef

assets/src/js/components/fonts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ const WebFont = {
2626
loadWebFonts() {
2727
const WebFontConfig = {
2828
google: {
29-
families: ['Open Sans:300,400,700', 'Roboto:500'],
29+
families: [ 'Open Sans:300,400,700', 'Roboto:500' ],
3030
},
3131
};
3232

33-
WebFontLoader.load(WebFontConfig);
33+
WebFontLoader.load( WebFontConfig );
3434
},
3535
};
3636

assets/src/js/home.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
* Home scripts.
33
*/
44

5+
/**
6+
* Internal dependencies
7+
*/
58
import '../sass/home.scss';

assets/src/js/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* Main scripts, loaded on all pages.
33
*/
44

5+
/**
6+
* Internal dependencies
7+
*/
58
import '../sass/main.scss';
69
import { common as BlankThemeCommons } from './components';
710

assets/src/js/single.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
* Single page scripts.
33
*/
44

5+
/**
6+
* Internal dependencies
7+
*/
58
import '../sass/single.scss';

comments.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<h2 class="comments-title">
3030
<?php
3131
$blank_theme_comments_number = get_comments_number();
32-
if ( 1 === $comments_number ) {
32+
if ( 1 === $blank_theme_comments_number ) {
3333
printf(
3434
/* translators: %s: post title */
3535
esc_html_x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'blank-theme' ),
@@ -42,12 +42,12 @@
4242
_nx(
4343
'%1$s thought on &ldquo;%2$s&rdquo;',
4444
'%1$s thoughts on &ldquo;%2$s&rdquo;',
45-
$comments_number,
45+
$blank_theme_comments_number,
4646
'comments title',
4747
'blank-theme'
4848
)
4949
),
50-
esc_html( number_format_i18n( $comments_number ) ),
50+
esc_html( number_format_i18n( $blank_theme_comments_number ) ),
5151
'<span>' . esc_html( get_the_title() ) . '</span>'
5252
);
5353
}

0 commit comments

Comments
 (0)