@@ -17,31 +17,31 @@ |
||
17 | 17 | <?php |
18 | 18 | the_content(); |
19 | 19 | |
20 | - wp_link_pages( array( |
|
20 | + wp_link_pages(array( |
|
21 | 21 | 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
22 | 22 | 'after' => '</div></div>', |
23 | 23 | 'link_before' => '<span>', |
24 | 24 | 'link_after' => '</span>', |
25 | - ) ); |
|
25 | + )); |
|
26 | 26 | ?> |
27 | 27 | </div><!-- .entry-content --> |
28 | 28 | |
29 | 29 | <footer class="footer-meta clearfix"> |
30 | - <?php if ( has_tag() || class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
|
30 | + <?php if (has_tag() || class_exists('LSX_Sharing') || (function_exists('sharing_display') || class_exists('Jetpack_Likes'))) : ?> |
|
31 | 31 | <div class="post-tags-wrapper"> |
32 | 32 | <?php lsx_content_post_tags(); ?> |
33 | 33 | |
34 | 34 | <?php |
35 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
35 | + if (class_exists('LSX_Sharing')) { |
|
36 | 36 | lsx_content_sharing(); |
37 | 37 | } else { |
38 | - if ( function_exists( 'sharing_display' ) ) { |
|
39 | - sharing_display( '', true ); |
|
38 | + if (function_exists('sharing_display')) { |
|
39 | + sharing_display('', true); |
|
40 | 40 | } |
41 | 41 | |
42 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
42 | + if (class_exists('Jetpack_Likes')) { |
|
43 | 43 | $custom_likes = new Jetpack_Likes(); |
44 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
44 | + echo wp_kses_post($custom_likes->post_likes('')); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | ?> |
@@ -15,15 +15,15 @@ discard block |
||
15 | 15 | |
16 | 16 | <div class="entry-content"> |
17 | 17 | <?php |
18 | - the_content(); |
|
19 | - |
|
20 | - wp_link_pages( array( |
|
21 | - 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
22 | - 'after' => '</div></div>', |
|
23 | - 'link_before' => '<span>', |
|
24 | - 'link_after' => '</span>', |
|
25 | - ) ); |
|
26 | - ?> |
|
18 | + the_content(); |
|
19 | + |
|
20 | + wp_link_pages( array( |
|
21 | + 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">', |
|
22 | + 'after' => '</div></div>', |
|
23 | + 'link_before' => '<span>', |
|
24 | + 'link_after' => '</span>', |
|
25 | + ) ); |
|
26 | + ?> |
|
27 | 27 | </div><!-- .entry-content --> |
28 | 28 | |
29 | 29 | <footer class="footer-meta clearfix"> |
@@ -32,19 +32,19 @@ discard block |
||
32 | 32 | <?php lsx_content_post_tags(); ?> |
33 | 33 | |
34 | 34 | <?php |
35 | - if ( class_exists( 'LSX_Sharing' ) ) { |
|
36 | - lsx_content_sharing(); |
|
37 | - } else { |
|
38 | - if ( function_exists( 'sharing_display' ) ) { |
|
39 | - sharing_display( '', true ); |
|
40 | - } |
|
41 | - |
|
42 | - if ( class_exists( 'Jetpack_Likes' ) ) { |
|
43 | - $custom_likes = new Jetpack_Likes(); |
|
44 | - echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
45 | - } |
|
46 | - } |
|
47 | - ?> |
|
35 | + if ( class_exists( 'LSX_Sharing' ) ) { |
|
36 | + lsx_content_sharing(); |
|
37 | + } else { |
|
38 | + if ( function_exists( 'sharing_display' ) ) { |
|
39 | + sharing_display( '', true ); |
|
40 | + } |
|
41 | + |
|
42 | + if ( class_exists( 'Jetpack_Likes' ) ) { |
|
43 | + $custom_likes = new Jetpack_Likes(); |
|
44 | + echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
|
45 | + } |
|
46 | + } |
|
47 | + ?> |
|
48 | 48 | <?php endif ?> |
49 | 49 | </footer><!-- .footer-meta --> |
50 | 50 |
@@ -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,11 +17,11 @@ 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 | - <div class="post-wrapper <?php echo esc_attr( lsx_post_wrapper_class() ); ?>"> |
|
22 | + <div class="post-wrapper <?php echo esc_attr(lsx_post_wrapper_class()); ?>"> |
|
23 | 23 | <?php |
24 | - while ( have_posts() ) : |
|
24 | + while (have_posts()) : |
|
25 | 25 | the_post(); |
26 | 26 | lsx_get_template_part(); |
27 | 27 | endwhile; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | <?php else : ?> |
34 | 34 | |
35 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
35 | + <?php get_template_part('partials/content', 'none'); ?> |
|
36 | 36 | |
37 | 37 | <?php endif; ?> |
38 | 38 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | <?php lsx_content_wrap_after(); ?> |
48 | 48 | |
49 | -<?php get_sidebar( 'sidebar' ); ?> |
|
49 | +<?php get_sidebar('sidebar'); ?> |
|
50 | 50 | |
51 | 51 | <?php |
52 | 52 | get_footer(); |
@@ -21,11 +21,11 @@ |
||
21 | 21 | |
22 | 22 | <div class="post-wrapper <?php echo esc_attr( lsx_post_wrapper_class() ); ?>"> |
23 | 23 | <?php |
24 | - while ( have_posts() ) : |
|
25 | - the_post(); |
|
26 | - lsx_get_template_part(); |
|
27 | - endwhile; |
|
28 | - ?> |
|
24 | + while ( have_posts() ) : |
|
25 | + the_post(); |
|
26 | + lsx_get_template_part(); |
|
27 | + endwhile; |
|
28 | + ?> |
|
29 | 29 | </div> |
30 | 30 | |
31 | 31 | <?php lsx_paging_nav(); ?> |
@@ -30,9 +30,12 @@ |
||
30 | 30 | |
31 | 31 | <?php lsx_paging_nav(); ?> |
32 | 32 | |
33 | - <?php else : ?> |
|
33 | + <?php else { |
|
34 | + : ?> |
|
34 | 35 | |
35 | - <?php get_template_part( 'partials/content', 'none' ); ?> |
|
36 | + <?php get_template_part( 'partials/content', 'none' ); |
|
37 | +} |
|
38 | +?> |
|
36 | 39 | |
37 | 40 | <?php endif; ?> |
38 | 41 |
@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 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() ) |
|
30 | - $classes[] = 'gutenberg-compatible-template'; |
|
29 | + if ( is_page() || is_page_template() || is_single() ) { |
|
30 | + $classes[] = 'gutenberg-compatible-template'; |
|
31 | + } |
|
31 | 32 | |
32 | 33 | // Add a class if the page is using the Content and Media block. |
33 | 34 | $post = get_post(); |
@@ -48,8 +49,9 @@ discard block |
||
48 | 49 | |
49 | 50 | // Add custom class for templates that are using the Gutenberg editor. |
50 | 51 | add_action('body_class', function( $classes ) { |
51 | - if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) |
|
52 | - $classes[] = 'using-gutenberg'; |
|
52 | + if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) { |
|
53 | + $classes[] = 'using-gutenberg'; |
|
54 | + } |
|
53 | 55 | return $classes; |
54 | 56 | }); |
55 | 57 |
@@ -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'); |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | - exit; |
|
10 | + exit; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | /** |
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 | 19 | add_action( 'admin_enqueue_scripts', 'load_gutenberg_admin_style' ); |
20 | 20 | |
@@ -25,32 +25,32 @@ discard block |
||
25 | 25 | * Add custom class for Gutenberg Compatible template |
26 | 26 | */ |
27 | 27 | function add_gutenberg_compatible_body_class( $classes ) { |
28 | - // if ( ! is_home() && ! is_front_page() ). |
|
29 | - if ( is_page() || is_page_template() || is_single() ) |
|
30 | - $classes[] = 'gutenberg-compatible-template'; |
|
28 | + // if ( ! is_home() && ! is_front_page() ). |
|
29 | + if ( is_page() || is_page_template() || is_single() ) |
|
30 | + $classes[] = 'gutenberg-compatible-template'; |
|
31 | 31 | |
32 | - // Add a class if the page is using the Content and Media block. |
|
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 ); |
|
32 | + // Add a class if the page is using the Content and Media block. |
|
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 ); |
|
36 | 36 | |
37 | - if ( 'core/media-text' === $blocks[0]['blockName'] ) { |
|
38 | - $classes[] = 'has-block-media-text'; |
|
39 | - } |
|
40 | - if ( 'core/cover' === $blocks[0]['blockName'] ) { |
|
41 | - $classes[] = 'has-block-cover'; |
|
42 | - } |
|
43 | - } |
|
44 | - return $classes; |
|
37 | + if ( 'core/media-text' === $blocks[0]['blockName'] ) { |
|
38 | + $classes[] = 'has-block-media-text'; |
|
39 | + } |
|
40 | + if ( 'core/cover' === $blocks[0]['blockName'] ) { |
|
41 | + $classes[] = 'has-block-cover'; |
|
42 | + } |
|
43 | + } |
|
44 | + return $classes; |
|
45 | 45 | } |
46 | 46 | |
47 | 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 | 50 | add_action('body_class', function( $classes ) { |
51 | - if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) |
|
52 | - $classes[] = 'using-gutenberg'; |
|
53 | - return $classes; |
|
51 | + if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ( is_singular( 'post' ) || is_page() ) ) ) |
|
52 | + $classes[] = 'using-gutenberg'; |
|
53 | + return $classes; |
|
54 | 54 | }); |
55 | 55 | |
56 | 56 | /** |
@@ -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' ); |
|
64 | - } |
|
62 | + if ( function_exists( 'has_blocks' ) && ( ! class_exists( 'LSX_Banners' ) ) ) { |
|
63 | + add_filter( 'lsx_page_banner_disable', '__return_true' ); |
|
64 | + } |
|
65 | 65 | } |
66 | 66 | add_filter( 'init', 'remove_lsx_page_banner_when_using_blocks' ); |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | * @subpackage yoast |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! class_exists( 'LSX_Yoast' ) ) : |
|
13 | +if ( ! class_exists('LSX_Yoast')) : |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * The LSX Yoast integration class |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function __construct() { |
34 | 34 | |
35 | - add_action( 'wp_enqueue_scripts', array( $this, 'lsx_yoast_scripts_add_styles' ) ); |
|
35 | + add_action('wp_enqueue_scripts', array($this, 'lsx_yoast_scripts_add_styles')); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public static function get_instance() { |
45 | 45 | // If the single instance hasn't been set, set it now. |
46 | - if ( null === self::$instance ) { |
|
46 | + if (null === self::$instance) { |
|
47 | 47 | self::$instance = new self(); |
48 | 48 | } |
49 | 49 | return self::$instance; |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | * @subpackage yoast |
57 | 57 | */ |
58 | 58 | public function lsx_yoast_scripts_add_styles() { |
59 | - wp_enqueue_script( 'lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array( 'jquery' ), LSX_VERSION, true ); |
|
60 | - wp_enqueue_style( 'lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array( 'lsx_main' ), LSX_VERSION ); |
|
59 | + wp_enqueue_script('lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array('jquery'), LSX_VERSION, true); |
|
60 | + wp_enqueue_style('lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array('lsx_main'), LSX_VERSION); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 |
@@ -7,59 +7,59 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | - exit; |
|
10 | + exit; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | if ( ! class_exists( 'LSX_Yoast' ) ) : |
14 | 14 | |
15 | - /** |
|
16 | - * The LSX Yoast integration class |
|
17 | - */ |
|
18 | - class LSX_Yoast { |
|
15 | + /** |
|
16 | + * The LSX Yoast integration class |
|
17 | + */ |
|
18 | + class LSX_Yoast { |
|
19 | 19 | |
20 | - /** |
|
21 | - * Holds class instance |
|
22 | - * |
|
23 | - * @since 1.0.0 |
|
24 | - * @var object |
|
25 | - */ |
|
26 | - protected static $instance = null; |
|
20 | + /** |
|
21 | + * Holds class instance |
|
22 | + * |
|
23 | + * @since 1.0.0 |
|
24 | + * @var object |
|
25 | + */ |
|
26 | + protected static $instance = null; |
|
27 | 27 | |
28 | - /** |
|
29 | - * Setup class. |
|
30 | - * |
|
31 | - * @since 1.0 |
|
32 | - */ |
|
33 | - public function __construct() { |
|
28 | + /** |
|
29 | + * Setup class. |
|
30 | + * |
|
31 | + * @since 1.0 |
|
32 | + */ |
|
33 | + public function __construct() { |
|
34 | 34 | |
35 | - add_action( 'wp_enqueue_scripts', array( $this, 'lsx_yoast_scripts_add_styles' ) ); |
|
36 | - } |
|
35 | + add_action( 'wp_enqueue_scripts', array( $this, 'lsx_yoast_scripts_add_styles' ) ); |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
39 | - * Return an instance of this class. |
|
40 | - * |
|
41 | - * @since 1.0.0 |
|
42 | - * @return object A single instance of this class. |
|
43 | - */ |
|
44 | - public static function get_instance() { |
|
45 | - // If the single instance hasn't been set, set it now. |
|
46 | - if ( null === self::$instance ) { |
|
47 | - self::$instance = new self(); |
|
48 | - } |
|
49 | - return self::$instance; |
|
50 | - } |
|
38 | + /** |
|
39 | + * Return an instance of this class. |
|
40 | + * |
|
41 | + * @since 1.0.0 |
|
42 | + * @return object A single instance of this class. |
|
43 | + */ |
|
44 | + public static function get_instance() { |
|
45 | + // If the single instance hasn't been set, set it now. |
|
46 | + if ( null === self::$instance ) { |
|
47 | + self::$instance = new self(); |
|
48 | + } |
|
49 | + return self::$instance; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * Yoast enqueue styles. |
|
54 | - * |
|
55 | - * @package lsx |
|
56 | - * @subpackage yoast |
|
57 | - */ |
|
58 | - public function lsx_yoast_scripts_add_styles() { |
|
59 | - wp_enqueue_script( 'lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array( 'jquery' ), LSX_VERSION, true ); |
|
60 | - wp_enqueue_style( 'lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array( 'lsx_main' ), LSX_VERSION ); |
|
61 | - } |
|
62 | - } |
|
52 | + /** |
|
53 | + * Yoast enqueue styles. |
|
54 | + * |
|
55 | + * @package lsx |
|
56 | + * @subpackage yoast |
|
57 | + */ |
|
58 | + public function lsx_yoast_scripts_add_styles() { |
|
59 | + wp_enqueue_script( 'lsx_yoast_js', get_template_directory_uri() . '/assets/js/yoast/yoast.js', array( 'jquery' ), LSX_VERSION, true ); |
|
60 | + wp_enqueue_style( 'lsx_yoast_css', get_template_directory_uri() . '/assets/css/yoast/yoast.css', array( 'lsx_main' ), LSX_VERSION ); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | 64 | endif; |
65 | 65 |
@@ -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 |
@@ -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,21 +7,21 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | - exit; |
|
10 | + exit; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | if ( ! function_exists( 'lsx_activation_admin_notice_dismiss' ) ) : |
14 | 14 | |
15 | - /** |
|
16 | - * Dismiss the admin notice (successful activation). |
|
17 | - * |
|
18 | - * @package lsx |
|
19 | - * @subpackage welcome-page |
|
20 | - */ |
|
21 | - function lsx_activation_admin_notice_dismiss() { |
|
22 | - update_option( 'lsx-notice-dismissed', '1' ); |
|
23 | - wp_die(); |
|
24 | - } |
|
15 | + /** |
|
16 | + * Dismiss the admin notice (successful activation). |
|
17 | + * |
|
18 | + * @package lsx |
|
19 | + * @subpackage welcome-page |
|
20 | + */ |
|
21 | + function lsx_activation_admin_notice_dismiss() { |
|
22 | + update_option( 'lsx-notice-dismissed', '1' ); |
|
23 | + wp_die(); |
|
24 | + } |
|
25 | 25 | |
26 | 26 | endif; |
27 | 27 | |
@@ -29,17 +29,17 @@ discard block |
||
29 | 29 | |
30 | 30 | if ( ! function_exists( 'lsx_activation_admin_notice' ) ) : |
31 | 31 | |
32 | - /** |
|
33 | - * Adds an admin notice upon successful activation. |
|
34 | - * |
|
35 | - * @package lsx |
|
36 | - * @subpackage welcome-page |
|
37 | - */ |
|
38 | - function lsx_activation_admin_notice() { |
|
39 | - if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) { |
|
40 | - add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 ); |
|
41 | - } |
|
42 | - } |
|
32 | + /** |
|
33 | + * Adds an admin notice upon successful activation. |
|
34 | + * |
|
35 | + * @package lsx |
|
36 | + * @subpackage welcome-page |
|
37 | + */ |
|
38 | + function lsx_activation_admin_notice() { |
|
39 | + if ( empty( get_option( 'lsx-notice-dismissed' ) ) ) { |
|
40 | + add_action( 'admin_notices', 'lsx_welcome_admin_notice', 99 ); |
|
41 | + } |
|
42 | + } |
|
43 | 43 | |
44 | 44 | endif; |
45 | 45 | |
@@ -47,49 +47,49 @@ discard block |
||
47 | 47 | |
48 | 48 | if ( ! function_exists( 'lsx_welcome_admin_notice' ) ) : |
49 | 49 | |
50 | - /** |
|
51 | - * Display an admin notice linking to the welcome screen. |
|
52 | - * |
|
53 | - * @package lsx |
|
54 | - * @subpackage welcome-page |
|
55 | - */ |
|
56 | - function lsx_welcome_admin_notice() { |
|
57 | - ?> |
|
50 | + /** |
|
51 | + * Display an admin notice linking to the welcome screen. |
|
52 | + * |
|
53 | + * @package lsx |
|
54 | + * @subpackage welcome-page |
|
55 | + */ |
|
56 | + function lsx_welcome_admin_notice() { |
|
57 | + ?> |
|
58 | 58 | <div class="lsx-theme-notice notice notice-success is-dismissible"> |
59 | 59 | <p> |
60 | 60 | <?php |
61 | - printf( |
|
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' ) ) . '">', |
|
65 | - '</a>' |
|
66 | - ); |
|
67 | - ?> |
|
61 | + printf( |
|
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' ) ) . '">', |
|
65 | + '</a>' |
|
66 | + ); |
|
67 | + ?> |
|
68 | 68 | </p> |
69 | 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 | 76 | if ( ! function_exists( 'lsx_welcome_style' ) ) : |
77 | 77 | |
78 | - /** |
|
79 | - * Load welcome screen css. |
|
80 | - * |
|
81 | - * @package lsx |
|
82 | - * @subpackage welcome-page |
|
83 | - * |
|
84 | - * @param string $hook_suffix the current page hook suffix. |
|
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' ); |
|
91 | - } |
|
92 | - } |
|
78 | + /** |
|
79 | + * Load welcome screen css. |
|
80 | + * |
|
81 | + * @package lsx |
|
82 | + * @subpackage welcome-page |
|
83 | + * |
|
84 | + * @param string $hook_suffix the current page hook suffix. |
|
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' ); |
|
91 | + } |
|
92 | + } |
|
93 | 93 | |
94 | 94 | endif; |
95 | 95 | |
@@ -97,15 +97,15 @@ discard block |
||
97 | 97 | |
98 | 98 | if ( ! function_exists( 'lsx_welcome_register_menu' ) ) : |
99 | 99 | |
100 | - /** |
|
101 | - * Creates the dashboard page. |
|
102 | - * |
|
103 | - * @package lsx |
|
104 | - * @subpackage welcome-page |
|
105 | - */ |
|
106 | - function lsx_welcome_register_menu() { |
|
107 | - add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' ); |
|
108 | - } |
|
100 | + /** |
|
101 | + * Creates the dashboard page. |
|
102 | + * |
|
103 | + * @package lsx |
|
104 | + * @subpackage welcome-page |
|
105 | + */ |
|
106 | + function lsx_welcome_register_menu() { |
|
107 | + add_theme_page( 'LSX', 'LSX', 'activate_plugins', 'lsx-welcome', 'lsx_welcome_screen' ); |
|
108 | + } |
|
109 | 109 | |
110 | 110 | endif; |
111 | 111 | |
@@ -113,45 +113,45 @@ discard block |
||
113 | 113 | |
114 | 114 | if ( ! function_exists( 'lsx_welcome_screen' ) ) : |
115 | 115 | |
116 | - /** |
|
117 | - * The welcome screen. |
|
118 | - * |
|
119 | - * @package lsx |
|
120 | - * @subpackage welcome-page |
|
121 | - */ |
|
122 | - function lsx_welcome_screen() { |
|
123 | - require_once ABSPATH . 'wp-load.php'; |
|
124 | - require_once ABSPATH . 'wp-admin/admin.php'; |
|
125 | - require_once ABSPATH . 'wp-admin/admin-header.php'; |
|
126 | - ?> |
|
116 | + /** |
|
117 | + * The welcome screen. |
|
118 | + * |
|
119 | + * @package lsx |
|
120 | + * @subpackage welcome-page |
|
121 | + */ |
|
122 | + function lsx_welcome_screen() { |
|
123 | + require_once ABSPATH . 'wp-load.php'; |
|
124 | + require_once ABSPATH . 'wp-admin/admin.php'; |
|
125 | + require_once ABSPATH . 'wp-admin/admin-header.php'; |
|
126 | + ?> |
|
127 | 127 | <div class="wrap about-wrap"> |
128 | 128 | <?php |
129 | - /** |
|
130 | - * Functions hooked into lsx_welcome action |
|
131 | - * |
|
132 | - * @hooked lsx_welcome_header - 10 |
|
133 | - * @hooked lsx_welcome_enhance - 20 |
|
134 | - * @hooked lsx_welcome_footer - 30 |
|
135 | - */ |
|
136 | - do_action( 'lsx_welcome' ); |
|
137 | - ?> |
|
129 | + /** |
|
130 | + * Functions hooked into lsx_welcome action |
|
131 | + * |
|
132 | + * @hooked lsx_welcome_header - 10 |
|
133 | + * @hooked lsx_welcome_enhance - 20 |
|
134 | + * @hooked lsx_welcome_footer - 30 |
|
135 | + */ |
|
136 | + do_action( 'lsx_welcome' ); |
|
137 | + ?> |
|
138 | 138 | </div> |
139 | 139 | <?php |
140 | - } |
|
140 | + } |
|
141 | 141 | |
142 | 142 | endif; |
143 | 143 | |
144 | 144 | if ( ! function_exists( 'lsx_welcome_header' ) ) : |
145 | 145 | |
146 | - /** |
|
147 | - * Welcome screen intro. |
|
148 | - * |
|
149 | - * @package lsx |
|
150 | - * @subpackage welcome-page |
|
151 | - */ |
|
152 | - function lsx_welcome_header() { |
|
153 | - require_once get_template_directory() . '/includes/admin/welcome-screen/component-header.php'; |
|
154 | - } |
|
146 | + /** |
|
147 | + * Welcome screen intro. |
|
148 | + * |
|
149 | + * @package lsx |
|
150 | + * @subpackage welcome-page |
|
151 | + */ |
|
152 | + function lsx_welcome_header() { |
|
153 | + require_once get_template_directory() . '/includes/admin/welcome-screen/component-header.php'; |
|
154 | + } |
|
155 | 155 | |
156 | 156 | endif; |
157 | 157 | |
@@ -159,15 +159,15 @@ discard block |
||
159 | 159 | |
160 | 160 | if ( ! function_exists( 'lsx_welcome_enhance' ) ) : |
161 | 161 | |
162 | - /** |
|
163 | - * Welcome screen enhance section. |
|
164 | - * |
|
165 | - * @package lsx |
|
166 | - * @subpackage welcome-page |
|
167 | - */ |
|
168 | - function lsx_welcome_enhance() { |
|
169 | - require_once get_template_directory() . '/includes/admin/welcome-screen/component-enhance.php'; |
|
170 | - } |
|
162 | + /** |
|
163 | + * Welcome screen enhance section. |
|
164 | + * |
|
165 | + * @package lsx |
|
166 | + * @subpackage welcome-page |
|
167 | + */ |
|
168 | + function lsx_welcome_enhance() { |
|
169 | + require_once get_template_directory() . '/includes/admin/welcome-screen/component-enhance.php'; |
|
170 | + } |
|
171 | 171 | |
172 | 172 | endif; |
173 | 173 | |
@@ -175,15 +175,15 @@ discard block |
||
175 | 175 | |
176 | 176 | if ( ! function_exists( 'lsx_welcome_footer' ) ) : |
177 | 177 | |
178 | - /** |
|
179 | - * Welcome screen contribute section. |
|
180 | - * |
|
181 | - * @package lsx |
|
182 | - * @subpackage welcome-page |
|
183 | - */ |
|
184 | - function lsx_welcome_footer() { |
|
185 | - require_once get_template_directory() . '/includes/admin/welcome-screen/component-footer.php'; |
|
186 | - } |
|
178 | + /** |
|
179 | + * Welcome screen contribute section. |
|
180 | + * |
|
181 | + * @package lsx |
|
182 | + * @subpackage welcome-page |
|
183 | + */ |
|
184 | + function lsx_welcome_footer() { |
|
185 | + require_once get_template_directory() . '/includes/admin/welcome-screen/component-footer.php'; |
|
186 | + } |
|
187 | 187 | |
188 | 188 | endif; |
189 | 189 |
@@ -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> |
@@ -8,11 +8,11 @@ |
||
8 | 8 | $style = 'body #searchform { display: block; }'; |
9 | 9 | |
10 | 10 | if ( is_customize_preview() ) { |
11 | - $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
11 | + $search_form = get_theme_mod( 'lsx_header_search', false ); |
|
12 | 12 | |
13 | - if ( false === $search_form ) { |
|
14 | - $style = 'body #searchform { display: none; }'; |
|
15 | - } |
|
13 | + if ( false === $search_form ) { |
|
14 | + $style = 'body #searchform { display: none; }'; |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | ?> |
18 | 18 |
@@ -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> |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
9 | - exit; |
|
9 | + exit; |
|
10 | 10 | } |
11 | 11 | global $comment, $stored_comment, $_product, $rating; |
12 | 12 | $the_comment = $comment; |
13 | 13 | if ( null !== $stored_comment ) { |
14 | - $the_comment = $stored_comment; |
|
14 | + $the_comment = $stored_comment; |
|
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | <div class="lsx-woocommerce-review-slot"> |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | |
34 | 34 | <p class="lsx-woocommerce-reviewer"> |
35 | 35 | <?php |
36 | - /* translators: %s: review author */ |
|
37 | - echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
38 | - ?> |
|
36 | + /* translators: %s: review author */ |
|
37 | + echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) ); |
|
38 | + ?> |
|
39 | 39 | </p> |
40 | 40 | |
41 | 41 | <div class="lsx-woocommerce-content"> |
@@ -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> |
@@ -16,13 +16,13 @@ discard block |
||
16 | 16 | |
17 | 17 | // Exit if accessed directly. |
18 | 18 | if ( ! defined( 'ABSPATH' ) ) { |
19 | - exit; |
|
19 | + exit; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | global $product; |
23 | 23 | |
24 | 24 | if ( ! is_a( $product, 'WC_Product' ) ) { |
25 | - return; |
|
25 | + return; |
|
26 | 26 | } ?> |
27 | 27 | |
28 | 28 | <div class="lsx-woocommerce-slot"> |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | <?php endif; ?> |
44 | 44 | |
45 | 45 | <?php |
46 | - $price_html = $product->get_price_html(); |
|
47 | - if ( $price_html ) : ?> |
|
46 | + $price_html = $product->get_price_html(); |
|
47 | + if ( $price_html ) : ?> |
|
48 | 48 | <div class="lsx-woocommerce-price"> |
49 | 49 | <?php echo wp_kses_post( $price_html ); ?> |
50 | 50 | </div> |