@@ -11,14 +11,14 @@ |
||
11 | 11 | <html <?php language_attributes(); ?>> |
12 | 12 | <head> |
13 | 13 | <?php lsx_head_top(); ?> |
14 | - <meta charset="<?php bloginfo( 'charset' ); ?>"> |
|
14 | + <meta charset="<?php bloginfo('charset'); ?>"> |
|
15 | 15 | <link rel="profile" href="http://gmpg.org/xfn/11"> |
16 | - <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> |
|
16 | + <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>"> |
|
17 | 17 | <?php lsx_head_bottom(); ?> |
18 | 18 | <?php wp_head(); ?> |
19 | 19 | </head> |
20 | 20 | |
21 | - <body <?php body_class( 'lsx' ); ?>> |
|
21 | + <body <?php body_class('lsx'); ?>> |
|
22 | 22 | <?php wp_body_open(); ?> |
23 | 23 | <?php lsx_body_top(); ?> |
24 | 24 |
@@ -10,30 +10,30 @@ discard block |
||
10 | 10 | <div class="row"> |
11 | 11 | <div class="col-md-6"> |
12 | 12 | <div class="box mailchimp"> |
13 | - <h2><?php esc_html_e( 'Newsletter', 'lsx' ); ?></h2> |
|
14 | - <p><?php esc_html_e( 'Subscribe to our mailing list.', 'lsx' ); ?></p> |
|
13 | + <h2><?php esc_html_e('Newsletter', 'lsx'); ?></h2> |
|
14 | + <p><?php esc_html_e('Subscribe to our mailing list.', 'lsx'); ?></p> |
|
15 | 15 | |
16 | 16 | <!-- Begin MailChimp Signup Form --> |
17 | 17 | <form action="//lsdev.us2.list-manage.com/subscribe/post?u=e50b2c5c82f4b42ea978af479&id=92c36218e5" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> |
18 | 18 | <div id="mc_embed_signup"> |
19 | 19 | <div id="mc_embed_signup_scroll"> |
20 | 20 | <div class="mc-field-group"> |
21 | - <label for="mce-EMAIL"><?php esc_html_e( 'Email Address', 'lsx' ); ?> <span class="asterisk">*</span></label> |
|
21 | + <label for="mce-EMAIL"><?php esc_html_e('Email Address', 'lsx'); ?> <span class="asterisk">*</span></label> |
|
22 | 22 | <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> |
23 | 23 | </div> |
24 | 24 | <div class="mc-field-group"> |
25 | - <label for="mce-FNAME"><?php esc_html_e( 'First Name', 'lsx' ); ?> </label> |
|
25 | + <label for="mce-FNAME"><?php esc_html_e('First Name', 'lsx'); ?> </label> |
|
26 | 26 | <input type="text" value="" name="FNAME" class="" id="mce-FNAME"> |
27 | 27 | </div> |
28 | 28 | <div class="mc-field-group"> |
29 | - <label for="mce-LNAME"><?php esc_html_e( 'Last Name', 'lsx' ); ?> </label> |
|
29 | + <label for="mce-LNAME"><?php esc_html_e('Last Name', 'lsx'); ?> </label> |
|
30 | 30 | <input type="text" value="" name="LNAME" class="" id="mce-LNAME"> |
31 | 31 | </div> |
32 | 32 | </div> |
33 | 33 | <div style="position:absolute;left:-5000px;" aria-hidden="true"><input type="text" name="b_e50b2c5c82f4b42ea978af479_92c36218e5" tabindex="-1" value=""></div> |
34 | 34 | </div> |
35 | 35 | <div class="more-button"> |
36 | - <input type="submit" value="<?php esc_attr_e( 'Subscribe', 'lsx' ); ?>" name="subscribe" class="button button-primary"> |
|
36 | + <input type="submit" value="<?php esc_attr_e('Subscribe', 'lsx'); ?>" name="subscribe" class="button button-primary"> |
|
37 | 37 | </div> |
38 | 38 | </form> |
39 | 39 | <!--End mc_embed_signup--> |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | |
43 | 43 | <div class="col-md-6"> |
44 | 44 | <div class="box suggest"> |
45 | - <h2><?php esc_html_e( 'Enjoying LSX?', 'lsx' ); ?></h2> |
|
45 | + <h2><?php esc_html_e('Enjoying LSX?', 'lsx'); ?></h2> |
|
46 | 46 | |
47 | 47 | <p> |
48 | 48 | <?php |
49 | 49 | printf( |
50 | 50 | /* Translators: 1: HTML open tag link, 2: HTML close tag link */ |
51 | - esc_html__( 'Why not %1$sleave a review%2$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx' ), |
|
51 | + esc_html__('Why not %1$sleave a review%2$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx'), |
|
52 | 52 | '<a href="https://wordpress.org/themes/lsx" target="_blank rel="noopener noreferrer">', |
53 | 53 | '</a>' |
54 | 54 | ); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @subpackage Gutenberg |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | * Enqueue Admin styles on admin area |
15 | 15 | */ |
16 | 16 | function load_gutenberg_admin_style() { |
17 | - wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0' ); |
|
17 | + wp_enqueue_style('admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0'); |
|
18 | 18 | } |
19 | -add_action( 'admin_enqueue_scripts', 'load_gutenberg_admin_style' ); |
|
19 | +add_action('admin_enqueue_scripts', 'load_gutenberg_admin_style'); |
|
20 | 20 | |
21 | 21 | // Gutenberg Compatibility. |
22 | 22 | require get_template_directory() . '/lib/theme-support.php'; |
@@ -24,31 +24,31 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Add custom class for Gutenberg Compatible template |
26 | 26 | */ |
27 | -function add_gutenberg_compatible_body_class( $classes ) { |
|
27 | +function add_gutenberg_compatible_body_class($classes) { |
|
28 | 28 | // if ( ! is_home() && ! is_front_page() ). |
29 | - if ( is_page() || is_page_template() || is_single() ) |
|
29 | + if (is_page() || is_page_template() || is_single()) |
|
30 | 30 | $classes[] = 'gutenberg-compatible-template'; |
31 | 31 | |
32 | 32 | // Add a class if the page is using the Content and Media block. |
33 | 33 | $post = get_post(); |
34 | - if ( function_exists( 'has_blocks' ) && isset( $post->post_content ) && has_blocks( $post->post_content ) && ( ! is_search() ) && ( ! is_archive() ) ) { |
|
35 | - $blocks = parse_blocks( $post->post_content ); |
|
34 | + if (function_exists('has_blocks') && isset($post->post_content) && has_blocks($post->post_content) && ( ! is_search()) && ( ! is_archive())) { |
|
35 | + $blocks = parse_blocks($post->post_content); |
|
36 | 36 | |
37 | - if ( 'core/media-text' === $blocks[0]['blockName'] ) { |
|
37 | + if ('core/media-text' === $blocks[0]['blockName']) { |
|
38 | 38 | $classes[] = 'has-block-media-text'; |
39 | 39 | } |
40 | - if ( 'core/cover' === $blocks[0]['blockName'] ) { |
|
40 | + if ('core/cover' === $blocks[0]['blockName']) { |
|
41 | 41 | $classes[] = 'has-block-cover'; |
42 | 42 | } |
43 | 43 | } |
44 | 44 | return $classes; |
45 | 45 | } |
46 | 46 | |
47 | -add_filter( 'body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class' ); |
|
47 | +add_filter('body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class'); |
|
48 | 48 | |
49 | 49 | // Add custom class for templates that are using the Gutenberg editor. |
50 | -add_action('body_class', function( $classes ) { |
|
51 | - if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) |
|
50 | +add_action('body_class', function($classes) { |
|
51 | + if (function_exists('has_blocks') && has_blocks(get_the_ID()) && ((is_singular('post') || is_page()))) |
|
52 | 52 | $classes[] = 'using-gutenberg'; |
53 | 53 | return $classes; |
54 | 54 | }); |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | * @return void |
60 | 60 | */ |
61 | 61 | function remove_lsx_page_banner_when_using_blocks() { |
62 | - if ( function_exists( 'has_blocks' ) && ( ! class_exists( 'LSX_Banners' ) ) ) { |
|
63 | - add_filter( 'lsx_page_banner_disable', '__return_true' ); |
|
62 | + if (function_exists('has_blocks') && ( ! class_exists('LSX_Banners'))) { |
|
63 | + add_filter('lsx_page_banner_disable', '__return_true'); |
|
64 | 64 | } |
65 | 65 | } |
66 | -add_filter( 'init', 'remove_lsx_page_banner_when_using_blocks' ); |
|
66 | +add_filter('init', 'remove_lsx_page_banner_when_using_blocks'); |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | * @subpackage welcome-page |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! function_exists( 'lsx_activation_admin_notice_dismiss' ) ) : |
|
13 | +if ( ! function_exists('lsx_activation_admin_notice_dismiss')) : |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Dismiss the admin notice (successful activation). |
@@ -19,15 +19,15 @@ discard block |
||
19 | 19 | * @subpackage welcome-page |
20 | 20 | */ |
21 | 21 | function lsx_activation_admin_notice_dismiss() { |
22 | - update_option( 'lsx-notice-dismissed', '1' ); |
|
22 | + update_option('lsx-notice-dismissed', '1'); |
|
23 | 23 | wp_die(); |
24 | 24 | } |
25 | 25 | |
26 | 26 | endif; |
27 | 27 | |
28 | -add_action( 'wp_ajax_lsx_dismiss_theme_notice', 'lsx_activation_admin_notice_dismiss' ); |
|
28 | +add_action('wp_ajax_lsx_dismiss_theme_notice', 'lsx_activation_admin_notice_dismiss'); |
|
29 | 29 | |
30 | -if ( ! function_exists( 'lsx_activation_admin_notice' ) ) : |
|
30 | +if ( ! function_exists('lsx_activation_admin_notice')) : |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Adds an admin notice upon successful activation. |
@@ -36,16 +36,16 @@ discard block |
||
36 | 36 | * @subpackage welcome-page |
37 | 37 | */ |
38 | 38 | function lsx_activation_admin_notice() { |
39 | - if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) { |
|
40 | - add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 ); |
|
39 | + if (empty(get_option('lsx-notice-dismissed'))) { |
|
40 | + add_action('admin_notices', 'lsx_welcome_admin_notice', 99); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | 44 | endif; |
45 | 45 | |
46 | -add_action( 'admin_notices', 'lsx_activation_admin_notice' ); |
|
46 | +add_action('admin_notices', 'lsx_activation_admin_notice'); |
|
47 | 47 | |
48 | -if ( ! function_exists( 'lsx_welcome_admin_notice' ) ) : |
|
48 | +if ( ! function_exists('lsx_welcome_admin_notice')) : |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * Display an admin notice linking to the welcome screen. |
@@ -60,20 +60,20 @@ discard block |
||
60 | 60 | <?php |
61 | 61 | printf( |
62 | 62 | /* Translators: 1: HTML open tag link, 2: HTML close tag link */ |
63 | - esc_html_e( 'Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx' ), |
|
64 | - '<a href="' . esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ) . '">', |
|
63 | + esc_html_e('Thanks for choosing LSX! You can read hints and tips on how get the most out of your new theme on the %1$swelcome screen%2$s.', 'lsx'), |
|
64 | + '<a href="' . esc_url(admin_url('themes.php?page=lsx-welcome')) . '">', |
|
65 | 65 | '</a>' |
66 | 66 | ); |
67 | 67 | ?> |
68 | 68 | </p> |
69 | - <p><a href="<?php echo esc_url( admin_url( 'themes.php?page=lsx-welcome' ) ); ?>" class="button" style="text-decoration: none;"><?php esc_html_e( 'Get started with LSX', 'lsx' ); ?></a></p> |
|
69 | + <p><a href="<?php echo esc_url(admin_url('themes.php?page=lsx-welcome')); ?>" class="button" style="text-decoration: none;"><?php esc_html_e('Get started with LSX', 'lsx'); ?></a></p> |
|
70 | 70 | </div> |
71 | 71 | <?php |
72 | 72 | } |
73 | 73 | |
74 | 74 | endif; |
75 | 75 | |
76 | -if ( ! function_exists( 'lsx_welcome_style' ) ) : |
|
76 | +if ( ! function_exists('lsx_welcome_style')) : |
|
77 | 77 | |
78 | 78 | /** |
79 | 79 | * Load welcome screen css. |
@@ -83,19 +83,19 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @param string $hook_suffix the current page hook suffix. |
85 | 85 | */ |
86 | - function lsx_welcome_style( $hook_suffix ) { |
|
87 | - if ( 'appearance_page_lsx-welcome' === $hook_suffix ) { |
|
88 | - wp_enqueue_style( 'lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION ); |
|
89 | - wp_enqueue_style( 'lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array( 'lsx-welcome-screen-mailchimp' ), LSX_VERSION ); |
|
90 | - wp_style_add_data( 'lsx-welcome-screen', 'rtl', 'replace' ); |
|
86 | + function lsx_welcome_style($hook_suffix) { |
|
87 | + if ('appearance_page_lsx-welcome' === $hook_suffix) { |
|
88 | + wp_enqueue_style('lsx-welcome-screen-mailchimp', '//cdn-images.mailchimp.com/embedcode/classic-10_7.css', array(), LSX_VERSION); |
|
89 | + wp_enqueue_style('lsx-welcome-screen', get_template_directory_uri() . '/assets/css/admin/welcome.css', array('lsx-welcome-screen-mailchimp'), LSX_VERSION); |
|
90 | + wp_style_add_data('lsx-welcome-screen', 'rtl', 'replace'); |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | 94 | endif; |
95 | 95 | |
96 | -add_action( 'admin_enqueue_scripts', 'lsx_welcome_style' ); |
|
96 | +add_action('admin_enqueue_scripts', 'lsx_welcome_style'); |
|
97 | 97 | |
98 | -if ( ! function_exists( 'lsx_welcome_register_menu' ) ) : |
|
98 | +if ( ! function_exists('lsx_welcome_register_menu')) : |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * Creates the dashboard page. |
@@ -104,14 +104,14 @@ discard block |
||
104 | 104 | * @subpackage welcome-page |
105 | 105 | */ |
106 | 106 | function lsx_welcome_register_menu() { |
107 | - add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' ); |
|
107 | + add_theme_page('LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen'); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | endif; |
111 | 111 | |
112 | -add_action( 'admin_menu', 'lsx_welcome_register_menu' ); |
|
112 | +add_action('admin_menu', 'lsx_welcome_register_menu'); |
|
113 | 113 | |
114 | -if ( ! function_exists( 'lsx_welcome_screen' ) ) : |
|
114 | +if ( ! function_exists('lsx_welcome_screen')) : |
|
115 | 115 | |
116 | 116 | /** |
117 | 117 | * The welcome screen. |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @hooked lsx_welcome_enhance - 20 |
134 | 134 | * @hooked lsx_welcome_footer - 30 |
135 | 135 | */ |
136 | - do_action( 'lsx_welcome' ); |
|
136 | + do_action('lsx_welcome'); |
|
137 | 137 | ?> |
138 | 138 | </div> |
139 | 139 | <?php |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | endif; |
143 | 143 | |
144 | -if ( ! function_exists( 'lsx_welcome_header' ) ) : |
|
144 | +if ( ! function_exists('lsx_welcome_header')) : |
|
145 | 145 | |
146 | 146 | /** |
147 | 147 | * Welcome screen intro. |
@@ -155,9 +155,9 @@ discard block |
||
155 | 155 | |
156 | 156 | endif; |
157 | 157 | |
158 | -add_action( 'lsx_welcome', 'lsx_welcome_header', 10 ); |
|
158 | +add_action('lsx_welcome', 'lsx_welcome_header', 10); |
|
159 | 159 | |
160 | -if ( ! function_exists( 'lsx_welcome_enhance' ) ) : |
|
160 | +if ( ! function_exists('lsx_welcome_enhance')) : |
|
161 | 161 | |
162 | 162 | /** |
163 | 163 | * Welcome screen enhance section. |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | |
172 | 172 | endif; |
173 | 173 | |
174 | -add_action( 'lsx_welcome', 'lsx_welcome_enhance', 20 ); |
|
174 | +add_action('lsx_welcome', 'lsx_welcome_enhance', 20); |
|
175 | 175 | |
176 | -if ( ! function_exists( 'lsx_welcome_footer' ) ) : |
|
176 | +if ( ! function_exists('lsx_welcome_footer')) : |
|
177 | 177 | |
178 | 178 | /** |
179 | 179 | * Welcome screen contribute section. |
@@ -187,4 +187,4 @@ discard block |
||
187 | 187 | |
188 | 188 | endif; |
189 | 189 | |
190 | -add_action( 'lsx_welcome', 'lsx_welcome_footer', 30 ); |
|
190 | +add_action('lsx_welcome', 'lsx_welcome_footer', 30); |
@@ -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_html_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_html_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> |
@@ -5,42 +5,42 @@ |
||
5 | 5 | * @package lsx |
6 | 6 | */ |
7 | 7 | |
8 | -if ( ! defined( 'ABSPATH' ) ) { |
|
8 | +if ( ! defined('ABSPATH')) { |
|
9 | 9 | exit; |
10 | 10 | } |
11 | 11 | global $comment, $stored_comment, $_product, $rating; |
12 | 12 | $the_comment = $comment; |
13 | -if ( null !== $stored_comment ) { |
|
13 | +if (null !== $stored_comment) { |
|
14 | 14 | $the_comment = $stored_comment; |
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <div class="lsx-woocommerce-review-slot"> |
18 | 18 | <div class="lsx-woocommerce-review-flex"> |
19 | - <a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"> |
|
19 | + <a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"> |
|
20 | 20 | <figure class="lsx-woocommerce-avatar"> |
21 | - <?php echo wp_kses_post( $_product->get_image( 'lsx-thumbnail-square' ) ); ?> |
|
21 | + <?php echo wp_kses_post($_product->get_image('lsx-thumbnail-square')); ?> |
|
22 | 22 | </figure> |
23 | 23 | </a> |
24 | 24 | |
25 | 25 | <div class="lsx-woocommerce-review-box"> |
26 | 26 | <div class="lsx-woocommerce-rating"> |
27 | - <?php echo wp_kses_post( wc_get_rating_html( $rating ) ); ?> |
|
27 | + <?php echo wp_kses_post(wc_get_rating_html($rating)); ?> |
|
28 | 28 | </div> |
29 | 29 | |
30 | 30 | <h5 class="lsx-woocommerce-title"> |
31 | - <a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"><?php echo wp_kses_post( $_product->get_name() ); ?></a> |
|
31 | + <a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"><?php echo wp_kses_post($_product->get_name()); ?></a> |
|
32 | 32 | </h5> |
33 | 33 | |
34 | 34 | <p class="lsx-woocommerce-reviewer"> |
35 | 35 | <?php |
36 | 36 | /* translators: %s: review author */ |
37 | - echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
37 | + echo wp_kses_post(esc_html__('by ', 'lsx') . get_comment_author($the_comment->comment_ID)); |
|
38 | 38 | ?> |
39 | 39 | </p> |
40 | 40 | |
41 | 41 | <div class="lsx-woocommerce-content"> |
42 | - <p><?php echo wp_kses_post( $the_comment->comment_content ); ?></p> |
|
43 | - <p><a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>" class="moretag"><?php esc_html_e( 'View more', 'lsx' ); ?></a></p> |
|
42 | + <p><?php echo wp_kses_post($the_comment->comment_content); ?></p> |
|
43 | + <p><a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>" class="moretag"><?php esc_html_e('View more', 'lsx'); ?></a></p> |
|
44 | 44 | </div> |
45 | 45 | </div> |
46 | 46 | </div> |
@@ -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(); ?> |