Skip to content

Commit 2c4f3ac

Browse files
committed
Fixed Travis
1 parent a6d9e56 commit 2c4f3ac

37 files changed

+1624
-1127
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: false
22
language: php
3+
dist: precise
34
matrix:
45
fast_finish: true
56
include:
@@ -9,16 +10,17 @@ matrix:
910
- php: '5.6'
1011
- php: '7.0'
1112
- php: '7.1'
12-
env: SNIFF=1
13-
env: DEPLOY=1
13+
env:
14+
- DEPLOY=1
15+
- SNIFF=1
1416
before_script:
1517
- export PHPCS_DIR=/tmp/phpcs
1618
- export SNIFFS_DIR=/tmp/sniffs
1719
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
1820
$PHPCS_DIR; fi
1921
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
2022
$SNIFFS_DIR; fi
21-
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git
23+
- if [[ "$SNIFF" == "1" ]]; then git clone -b 7.1.4 --depth 1 https://github.com/wimg/PHPCompatibility.git
2224
$SNIFFS_DIR/PHPCompatibility; fi
2325
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
2426
$SNIFFS_DIR; fi

archive-jetpack-portfolio.php

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@
1919
<main id="main" class="site-main" role="main">
2020

2121
<?php
22-
if ( have_posts() ) : ?>
22+
if ( have_posts() ) :
23+
?>
2324

24-
<?php if ( 'mansonry' == $layout ): ?>
25+
<?php if ( 'mansonry' == $layout ) : ?>
2526
<div class="masonry-loader fixed-center">
2627
<div class="col-sm-12 text-center">
2728
<div class="spinner"></div>
2829
</div>
2930
</div>
3031
<?php endif ?>
3132

32-
<div class="<?php echo 'mansonry' == $layout ? 'masonry masonryFlyIn' : '' ?>">
33+
<div class="<?php echo 'mansonry' == $layout ? 'masonry masonryFlyIn' : ''; ?>">
3334
<?php
3435
/* Start the Loop */
35-
while ( have_posts() ) : the_post();
36+
while ( have_posts() ) :
37+
the_post();
3638
$projects_args = array(
3739
'fields' => 'names',
3840
);
@@ -46,24 +48,31 @@
4648
?>
4749

4850
<article id="post-<?php the_ID(); ?>" <?php post_class( $item_classes ); ?>>
49-
<div class="image-tile inner-title hover-reveal text-center" style="<?php echo $item_style ?>"><?php
50-
if ( has_post_thumbnail() ) { ?>
51-
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
51+
<div class="image-tile inner-title hover-reveal text-center" style="<?php echo $item_style; ?>">
52+
<?php
53+
if ( has_post_thumbnail() ) {
54+
?>
55+
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
5256
<?php
53-
if ( 'mansonry' == $layout ){
57+
if ( 'mansonry' == $layout ) {
5458
the_post_thumbnail( 'medium' );
5559
}
5660
?>
57-
<div class="title"><?php
61+
<div class="title">
62+
<?php
5863
the_title( '<h5 class="mb0">', '</h5>' );
5964
if ( ! empty( $project_types ) ) {
6065
echo '<span>' . implode( ' / ', $project_types ) . '</span>';
61-
} ?>
66+
}
67+
?>
6268
</div>
63-
</a><?php
64-
} ?>
69+
</a>
70+
<?php
71+
}
72+
?>
6573
</div>
66-
</article><!-- #post-## --><?php
74+
</article><!-- #post-## -->
75+
<?php
6776

6877
endwhile;
6978

@@ -73,7 +82,8 @@
7382

7483
get_template_part( 'template-parts/content', 'none' );
7584

76-
endif; ?>
85+
endif;
86+
?>
7787

7888
</main><!-- #main -->
7989
</div><!-- #primary -->

archive.php

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,43 @@
77
* @package Shapely
88
*/
99
get_header(); ?>
10-
<?php $layout_class = shapely_get_layout_class();?>
10+
<?php $layout_class = shapely_get_layout_class(); ?>
1111
<div class="row">
1212
<?php
1313
if ( 'sidebar-left' == $layout_class ) :
1414
get_sidebar();
1515
endif;
1616
?>
17-
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>"><?php
18-
if ( have_posts() ) :
17+
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
18+
<?php
19+
if ( have_posts() ) :
1920

20-
if ( is_home() && ! is_front_page() ) : ?>
21-
<header>
22-
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
21+
if ( is_home() && ! is_front_page() ) :
22+
?>
23+
<header>
24+
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
2325
</header>
2426

2527
<?php
26-
endif;
28+
endif;
2729

28-
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
29-
$layout_type = str_replace( '_', '-', $layout_type );
30+
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
31+
$layout_type = str_replace( '_', '-', $layout_type );
3032

31-
get_template_part( 'template-parts/layouts/blog', $layout_type );
33+
get_template_part( 'template-parts/layouts/blog', $layout_type );
3234

33-
shapely_pagination();
35+
shapely_pagination();
3436
else :
3537
get_template_part( 'template-parts/content', 'none' );
3638

37-
endif; ?>
39+
endif;
40+
?>
3841
</div><!-- #primary -->
3942
<?php
4043
if ( 'sidebar-right' == $layout_class ) :
4144
get_sidebar();
42-
endif; ?>
45+
endif;
46+
?>
4347
</div>
4448
<?php
4549
get_footer();

attachment.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@
1515
get_sidebar();
1616
endif;
1717
?>
18-
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>"><?php
19-
while ( have_posts() ) : the_post();
20-
get_template_part( 'template-parts/content', 'attachment' );
18+
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
19+
<?php
20+
while ( have_posts() ) :
21+
the_post();
22+
get_template_part( 'template-parts/content', 'attachment' );
2123

22-
// If comments are open or we have at least one comment, load up the comment template.
23-
if ( comments_open() || get_comments_number() ) :
24-
comments_template();
25-
endif;
24+
// If comments are open or we have at least one comment, load up the comment template.
25+
if ( comments_open() || get_comments_number() ) :
26+
comments_template();
27+
endif;
2628

27-
endwhile; // End of the loop. ?>
29+
endwhile; // End of the loop.
30+
?>
2831
</div><!-- #primary -->
2932
<?php
3033
if ( 'sidebar-right' == $layout_class ) :

comments.php

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This is the template that displays the area of the page that contains both the current comments
66
* and the comment form.
77
*
8-
* @link https://codex.wordpress.org/Template_Hierarchy
8+
* @link https://codex.wordpress.org/Template_Hierarchy
99
*
1010
* @package Shapely
1111
*/
@@ -21,78 +21,79 @@
2121
?>
2222

2323
<div id="comments" class="comments-area comments nolist">
24-
<?php
25-
// You can start editing here -- including this comment!
26-
if ( have_comments() ) : ?>
24+
<?php if ( have_comments() ) : ?>
2725
<h5 class="comments-title">
28-
<?php
29-
$comments_number = get_comments_number();
30-
if ( '1' === $comments_number ) {
31-
/* translators: %s: post title */
32-
echo _x( '1 COMMENT', 'comments title', 'shapely' );
33-
} else {
34-
printf(
35-
/* translators: number of comments */
36-
_nx(
37-
'%1$s COMMENT',
38-
'%1$s COMMENTS',
39-
$comments_number,
40-
'comments title',
41-
'shapely'
42-
),
43-
number_format_i18n( $comments_number )
44-
);
45-
}
46-
?>
26+
<?php
27+
$comments_number = get_comments_number();
28+
if ( '1' === $comments_number ) {
29+
/* translators: %s: post title */
30+
echo _x( '1 COMMENT', 'comments title', 'shapely' );
31+
} else {
32+
printf(
33+
/* translators: number of comments */
34+
_nx(
35+
'%1$s COMMENT',
36+
'%1$s COMMENTS',
37+
$comments_number,
38+
'comments title',
39+
'shapely'
40+
),
41+
number_format_i18n( $comments_number )
42+
);
43+
}
44+
?>
4745
</h5>
4846

49-
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
50-
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
51-
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'shapely' ); ?></h2>
52-
<div class="nav-links">
47+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
48+
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
49+
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'shapely' ); ?></h2>
50+
<div class="nav-links">
5351

54-
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'shapely' ) ); ?></div>
55-
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'shapely' ) ); ?></div>
52+
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'shapely' ) ); ?></div>
53+
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'shapely' ) ); ?></div>
5654

57-
</div><!-- .nav-links -->
58-
</nav><!-- #comment-nav-above -->
59-
<?php endif; // Check for comment navigation. ?>
55+
</div><!-- .nav-links -->
56+
</nav><!-- #comment-nav-above -->
57+
<?php endif; ?>
6058

6159
<?php add_filter( 'comment_reply_link', 'shapely_reply_link_class' ); ?>
6260
<ul class="comments-list">
6361
<?php
64-
wp_list_comments( array(
65-
'style' => 'ol',
66-
'short_ping' => true,
62+
wp_list_comments(
63+
array(
64+
'style' => 'ol',
65+
'short_ping' => true,
6766
'avatar_size' => 75,
68-
'callback' => 'shapely_cb_comment',
69-
) );
67+
'callback' => 'shapely_cb_comment',
68+
)
69+
);
7070
?>
7171
</ul><!-- .comment-list -->
7272
<?php remove_filter( 'comment_reply_link', 'shapely_reply_link_class' ); ?>
7373

7474

75-
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
76-
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
77-
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'shapely' ); ?></h2>
78-
<div class="nav-links">
75+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
76+
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
77+
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'shapely' ); ?></h2>
78+
<div class="nav-links">
7979

80-
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'shapely' ) ); ?></div>
81-
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'shapely' ) ); ?></div>
80+
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'shapely' ) ); ?></div>
81+
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'shapely' ) ); ?></div>
8282

83-
</div><!-- .nav-links -->
84-
</nav><!-- #comment-nav-below -->
85-
<?php
83+
</div><!-- .nav-links -->
84+
</nav><!-- #comment-nav-below -->
85+
<?php
8686
endif; // Check for comment navigation.
8787

8888
endif; // Check for have_comments().
8989

9090

9191
// If comments are closed and there are comments, let's leave a little note, shall we?
92-
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
92+
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
93+
?>
9394

9495
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'shapely' ); ?></p>
95-
<?php
96+
<?php
9697
endif;
9798

9899
/* comment form */

0 commit comments

Comments
 (0)