@@ -16,31 +16,31 @@ |
||
16 | 16 | * @version 2.2.2 |
17 | 17 | */ |
18 | 18 | |
19 | -if ( ! defined( 'ABSPATH' ) ) { |
|
19 | +if ( ! defined('ABSPATH')) { |
|
20 | 20 | exit; // Exit if accessed directly |
21 | 21 | } |
22 | 22 | |
23 | 23 | global $wp_query; |
24 | 24 | |
25 | -if ( $wp_query->max_num_pages <= 1 ) { |
|
25 | +if ($wp_query->max_num_pages <= 1) { |
|
26 | 26 | return; |
27 | 27 | } |
28 | 28 | ?> |
29 | 29 | <div class="lsx-pagination-wrapper"> |
30 | 30 | <nav class="lsx-pagination"> |
31 | 31 | <?php |
32 | - echo paginate_links( apply_filters( 'woocommerce_pagination_args', array( |
|
33 | - 'base' => esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) ), |
|
32 | + echo paginate_links(apply_filters('woocommerce_pagination_args', array( |
|
33 | + 'base' => esc_url_raw(str_replace(999999999, '%#%', remove_query_arg('add-to-cart', get_pagenum_link(999999999, false)))), |
|
34 | 34 | 'format' => '', |
35 | 35 | 'add_args' => false, |
36 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
36 | + 'current' => max(1, get_query_var('paged')), |
|
37 | 37 | 'total' => $wp_query->max_num_pages, |
38 | - 'prev_text' => '<span class="meta-nav">←</span> ' . esc_html__( 'Previous', 'lsx' ), |
|
39 | - 'next_text' => esc_html__( 'Next', 'lsx' ) . ' <span class="meta-nav">→</span>', |
|
38 | + 'prev_text' => '<span class="meta-nav">←</span> ' . esc_html__('Previous', 'lsx'), |
|
39 | + 'next_text' => esc_html__('Next', 'lsx') . ' <span class="meta-nav">→</span>', |
|
40 | 40 | // 'type' => 'list', |
41 | 41 | 'end_size' => 3, |
42 | 42 | 'mid_size' => 3, |
43 | - ) ) ); |
|
43 | + ))); |
|
44 | 44 | ?> |
45 | 45 | </nav> |
46 | 46 | </div> |
@@ -17,36 +17,36 @@ |
||
17 | 17 | */ |
18 | 18 | |
19 | 19 | // Exit if accessed directly |
20 | -if ( ! defined( 'ABSPATH' ) ) { |
|
20 | +if ( ! defined('ABSPATH')) { |
|
21 | 21 | exit; |
22 | 22 | } |
23 | 23 | |
24 | 24 | global $product; ?> |
25 | 25 | |
26 | 26 | <div class="lsx-woocommerce-slot"> |
27 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"> |
|
27 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"> |
|
28 | 28 | <figure class="lsx-woocommerce-avatar"> |
29 | - <?php echo $product->get_image( 'lsx-thumbnail-square' ); ?> |
|
29 | + <?php echo $product->get_image('lsx-thumbnail-square'); ?> |
|
30 | 30 | </figure> |
31 | 31 | </a> |
32 | 32 | |
33 | 33 | <h5 class="lsx-woocommerce-title"> |
34 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"><?php echo $product->get_name(); ?></a> |
|
34 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"><?php echo $product->get_name(); ?></a> |
|
35 | 35 | </h5> |
36 | 36 | |
37 | - <?php if ( ! empty( $show_rating ) ) : ?> |
|
37 | + <?php if ( ! empty($show_rating)) : ?> |
|
38 | 38 | <div class="lsx-woocommerce-rating"> |
39 | - <?php echo wc_get_rating_html( $product->get_average_rating() ); ?> |
|
39 | + <?php echo wc_get_rating_html($product->get_average_rating()); ?> |
|
40 | 40 | </div> |
41 | 41 | <?php endif; ?> |
42 | 42 | |
43 | - <?php if ( $price_html = $product->get_price_html() ) : ?> |
|
43 | + <?php if ($price_html = $product->get_price_html()) : ?> |
|
44 | 44 | <div class="lsx-woocommerce-price"> |
45 | 45 | <?php echo $price_html; ?> |
46 | 46 | </div> |
47 | 47 | <?php endif; ?> |
48 | 48 | |
49 | 49 | <div class="lsx-woocommerce-content"> |
50 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="moretag"><?php esc_attr_e( 'View more', 'lsx' ); ?></a> |
|
50 | + <a href="<?php echo esc_url($product->get_permalink()); ?>" class="moretag"><?php esc_attr_e('View more', 'lsx'); ?></a> |
|
51 | 51 | </div> |
52 | 52 | </div> |
@@ -5,25 +5,25 @@ discard block |
||
5 | 5 | * @package lsx |
6 | 6 | */ |
7 | 7 | |
8 | -if ( isset( $GLOBALS['comment_depth'] ) ) { |
|
9 | - $depth = intval( $GLOBALS['comment_depth'] ); |
|
8 | +if (isset($GLOBALS['comment_depth'])) { |
|
9 | + $depth = intval($GLOBALS['comment_depth']); |
|
10 | 10 | } else { |
11 | 11 | $depth = 1; |
12 | 12 | } |
13 | 13 | |
14 | -$max_depth = intval( get_option( 'thread_comments_depth' ) ); |
|
14 | +$max_depth = intval(get_option('thread_comments_depth')); |
|
15 | 15 | |
16 | -echo get_avatar( $comment, '128' ); |
|
16 | +echo get_avatar($comment, '128'); |
|
17 | 17 | ?> |
18 | 18 | <div class="media-body"> |
19 | 19 | <h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4> |
20 | 20 | |
21 | - <time datetime="<?php echo comment_date( 'c' ); ?>"> |
|
22 | - <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> |
|
21 | + <time datetime="<?php echo comment_date('c'); ?>"> |
|
22 | + <a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"> |
|
23 | 23 | <?php |
24 | 24 | printf( |
25 | 25 | /* Translators: 1: post date, 2: post time */ |
26 | - esc_html__( '%1$s on %2$s', 'lsx' ), |
|
26 | + esc_html__('%1$s on %2$s', 'lsx'), |
|
27 | 27 | get_comment_date(), |
28 | 28 | get_comment_time() |
29 | 29 | ); |
@@ -31,18 +31,18 @@ discard block |
||
31 | 31 | </a> |
32 | 32 | </time> |
33 | 33 | |
34 | - <?php edit_comment_link( esc_html__( '(Edit)', 'lsx' ), '', '' ); ?> |
|
34 | + <?php edit_comment_link(esc_html__('(Edit)', 'lsx'), '', ''); ?> |
|
35 | 35 | |
36 | - <?php if ( ! $comment->comment_approved ) : ?> |
|
36 | + <?php if ( ! $comment->comment_approved) : ?> |
|
37 | 37 | <div class="alert alert-info"> |
38 | - <?php esc_html_e( 'Your comment is awaiting moderation.', 'lsx' ); ?> |
|
38 | + <?php esc_html_e('Your comment is awaiting moderation.', 'lsx'); ?> |
|
39 | 39 | </div> |
40 | 40 | <?php endif; ?> |
41 | 41 | |
42 | 42 | <?php |
43 | 43 | comment_text(); |
44 | 44 | |
45 | -comment_reply_link( array( |
|
45 | +comment_reply_link(array( |
|
46 | 46 | 'depth' => $depth, |
47 | 47 | 'max_depth' => $max_depth, |
48 | -) ); |
|
48 | +)); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | <?php lsx_content_wrap_before(); ?> |
11 | 11 | |
12 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
12 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
13 | 13 | |
14 | 14 | <?php lsx_content_before(); ?> |
15 | 15 | |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php lsx_content_top(); ?> |
19 | 19 | |
20 | - <?php if ( have_posts() ) : ?> |
|
20 | + <?php if (have_posts()) : ?> |
|
21 | 21 | |
22 | 22 | <div class="post-wrapper"> |
23 | 23 | |
24 | - <?php while ( have_posts() ) : the_post(); ?> |
|
24 | + <?php while (have_posts()) : the_post(); ?> |
|
25 | 25 | |
26 | - <?php get_template_part( 'partials/content', get_post_format() ); ?> |
|
26 | + <?php get_template_part('partials/content', get_post_format()); ?> |
|
27 | 27 | |
28 | 28 | <?php endwhile; ?> |
29 | 29 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | <?php else : ?> |
35 | 35 | |
36 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
36 | + <?php get_template_part('partials/content', 'none'); ?> |
|
37 | 37 | |
38 | 38 | <?php endif; ?> |
39 | 39 |
@@ -7,28 +7,28 @@ |
||
7 | 7 | |
8 | 8 | $style = 'body #searchform { display: block; }'; |
9 | 9 | |
10 | -if ( is_customize_preview() ) { |
|
11 | - $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
10 | +if (is_customize_preview()) { |
|
11 | + $search_form = get_theme_mod('lsx_header_search', false); |
|
12 | 12 | |
13 | - if ( false === $search_form ) { |
|
13 | + if (false === $search_form) { |
|
14 | 14 | $style = 'body #searchform { display: none; }'; |
15 | 15 | } |
16 | 16 | } |
17 | 17 | ?> |
18 | 18 | |
19 | -<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> |
|
19 | +<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url(home_url('/')); ?>"> |
|
20 | 20 | <div class="input-group"> |
21 | - <input type="search" value="<?php if ( is_search() ) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e( 'Search', 'lsx' ); ?> <?php echo esc_attr( get_bloginfo( 'name' ) ); ?>"> |
|
22 | - <label class="hide"><?php esc_attr_e( 'Search for:', 'lsx' ); ?></label> |
|
21 | + <input type="search" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e('Search', 'lsx'); ?> <?php echo esc_attr(get_bloginfo('name')); ?>"> |
|
22 | + <label class="hide"><?php esc_attr_e('Search for:', 'lsx'); ?></label> |
|
23 | 23 | |
24 | 24 | <span class="input-group-btn"> |
25 | 25 | <button type="submit" class="search-submit btn btn-default"><span class="fa fa-search"></span></button> |
26 | 26 | </span> |
27 | 27 | </div> |
28 | 28 | |
29 | - <?php if ( is_customize_preview() ) : ?> |
|
29 | + <?php if (is_customize_preview()) : ?> |
|
30 | 30 | <style id="lsx-header-search-css"> |
31 | - <?php echo esc_attr( $style ); ?> |
|
31 | + <?php echo esc_attr($style); ?> |
|
32 | 32 | </style> |
33 | 33 | <?php endif; ?> |
34 | 34 | </form> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php lsx_content_wrap_before(); ?> |
14 | 14 | |
15 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
15 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
16 | 16 | |
17 | 17 | <?php lsx_content_before(); ?> |
18 | 18 | |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() ) : ?> |
|
23 | + <?php if (have_posts()) : ?> |
|
24 | 24 | |
25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
25 | + <?php while (have_posts()) : the_post(); ?> |
|
26 | 26 | |
27 | 27 | <?php lsx_entry_before(); ?> |
28 | 28 | |
@@ -31,25 +31,25 @@ discard block |
||
31 | 31 | <?php lsx_entry_top(); ?> |
32 | 32 | |
33 | 33 | <div class="entry-content"> |
34 | - <h2><?php esc_html_e( 'The Last 30 Posts', 'lsx' ); ?></h2> |
|
34 | + <h2><?php esc_html_e('The Last 30 Posts', 'lsx'); ?></h2> |
|
35 | 35 | |
36 | 36 | <ul> |
37 | 37 | <?php |
38 | - $loop = new WP_Query( array( |
|
38 | + $loop = new WP_Query(array( |
|
39 | 39 | 'posts_per_page' => 30, |
40 | - ) ); |
|
40 | + )); |
|
41 | 41 | ?> |
42 | 42 | |
43 | - <?php if ( $loop->have_posts() ) : ?> |
|
43 | + <?php if ($loop->have_posts()) : ?> |
|
44 | 44 | |
45 | - <?php while ( $loop->have_posts() ) : ?> |
|
45 | + <?php while ($loop->have_posts()) : ?> |
|
46 | 46 | |
47 | 47 | <?php |
48 | 48 | $loop->the_post(); |
49 | 49 | $loop->is_home = false; |
50 | 50 | ?> |
51 | 51 | |
52 | - <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time( get_option( 'date_format' ) ); ?> - <?php echo esc_html( $post->comment_count ); ?> <?php esc_html_e( 'comments', 'lsx' ); ?></li> |
|
52 | + <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time(get_option('date_format')); ?> - <?php echo esc_html($post->comment_count); ?> <?php esc_html_e('comments', 'lsx'); ?></li> |
|
53 | 53 | |
54 | 54 | <?php endwhile; ?> |
55 | 55 | |
@@ -58,20 +58,20 @@ discard block |
||
58 | 58 | <?php wp_reset_postdata(); ?> |
59 | 59 | </ul> |
60 | 60 | |
61 | - <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2> |
|
61 | + <h2><?php esc_html_e('Categories', 'lsx'); ?></h2> |
|
62 | 62 | |
63 | 63 | <ul> |
64 | - <?php wp_list_categories( 'title_li=&hierarchical=0&show_count=1' ); ?> |
|
64 | + <?php wp_list_categories('title_li=&hierarchical=0&show_count=1'); ?> |
|
65 | 65 | </ul> |
66 | 66 | |
67 | - <h2><?php esc_html_e( 'Monthly Archives', 'lsx' ); ?></h2> |
|
67 | + <h2><?php esc_html_e('Monthly Archives', 'lsx'); ?></h2> |
|
68 | 68 | |
69 | 69 | <ul> |
70 | - <?php wp_get_archives( 'type=monthly&show_post_count=1' ); ?> |
|
70 | + <?php wp_get_archives('type=monthly&show_post_count=1'); ?> |
|
71 | 71 | </ul> |
72 | 72 | </div><!-- .entry-content --> |
73 | 73 | |
74 | - <?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
74 | + <?php edit_post_link(esc_html__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
75 | 75 | |
76 | 76 | <?php lsx_entry_bottom(); ?> |
77 | 77 |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() ) : ?> |
|
23 | + <?php if (have_posts()) : ?> |
|
24 | 24 | |
25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
25 | + <?php while (have_posts()) : the_post(); ?> |
|
26 | 26 | |
27 | - <?php get_template_part( 'partials/content', 'page' ); ?> |
|
27 | + <?php get_template_part('partials/content', 'page'); ?> |
|
28 | 28 | |
29 | 29 | <?php endwhile; ?> |
30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | <?php lsx_content_bottom(); ?> |
34 | 34 | |
35 | 35 | <?php |
36 | - if ( comments_open() ) { |
|
36 | + if (comments_open()) { |
|
37 | 37 | comments_template(); |
38 | 38 | } |
39 | 39 | ?> |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() && ! class_exists( 'LSX_Banners' ) ) : ?> |
|
23 | + <?php if (have_posts() && ! class_exists('LSX_Banners')) : ?> |
|
24 | 24 | |
25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
25 | + <?php while (have_posts()) : the_post(); ?> |
|
26 | 26 | |
27 | 27 | <?php lsx_entry_before(); ?> |
28 | 28 | |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | <?php the_content(); ?> |
33 | 33 | |
34 | 34 | <?php |
35 | - wp_link_pages( array( |
|
36 | - 'before' => '<nav class="page-nav"><p>' . esc_html__( 'Pages:', 'lsx' ), |
|
35 | + wp_link_pages(array( |
|
36 | + 'before' => '<nav class="page-nav"><p>' . esc_html__('Pages:', 'lsx'), |
|
37 | 37 | 'after' => '</p></nav>', |
38 | - ) ); |
|
38 | + )); |
|
39 | 39 | ?> |
40 | 40 | </div><!-- .entry-content --> |
41 | 41 | |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | |
48 | 48 | <?php endif; ?> |
49 | 49 | |
50 | - <?php if ( is_active_sidebar( 'sidebar-home' ) ) : ?> |
|
50 | + <?php if (is_active_sidebar('sidebar-home')) : ?> |
|
51 | 51 | |
52 | 52 | <div id="home-widgets"> |
53 | 53 | |
54 | - <?php dynamic_sidebar( 'sidebar-home' ); ?> |
|
54 | + <?php dynamic_sidebar('sidebar-home'); ?> |
|
55 | 55 | |
56 | 56 | </div> |
57 | 57 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php lsx_content_wrap_before(); ?> |
14 | 14 | |
15 | -<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>"> |
|
15 | +<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>"> |
|
16 | 16 | |
17 | 17 | <?php lsx_content_before(); ?> |
18 | 18 | |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( have_posts() ) : ?> |
|
23 | + <?php if (have_posts()) : ?> |
|
24 | 24 | |
25 | - <?php while ( have_posts() ) : the_post(); ?> |
|
25 | + <?php while (have_posts()) : the_post(); ?> |
|
26 | 26 | |
27 | 27 | <?php lsx_entry_before(); ?> |
28 | 28 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | <?php lsx_sitemap_custom_post_type(); ?> |
36 | 36 | </div><!-- .entry-content --> |
37 | 37 | |
38 | - <?php edit_post_link( __( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?> |
|
38 | + <?php edit_post_link(__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?> |
|
39 | 39 | |
40 | 40 | <?php lsx_entry_bottom(); ?> |
41 | 41 | |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | |
58 | 58 | <?php lsx_content_wrap_after(); ?> |
59 | 59 | |
60 | -<?php get_sidebar( 'sitemap' ); ?> |
|
60 | +<?php get_sidebar('sitemap'); ?> |
|
61 | 61 | |
62 | 62 | <?php get_footer(); |