@@ -15,42 +15,42 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | // Exit if accessed directly. |
| 18 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 18 | +if ( ! defined('ABSPATH')) { |
|
| 19 | 19 | exit; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | global $product; |
| 23 | 23 | |
| 24 | -if ( ! is_a( $product, 'WC_Product' ) ) { |
|
| 24 | +if ( ! is_a($product, 'WC_Product')) { |
|
| 25 | 25 | return; |
| 26 | 26 | } ?> |
| 27 | 27 | |
| 28 | 28 | <div class="lsx-woocommerce-slot"> |
| 29 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"> |
|
| 29 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"> |
|
| 30 | 30 | <figure class="lsx-woocommerce-avatar"> |
| 31 | - <?php echo wp_kses_post( $product->get_image( 'lsx-thumbnail-square' ) ); ?> |
|
| 31 | + <?php echo wp_kses_post($product->get_image('lsx-thumbnail-square')); ?> |
|
| 32 | 32 | </figure> |
| 33 | 33 | </a> |
| 34 | 34 | |
| 35 | 35 | <h5 class="lsx-woocommerce-title"> |
| 36 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>"><?php echo wp_kses_post( $product->get_name() ); ?></a> |
|
| 36 | + <a href="<?php echo esc_url($product->get_permalink()); ?>"><?php echo wp_kses_post($product->get_name()); ?></a> |
|
| 37 | 37 | </h5> |
| 38 | 38 | |
| 39 | - <?php if ( ! empty( $show_rating ) ) : ?> |
|
| 39 | + <?php if ( ! empty($show_rating)) : ?> |
|
| 40 | 40 | <div class="lsx-woocommerce-rating"> |
| 41 | - <?php echo wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) ); ?> |
|
| 41 | + <?php echo wp_kses_post(wc_get_rating_html($product->get_average_rating())); ?> |
|
| 42 | 42 | </div> |
| 43 | 43 | <?php endif; ?> |
| 44 | 44 | |
| 45 | 45 | <?php |
| 46 | 46 | $price_html = $product->get_price_html(); |
| 47 | - if ( $price_html ) : ?> |
|
| 47 | + if ($price_html) : ?> |
|
| 48 | 48 | <div class="lsx-woocommerce-price"> |
| 49 | - <?php echo wp_kses_post( $price_html ); ?> |
|
| 49 | + <?php echo wp_kses_post($price_html); ?> |
|
| 50 | 50 | </div> |
| 51 | 51 | <?php endif; ?> |
| 52 | 52 | |
| 53 | 53 | <div class="lsx-woocommerce-content"> |
| 54 | - <a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="moretag"><?php esc_html_e( 'View more', 'lsx' ); ?></a> |
|
| 54 | + <a href="<?php echo esc_url($product->get_permalink()); ?>" class="moretag"><?php esc_html_e('View more', 'lsx'); ?></a> |
|
| 55 | 55 | </div> |
| 56 | 56 | </div> |
@@ -5,32 +5,32 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -$show_on_front = get_option( 'show_on_front' ); |
|
| 8 | +$show_on_front = get_option('show_on_front'); |
|
| 9 | 9 | |
| 10 | -$layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 11 | -$layout = apply_filters( 'lsx_layout', $layout ); |
|
| 10 | +$layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 11 | +$layout = apply_filters('lsx_layout', $layout); |
|
| 12 | 12 | |
| 13 | -if ( 'posts' === $show_on_front && is_home() ) { |
|
| 13 | +if ('posts' === $show_on_front && is_home()) { |
|
| 14 | 14 | $sidebar = 'home'; |
| 15 | 15 | } else { |
| 16 | 16 | $sidebar = 'sidebar-1'; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if ( '1c' !== $layout ) : ?> |
|
| 19 | +if ('1c' !== $layout) : ?> |
|
| 20 | 20 | |
| 21 | 21 | <?php lsx_sidebars_before(); ?> |
| 22 | 22 | |
| 23 | - <div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary"> |
|
| 23 | + <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
|
| 24 | 24 | |
| 25 | 25 | <?php lsx_sidebar_top(); ?> |
| 26 | 26 | |
| 27 | - <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2> |
|
| 27 | + <h2><?php esc_html_e('Categories', 'lsx'); ?></h2> |
|
| 28 | 28 | |
| 29 | 29 | <aside id="categories" class="widget widget_categories"> |
| 30 | 30 | <?php |
| 31 | - echo wp_tag_cloud( array( |
|
| 31 | + echo wp_tag_cloud(array( |
|
| 32 | 32 | 'taxonomy' => 'category', |
| 33 | - ) ); |
|
| 33 | + )); |
|
| 34 | 34 | ?> |
| 35 | 35 | </aside> |
| 36 | 36 | |
@@ -5,54 +5,54 @@ |
||
| 5 | 5 | * @package lsx |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -$sidebar_enabled = apply_filters( 'lsx_sidebar_enable', true ); |
|
| 8 | +$sidebar_enabled = apply_filters('lsx_sidebar_enable', true); |
|
| 9 | 9 | |
| 10 | -if ( true !== $sidebar_enabled ) { |
|
| 10 | +if (true !== $sidebar_enabled) { |
|
| 11 | 11 | return true; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -$show_on_front = get_option( 'show_on_front' ); |
|
| 14 | +$show_on_front = get_option('show_on_front'); |
|
| 15 | 15 | |
| 16 | -if ( 'page' === $show_on_front && is_front_page() ) { |
|
| 16 | +if ('page' === $show_on_front && is_front_page()) { |
|
| 17 | 17 | $layout = '1c'; |
| 18 | 18 | $sidebar = 'home'; |
| 19 | 19 | } else { |
| 20 | - $layout = get_theme_mod( 'lsx_layout', '2cr' ); |
|
| 21 | - $layout = apply_filters( 'lsx_layout', $layout ); |
|
| 20 | + $layout = get_theme_mod('lsx_layout', '2cr'); |
|
| 21 | + $layout = apply_filters('lsx_layout', $layout); |
|
| 22 | 22 | |
| 23 | - if ( 'posts' === $show_on_front && is_home() ) { |
|
| 23 | + if ('posts' === $show_on_front && is_home()) { |
|
| 24 | 24 | $sidebar = 'home'; |
| 25 | 25 | } else { |
| 26 | 26 | $sidebar = 'sidebar-1'; |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | -if ( '1c' !== $layout ) : ?> |
|
| 30 | +if ('1c' !== $layout) : ?> |
|
| 31 | 31 | <?php lsx_sidebars_before(); ?> |
| 32 | - <div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary"> |
|
| 32 | + <div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary"> |
|
| 33 | 33 | |
| 34 | 34 | <?php lsx_sidebar_top(); ?> |
| 35 | 35 | |
| 36 | - <?php if ( ! dynamic_sidebar( $sidebar ) ) : ?> |
|
| 36 | + <?php if ( ! dynamic_sidebar($sidebar)) : ?> |
|
| 37 | 37 | |
| 38 | 38 | <aside id="search" class="widget widget_search"> |
| 39 | 39 | <?php get_search_form(); ?> |
| 40 | 40 | </aside> |
| 41 | 41 | |
| 42 | 42 | <aside id="archives" class="widget"> |
| 43 | - <h1 class="widget-title"><?php esc_html_e( 'Archives', 'lsx' ); ?></h1> |
|
| 43 | + <h1 class="widget-title"><?php esc_html_e('Archives', 'lsx'); ?></h1> |
|
| 44 | 44 | |
| 45 | 45 | <ul> |
| 46 | 46 | <?php |
| 47 | - wp_get_archives( array( |
|
| 47 | + wp_get_archives(array( |
|
| 48 | 48 | 'type' => 'monthly', |
| 49 | - ) ); |
|
| 49 | + )); |
|
| 50 | 50 | ?> |
| 51 | 51 | </ul> |
| 52 | 52 | </aside> |
| 53 | 53 | |
| 54 | 54 | <aside id="meta" class="widget"> |
| 55 | - <h1 class="widget-title"><?php esc_html_e( 'Meta', 'lsx' ); ?></h1> |
|
| 55 | + <h1 class="widget-title"><?php esc_html_e('Meta', 'lsx'); ?></h1> |
|
| 56 | 56 | |
| 57 | 57 | <ul> |
| 58 | 58 | <?php wp_register(); ?> |