@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | - if ( isset( $GLOBALS['comment_depth'] ) ) { |
|
3 | - $depth = intval( $GLOBALS['comment_depth'] ); |
|
2 | + if (isset($GLOBALS['comment_depth'])) { |
|
3 | + $depth = intval($GLOBALS['comment_depth']); |
|
4 | 4 | } else { |
5 | 5 | $depth = 1; |
6 | 6 | } |
7 | 7 | |
8 | - $max_depth = intval( get_option( 'thread_comments_depth' ) ); |
|
8 | + $max_depth = intval(get_option('thread_comments_depth')); |
|
9 | 9 | ?> |
10 | 10 | |
11 | 11 | <?php echo get_avatar($comment, '64'); ?> |
12 | 12 | <div class="media-body"> |
13 | 13 | <h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4> |
14 | - <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"><?php printf(__('%1$s on %2$s', 'lsx'), get_comment_date(), get_comment_time()); ?></a></time> |
|
14 | + <time datetime="<?php echo comment_date('c'); ?>"><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"><?php printf(__('%1$s on %2$s', 'lsx'), get_comment_date(), get_comment_time()); ?></a></time> |
|
15 | 15 | <?php edit_comment_link(__('(Edit)', 'lsx'), '', ''); ?> |
16 | 16 | |
17 | 17 | <?php if ($comment->comment_approved == '0') : ?> |
@@ -21,4 +21,4 @@ discard block |
||
21 | 21 | <?php endif; ?> |
22 | 22 | |
23 | 23 | <?php comment_text(); ?> |
24 | -<?php comment_reply_link( array( 'depth' => $depth, 'max_depth' => $max_depth ) ); |
|
25 | 24 | \ No newline at end of file |
25 | +<?php comment_reply_link(array('depth' => $depth, 'max_depth' => $max_depth)); |
|
26 | 26 | \ No newline at end of file |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php lsx_content_top(); ?> |
19 | 19 | |
20 | - <?php while ( have_posts() ) : the_post(); ?> |
|
20 | + <?php while (have_posts()) : the_post(); ?> |
|
21 | 21 | |
22 | - <?php get_template_part( 'content', get_post_type() ); ?> |
|
22 | + <?php get_template_part('content', get_post_type()); ?> |
|
23 | 23 | |
24 | 24 | <?php endwhile; // end of the loop. ?> |
25 | 25 | |
@@ -35,6 +35,6 @@ discard block |
||
35 | 35 | <?php lsx_content_wrap_after(); ?> |
36 | 36 | |
37 | 37 | <?php get_sidebar(); ?> |
38 | -<?php get_sidebar( 'alt' ); ?> |
|
38 | +<?php get_sidebar('alt'); ?> |
|
39 | 39 | |
40 | 40 | <?php get_footer(); |
41 | 41 | \ No newline at end of file |
@@ -7,11 +7,11 @@ |
||
7 | 7 | |
8 | 8 | |
9 | 9 | //This is to help the customizer function better |
10 | -$style=''; |
|
11 | -if(is_customize_preview()){ |
|
12 | - $search_form = get_theme_mod( 'lsx_header_search', 0 ); |
|
13 | - if(!$search_form){ |
|
14 | - $style='style="display:none;"'; |
|
10 | +$style = ''; |
|
11 | +if (is_customize_preview()) { |
|
12 | + $search_form = get_theme_mod('lsx_header_search', 0); |
|
13 | + if ( ! $search_form) { |
|
14 | + $style = 'style="display:none;"'; |
|
15 | 15 | } |
16 | 16 | } |
17 | 17 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @package lsx |
8 | 8 | */ |
9 | 9 | ?> |
10 | -<?php if ( !is_singular('landing-page') ) { ?> |
|
10 | +<?php if ( ! is_singular('landing-page')) { ?> |
|
11 | 11 | |
12 | 12 | </div><!-- .content --> |
13 | 13 | </div><!-- wrap --> |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | <div class="footer-menu"> |
22 | 22 | <?php |
23 | 23 | |
24 | - if(!is_user_logged_in()){ |
|
25 | - if(has_nav_menu('footer-menu')){ |
|
24 | + if ( ! is_user_logged_in()) { |
|
25 | + if (has_nav_menu('footer-menu')) { |
|
26 | 26 | wp_nav_menu(array('theme_location' => 'footer-menu')); |
27 | 27 | } |
28 | - }else{ |
|
29 | - if(has_nav_menu('footer_logged_in')){ |
|
28 | + } else { |
|
29 | + if (has_nav_menu('footer_logged_in')) { |
|
30 | 30 | wp_nav_menu(array('theme_location' => 'footer_logged_in')); |
31 | 31 | } |
32 | 32 | } |
@@ -41,26 +41,26 @@ discard block |
||
41 | 41 | |
42 | 42 | <?php lsx_footer_top(); ?> |
43 | 43 | |
44 | - <p class="credit <?php if ( has_nav_menu( 'social' ) || has_nav_menu( 'footer' ) ) { ?>credit-float<?php } ?>"><?php printf( __( '© %1$s %2$s All Rights Reserved.', 'lsx' ), date_i18n( 'Y' ), get_bloginfo( 'name' ) ); ?></p> |
|
45 | - <?php if ( has_nav_menu( 'social' ) ) { ?> |
|
44 | + <p class="credit <?php if (has_nav_menu('social') || has_nav_menu('footer')) { ?>credit-float<?php } ?>"><?php printf(__('© %1$s %2$s All Rights Reserved.', 'lsx'), date_i18n('Y'), get_bloginfo('name')); ?></p> |
|
45 | + <?php if (has_nav_menu('social')) { ?> |
|
46 | 46 | <nav id="social-navigation" class="social-navigation"> |
47 | 47 | <?php |
48 | 48 | // Social links navigation menu. |
49 | - wp_nav_menu( array( |
|
49 | + wp_nav_menu(array( |
|
50 | 50 | 'theme_location' => 'social', |
51 | 51 | 'depth' => 1, |
52 | - ) ); |
|
52 | + )); |
|
53 | 53 | ?> |
54 | 54 | </nav><!-- .social-navigation --> |
55 | 55 | <?php } ?> |
56 | - <?php if ( has_nav_menu( 'footer' ) ) { ?> |
|
56 | + <?php if (has_nav_menu('footer')) { ?> |
|
57 | 57 | <nav id="footer-navigation" class="footer-navigation"> |
58 | 58 | <?php |
59 | 59 | // Footer links navigation menu. |
60 | - wp_nav_menu( array( |
|
60 | + wp_nav_menu(array( |
|
61 | 61 | 'theme_location' => 'footer', |
62 | 62 | 'depth' => 1, |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | ?> |
65 | 65 | </nav><!-- .footer-navigation --> |
66 | 66 | <?php } ?> |
@@ -87,15 +87,15 @@ discard block |
||
87 | 87 | |
88 | 88 | <?php lsx_footer_top(); ?> |
89 | 89 | |
90 | - <p class="credit <?php if ( has_nav_menu( 'social' ) ) { ?>credit-float<?php } ?>"><?php printf( __( '© %1$s %2$s All Rights Reserved.', 'lsx' ), date_i18n( 'Y' ), get_bloginfo( 'name' ) ); ?></p> |
|
91 | - <?php if ( has_nav_menu( 'social' ) ) { ?> |
|
90 | + <p class="credit <?php if (has_nav_menu('social')) { ?>credit-float<?php } ?>"><?php printf(__('© %1$s %2$s All Rights Reserved.', 'lsx'), date_i18n('Y'), get_bloginfo('name')); ?></p> |
|
91 | + <?php if (has_nav_menu('social')) { ?> |
|
92 | 92 | <nav id="social-navigation" class="social-navigation" role="navigation"> |
93 | 93 | <?php |
94 | 94 | // Social links navigation menu. |
95 | - wp_nav_menu( array( |
|
95 | + wp_nav_menu(array( |
|
96 | 96 | 'theme_location' => 'social', |
97 | 97 | 'depth' => 1, |
98 | - ) ); |
|
98 | + )); |
|
99 | 99 | ?> |
100 | 100 | </nav><!-- .social-navigation --> |
101 | 101 | <?php } ?> |
@@ -25,7 +25,7 @@ |
||
25 | 25 | if(has_nav_menu('footer-menu')){ |
26 | 26 | wp_nav_menu(array('theme_location' => 'footer-menu')); |
27 | 27 | } |
28 | - }else{ |
|
28 | + } else{ |
|
29 | 29 | if(has_nav_menu('footer_logged_in')){ |
30 | 30 | wp_nav_menu(array('theme_location' => 'footer_logged_in')); |
31 | 31 | } |
@@ -18,17 +18,17 @@ discard block |
||
18 | 18 | <div class="col-sm-12"> |
19 | 19 | <div class="entry-content"> |
20 | 20 | |
21 | - <?php if ( ! is_singular() ) { |
|
21 | + <?php if ( ! is_singular()) { |
|
22 | 22 | the_excerpt(); |
23 | 23 | } else { |
24 | 24 | the_content(); |
25 | 25 | |
26 | - wp_link_pages( array( |
|
26 | + wp_link_pages(array( |
|
27 | 27 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
28 | 28 | 'after' => '</div></div>', |
29 | 29 | 'link_before' => '<span>', |
30 | 30 | 'link_after' => '</span>' |
31 | - ) ); |
|
31 | + )); |
|
32 | 32 | } ?> |
33 | 33 | |
34 | 34 | <?php lsx_portfolio_gallery(); ?> |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | <?php lsx_post_nav(); ?> |
37 | 37 | |
38 | 38 | <?php |
39 | - if ( function_exists( 'sharing_display' ) ) { |
|
40 | - sharing_display( '', true ); |
|
39 | + if (function_exists('sharing_display')) { |
|
40 | + sharing_display('', true); |
|
41 | 41 | } |
42 | 42 | |
43 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
43 | + if (class_exists('Jetpack_Likes')) { |
|
44 | 44 | $custom_likes = new Jetpack_Likes; |
45 | - echo $custom_likes->post_likes( '' ); |
|
45 | + echo $custom_likes->post_likes(''); |
|
46 | 46 | } |
47 | 47 | ?> |
48 | 48 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | </div> |
54 | 54 | </div> |
55 | 55 | |
56 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
56 | + <?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
57 | 57 | |
58 | 58 | <?php lsx_entry_bottom(); ?> |
59 | 59 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | </nav> |
44 | 44 | <?php endif; ?> |
45 | 45 | |
46 | -<?php if (!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
46 | +<?php if ( ! comments_open() && ! is_page() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
47 | 47 | <div class="alert alert-warning"> |
48 | 48 | <?php _e('Comments are closed.', 'lsx'); ?> |
49 | 49 | </div> |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | <?php endif; ?> |
56 | 56 | |
57 | -<?php if (!have_comments() && !comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
57 | +<?php if ( ! have_comments() && ! comments_open() && ! is_page() && post_type_supports(get_post_type(), 'comments')) : ?> |
|
58 | 58 | <section id="comments"> |
59 | 59 | <div class="alert alert-warning"> |
60 | 60 | <?php _e('Comments are closed.', 'lsx'); ?> |
@@ -67,24 +67,24 @@ discard block |
||
67 | 67 | |
68 | 68 | <?php |
69 | 69 | $commenter = wp_get_current_commenter(); |
70 | - $req = get_option( 'require_name_email' ); |
|
71 | - $aria_req = ( $req ? " aria-required='true'" : '' ); |
|
72 | - $html_req = ( $req ? " required='required'" : '' ); |
|
70 | + $req = get_option('require_name_email'); |
|
71 | + $aria_req = ($req ? " aria-required='true'" : ''); |
|
72 | + $html_req = ($req ? " required='required'" : ''); |
|
73 | 73 | |
74 | 74 | $comment_form_args = array( |
75 | - 'comment_field' => '<p class="comment-form-comment"><textarea placeholder="'. __( 'Comment', 'lsx' ) .'" id="comment" class="form-control" name="comment" cols="45" rows="8"'. $aria_req . $html_req .'></textarea></p>', |
|
75 | + 'comment_field' => '<p class="comment-form-comment"><textarea placeholder="' . __('Comment', 'lsx') . '" id="comment" class="form-control" name="comment" cols="45" rows="8"' . $aria_req . $html_req . '></textarea></p>', |
|
76 | 76 | |
77 | 77 | 'fields' => array( |
78 | - 'author' => '<p class="comment-form-author"><label for="author">'. __( 'Name', 'lsx' ) .'</label> ' . |
|
79 | - ( $req ? '<span class="required">*</span>' : '' ) . |
|
80 | - '<input class="form-control" placeholder="'. __( 'Name', 'lsx' ) .'" id="author" name="author" type="text" value="'. esc_attr( $commenter['comment_author'] ) .'" size="30"'. $aria_req . $html_req .'></p>', |
|
78 | + 'author' => '<p class="comment-form-author"><label for="author">' . __('Name', 'lsx') . '</label> ' . |
|
79 | + ($req ? '<span class="required">*</span>' : '') . |
|
80 | + '<input class="form-control" placeholder="' . __('Name', 'lsx') . '" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . $html_req . '></p>', |
|
81 | 81 | |
82 | - 'email' => '<p class="comment-form-email"><label for="email">'. __( 'Email', 'lsx' ) .'</label> ' . |
|
83 | - ( $req ? '<span class="required">*</span>' : '' ) . |
|
84 | - '<input class="form-control" placeholder="'. __( 'Email', 'lsx' ) .'" id="email" name="email" type="text" value="'. esc_attr( $commenter['comment_author_email'] ) .'" size="30"' . $aria_req . $html_req . '></p>', |
|
82 | + 'email' => '<p class="comment-form-email"><label for="email">' . __('Email', 'lsx') . '</label> ' . |
|
83 | + ($req ? '<span class="required">*</span>' : '') . |
|
84 | + '<input class="form-control" placeholder="' . __('Email', 'lsx') . '" id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . $html_req . '></p>', |
|
85 | 85 | |
86 | - 'url' => '<p class="comment-form-url"><label for="url">'. __( 'Website', 'lsx' ) .'</label>' . |
|
87 | - '<input class="form-control" placeholder="'. __( 'Website', 'lsx' ) .'" id="url" name="url" type="text" value="'. esc_attr( $commenter['comment_author_url'] ) .'" size="30"></p>' |
|
86 | + 'url' => '<p class="comment-form-url"><label for="url">' . __('Website', 'lsx') . '</label>' . |
|
87 | + '<input class="form-control" placeholder="' . __('Website', 'lsx') . '" id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30"></p>' |
|
88 | 88 | ) |
89 | 89 | ); |
90 | 90 | ?> |
@@ -16,15 +16,15 @@ |
||
16 | 16 | <?php |
17 | 17 | the_content(); |
18 | 18 | |
19 | - wp_link_pages( array( |
|
19 | + wp_link_pages(array( |
|
20 | 20 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
21 | 21 | 'after' => '</div></div>', |
22 | 22 | 'link_before' => '<span>', |
23 | 23 | 'link_after' => '</span>' |
24 | - ) ); |
|
24 | + )); |
|
25 | 25 | ?> |
26 | 26 | </div><!-- .entry-content --> |
27 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
27 | + <?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
28 | 28 | |
29 | 29 | <?php lsx_entry_bottom(); ?> |
30 | 30 |
@@ -31,17 +31,17 @@ discard block |
||
31 | 31 | |
32 | 32 | <div class="entry-meta"> |
33 | 33 | <?php |
34 | - $metadata = wp_get_attachment_metadata(); |
|
35 | - printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx' ), |
|
36 | - esc_attr( get_the_date( 'c' ) ), |
|
37 | - esc_html( get_the_date() ), |
|
38 | - wp_get_attachment_url(), |
|
39 | - $metadata['width'], |
|
40 | - $metadata['height'], |
|
41 | - get_permalink( $post->post_parent ), |
|
42 | - get_the_title( $post->post_parent ) |
|
43 | - ); |
|
44 | - ?> |
|
34 | + $metadata = wp_get_attachment_metadata(); |
|
35 | + printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx' ), |
|
36 | + esc_attr( get_the_date( 'c' ) ), |
|
37 | + esc_html( get_the_date() ), |
|
38 | + wp_get_attachment_url(), |
|
39 | + $metadata['width'], |
|
40 | + $metadata['height'], |
|
41 | + get_permalink( $post->post_parent ), |
|
42 | + get_the_title( $post->post_parent ) |
|
43 | + ); |
|
44 | + ?> |
|
45 | 45 | <?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
46 | 46 | </div><!-- .entry-meta --> |
47 | 47 | |
@@ -56,34 +56,34 @@ discard block |
||
56 | 56 | <div class="entry-attachment"> |
57 | 57 | <div class="attachment"> |
58 | 58 | <?php |
59 | - /** |
|
60 | - * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, |
|
61 | - * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file |
|
62 | - */ |
|
63 | - $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
|
64 | - foreach ( $attachments as $k => $attachment ) { |
|
65 | - if ( $attachment->ID == $post->ID ) |
|
66 | - break; |
|
67 | - } |
|
68 | - $k++; |
|
69 | - // If there is more than 1 attachment in a gallery |
|
70 | - if ( count( $attachments ) > 1 ) { |
|
71 | - if ( isset( $attachments[ $k ] ) ) |
|
72 | - // get the URL of the next image attachment |
|
73 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
74 | - else |
|
75 | - // or get the URL of the first image attachment |
|
76 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
77 | - } else { |
|
78 | - // or, if there's only 1 image, get the URL of the image |
|
79 | - $next_attachment_url = wp_get_attachment_url(); |
|
80 | - } |
|
81 | - ?> |
|
59 | + /** |
|
60 | + * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, |
|
61 | + * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file |
|
62 | + */ |
|
63 | + $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
|
64 | + foreach ( $attachments as $k => $attachment ) { |
|
65 | + if ( $attachment->ID == $post->ID ) |
|
66 | + break; |
|
67 | + } |
|
68 | + $k++; |
|
69 | + // If there is more than 1 attachment in a gallery |
|
70 | + if ( count( $attachments ) > 1 ) { |
|
71 | + if ( isset( $attachments[ $k ] ) ) |
|
72 | + // get the URL of the next image attachment |
|
73 | + $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
74 | + else |
|
75 | + // or get the URL of the first image attachment |
|
76 | + $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
77 | + } else { |
|
78 | + // or, if there's only 1 image, get the URL of the image |
|
79 | + $next_attachment_url = wp_get_attachment_url(); |
|
80 | + } |
|
81 | + ?> |
|
82 | 82 | |
83 | 83 | <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
84 | - $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
85 | - echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
86 | - ?></a> |
|
84 | + $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
85 | + echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
86 | + ?></a> |
|
87 | 87 | </div><!-- .attachment --> |
88 | 88 | |
89 | 89 | <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | </div><!-- .entry-attachment --> |
95 | 95 | |
96 | 96 | <?php |
97 | - the_content(); |
|
97 | + the_content(); |
|
98 | 98 | |
99 | - wp_link_pages( array( |
|
100 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
101 | - 'after' => '</div></div>', |
|
102 | - 'link_before' => '<span>', |
|
103 | - 'link_after' => '</span>' |
|
104 | - ) ); |
|
105 | - ?> |
|
99 | + wp_link_pages( array( |
|
100 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
101 | + 'after' => '</div></div>', |
|
102 | + 'link_before' => '<span>', |
|
103 | + 'link_after' => '</span>' |
|
104 | + ) ); |
|
105 | + ?> |
|
106 | 106 | |
107 | 107 | </div><!-- .entry-content --> |
108 | 108 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | <?php lsx_content_top(); ?> |
20 | 20 | |
21 | - <?php while ( have_posts() ) : the_post(); ?> |
|
21 | + <?php while (have_posts()) : the_post(); ?> |
|
22 | 22 | |
23 | 23 | <?php lsx_entry_before(); ?> |
24 | 24 | |
@@ -32,22 +32,22 @@ discard block |
||
32 | 32 | <div class="entry-meta"> |
33 | 33 | <?php |
34 | 34 | $metadata = wp_get_attachment_metadata(); |
35 | - printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx' ), |
|
36 | - esc_attr( get_the_date( 'c' ) ), |
|
37 | - esc_html( get_the_date() ), |
|
35 | + printf(__('Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx'), |
|
36 | + esc_attr(get_the_date('c')), |
|
37 | + esc_html(get_the_date()), |
|
38 | 38 | wp_get_attachment_url(), |
39 | 39 | $metadata['width'], |
40 | 40 | $metadata['height'], |
41 | - get_permalink( $post->post_parent ), |
|
42 | - get_the_title( $post->post_parent ) |
|
41 | + get_permalink($post->post_parent), |
|
42 | + get_the_title($post->post_parent) |
|
43 | 43 | ); |
44 | 44 | ?> |
45 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?> |
|
45 | + <?php edit_post_link(__('Edit', 'lsx'), '<span class="sep"> | </span> <span class="edit-link">', '</span>'); ?> |
|
46 | 46 | </div><!-- .entry-meta --> |
47 | 47 | |
48 | 48 | <nav id="image-navigation" class="site-navigation"> |
49 | - <span class="previous-image"><?php previous_image_link( false, '← '.__( 'Previous', 'lsx' ) ); ?></span> |
|
50 | - <span class="next-image"><?php next_image_link( false, __( 'Next', 'lsx' ).' →' ); ?></span> |
|
49 | + <span class="previous-image"><?php previous_image_link(false, '← ' . __('Previous', 'lsx')); ?></span> |
|
50 | + <span class="next-image"><?php next_image_link(false, __('Next', 'lsx') . ' →'); ?></span> |
|
51 | 51 | </nav><!-- #image-navigation --> |
52 | 52 | </header><!-- .entry-header --> |
53 | 53 | |
@@ -60,33 +60,33 @@ discard block |
||
60 | 60 | * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, |
61 | 61 | * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file |
62 | 62 | */ |
63 | - $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
|
64 | - foreach ( $attachments as $k => $attachment ) { |
|
65 | - if ( $attachment->ID == $post->ID ) |
|
63 | + $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'))); |
|
64 | + foreach ($attachments as $k => $attachment) { |
|
65 | + if ($attachment->ID == $post->ID) |
|
66 | 66 | break; |
67 | 67 | } |
68 | 68 | $k++; |
69 | 69 | // If there is more than 1 attachment in a gallery |
70 | - if ( count( $attachments ) > 1 ) { |
|
71 | - if ( isset( $attachments[ $k ] ) ) |
|
70 | + if (count($attachments) > 1) { |
|
71 | + if (isset($attachments[$k])) |
|
72 | 72 | // get the URL of the next image attachment |
73 | - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
|
73 | + $next_attachment_url = get_attachment_link($attachments[$k]->ID); |
|
74 | 74 | else |
75 | 75 | // or get the URL of the first image attachment |
76 | - $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
|
76 | + $next_attachment_url = get_attachment_link($attachments[0]->ID); |
|
77 | 77 | } else { |
78 | 78 | // or, if there's only 1 image, get the URL of the image |
79 | 79 | $next_attachment_url = wp_get_attachment_url(); |
80 | 80 | } |
81 | 81 | ?> |
82 | 82 | |
83 | - <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
|
84 | - $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size. |
|
85 | - echo wp_get_attachment_image( $post->ID, $attachment_size ); |
|
83 | + <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr(get_the_title()); ?>" rel="attachment"><?php |
|
84 | + $attachment_size = apply_filters('shape_attachment_size', array(1200, 1200)); // Filterable image size. |
|
85 | + echo wp_get_attachment_image($post->ID, $attachment_size); |
|
86 | 86 | ?></a> |
87 | 87 | </div><!-- .attachment --> |
88 | 88 | |
89 | - <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
|
89 | + <?php if ( ! empty($post->post_excerpt)) : ?> |
|
90 | 90 | <div class="entry-caption"> |
91 | 91 | <?php the_excerpt(); ?> |
92 | 92 | </div><!-- .entry-caption --> |
@@ -96,27 +96,27 @@ discard block |
||
96 | 96 | <?php |
97 | 97 | the_content(); |
98 | 98 | |
99 | - wp_link_pages( array( |
|
99 | + wp_link_pages(array( |
|
100 | 100 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
101 | 101 | 'after' => '</div></div>', |
102 | 102 | 'link_before' => '<span>', |
103 | 103 | 'link_after' => '</span>' |
104 | - ) ); |
|
104 | + )); |
|
105 | 105 | ?> |
106 | 106 | |
107 | 107 | </div><!-- .entry-content --> |
108 | 108 | |
109 | 109 | <footer class="entry-meta"> |
110 | 110 | |
111 | - <?php if ( ! is_single() ) : ?> |
|
111 | + <?php if ( ! is_single()) : ?> |
|
112 | 112 | <a class="read-more" href="<?php the_permalink(); ?>">Read More</a> |
113 | 113 | <?php endif ?> |
114 | 114 | |
115 | - <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> |
|
116 | - <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'lsx' ), __( '1 Comment', 'lsx' ), __( '% Comments', 'lsx' ) ); ?></span> |
|
115 | + <?php if ( ! post_password_required() && (comments_open() || '0' != get_comments_number())) : ?> |
|
116 | + <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'lsx'), __('1 Comment', 'lsx'), __('% Comments', 'lsx')); ?></span> |
|
117 | 117 | <?php endif; ?> |
118 | 118 | |
119 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?> |
|
119 | + <?php edit_post_link(__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?> |
|
120 | 120 | </footer><!-- .entry-meta --> |
121 | 121 | |
122 | 122 | <?php lsx_entry_bottom(); ?> |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | <?php |
127 | 127 | // If comments are open or we have at least one comment, load up the comment template |
128 | - if ( comments_open() || '0' != get_comments_number() ) : |
|
128 | + if (comments_open() || '0' != get_comments_number()) : |
|
129 | 129 | comments_template(); |
130 | 130 | endif; |
131 | 131 | ?> |
@@ -62,18 +62,20 @@ |
||
62 | 62 | */ |
63 | 63 | $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); |
64 | 64 | foreach ( $attachments as $k => $attachment ) { |
65 | - if ( $attachment->ID == $post->ID ) |
|
66 | - break; |
|
65 | + if ( $attachment->ID == $post->ID ) { |
|
66 | + break; |
|
67 | + } |
|
67 | 68 | } |
68 | 69 | $k++; |
69 | 70 | // If there is more than 1 attachment in a gallery |
70 | 71 | if ( count( $attachments ) > 1 ) { |
71 | - if ( isset( $attachments[ $k ] ) ) |
|
72 | - // get the URL of the next image attachment |
|
72 | + if ( isset( $attachments[ $k ] ) ) { |
|
73 | + // get the URL of the next image attachment |
|
73 | 74 | $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); |
74 | - else |
|
75 | - // or get the URL of the first image attachment |
|
75 | + } else { |
|
76 | + // or get the URL of the first image attachment |
|
76 | 77 | $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); |
78 | + } |
|
77 | 79 | } else { |
78 | 80 | // or, if there's only 1 image, get the URL of the image |
79 | 81 | $next_attachment_url = wp_get_attachment_url(); |
@@ -3,33 +3,33 @@ |
||
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> |
6 | - <link href="http<?php if(is_ssl()){ echo 's'; } ?>://fonts.googleapis.com/css?family=Merriweather:400,400italic,700,700italic|Open+Sans:400,700,400italic,700italic" rel="stylesheet" type="text/css"> |
|
7 | - <?php do_action( 'amp_post_template_head', $this ); ?> |
|
6 | + <link href="http<?php if (is_ssl()) { echo 's'; } ?>://fonts.googleapis.com/css?family=Merriweather:400,400italic,700,700italic|Open+Sans:400,700,400italic,700italic" rel="stylesheet" type="text/css"> |
|
7 | + <?php do_action('amp_post_template_head', $this); ?> |
|
8 | 8 | |
9 | 9 | <style amp-custom> |
10 | - <?php $this->load_parts( array( 'style' ) ); ?> |
|
11 | - <?php do_action( 'amp_post_template_css', $this ); ?> |
|
10 | + <?php $this->load_parts(array('style')); ?> |
|
11 | + <?php do_action('amp_post_template_css', $this); ?> |
|
12 | 12 | </style> |
13 | 13 | </head> |
14 | 14 | <body> |
15 | 15 | <nav class="amp-wp-title-bar"> |
16 | 16 | <div> |
17 | - <a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>"> |
|
18 | - <?php $site_icon_url = $this->get( 'site_icon_url' ); ?> |
|
19 | - <?php if ( $site_icon_url ) : ?> |
|
20 | - <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img> |
|
17 | + <a href="<?php echo esc_url($this->get('home_url')); ?>"> |
|
18 | + <?php $site_icon_url = $this->get('site_icon_url'); ?> |
|
19 | + <?php if ($site_icon_url) : ?> |
|
20 | + <amp-img src="<?php echo esc_url($site_icon_url); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img> |
|
21 | 21 | <?php endif; ?> |
22 | - <?php echo esc_html( $this->get( 'blog_name' ) ); ?> |
|
22 | + <?php echo esc_html($this->get('blog_name')); ?> |
|
23 | 23 | </a> |
24 | 24 | </div> |
25 | 25 | </nav> |
26 | 26 | <div class="amp-wp-content"> |
27 | - <h1 class="amp-wp-title"><?php echo esc_html( $this->get( 'post_title' ) ); ?></h1> |
|
27 | + <h1 class="amp-wp-title"><?php echo esc_html($this->get('post_title')); ?></h1> |
|
28 | 28 | <ul class="amp-wp-meta"> |
29 | - <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author', 'meta-time', 'meta-taxonomy' ) ) ); ?> |
|
29 | + <?php $this->load_parts(apply_filters('amp_post_template_meta_parts', array('meta-author', 'meta-time', 'meta-taxonomy'))); ?> |
|
30 | 30 | </ul> |
31 | - <?php echo $this->get( 'post_amp_content' ); // amphtml content; no kses ?> |
|
31 | + <?php echo $this->get('post_amp_content'); // amphtml content; no kses ?> |
|
32 | 32 | </div> |
33 | -<?php do_action( 'amp_post_template_footer', $this ); ?> |
|
33 | +<?php do_action('amp_post_template_footer', $this); ?> |
|
34 | 34 | </body> |
35 | 35 | </html> |