@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | <?php lsx_content_top(); ?> |
22 | 22 | |
23 | - <?php if ( ( have_posts() && ! class_exists( 'LSX_Banners' ) || ( function_exists( 'has_blocks' ) && has_blocks() ) ) ) : ?> |
|
23 | + <?php if ((have_posts() && ! class_exists('LSX_Banners') || (function_exists('has_blocks') && has_blocks()))) : ?> |
|
24 | 24 | |
25 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | <?php the_content(); ?> |
36 | 36 | |
37 | 37 | <?php |
38 | - wp_link_pages( array( |
|
39 | - 'before' => '<nav class="page-nav"><p>' . esc_html__( 'Pages:', 'lsx' ), |
|
38 | + wp_link_pages(array( |
|
39 | + 'before' => '<nav class="page-nav"><p>' . esc_html__('Pages:', 'lsx'), |
|
40 | 40 | 'after' => '</p></nav>', |
41 | - ) ); |
|
41 | + )); |
|
42 | 42 | ?> |
43 | 43 | </div><!-- .entry-content --> |
44 | 44 | |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | |
51 | 51 | <?php endif; ?> |
52 | 52 | |
53 | - <?php if ( is_active_sidebar( 'sidebar-home' ) ) : ?> |
|
53 | + <?php if (is_active_sidebar('sidebar-home')) : ?> |
|
54 | 54 | |
55 | 55 | <div id="home-widgets"> |
56 | 56 | |
57 | - <?php dynamic_sidebar( 'sidebar-home' ); ?> |
|
57 | + <?php dynamic_sidebar('sidebar-home'); ?> |
|
58 | 58 | |
59 | 59 | </div> |
60 | 60 |
@@ -20,14 +20,14 @@ 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 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
30 | - <?php get_template_part( 'partials/content', 'page' ); ?> |
|
30 | + <?php get_template_part('partials/content', 'page'); ?> |
|
31 | 31 | |
32 | 32 | <?php endwhile; ?> |
33 | 33 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | <?php lsx_content_bottom(); ?> |
37 | 37 | |
38 | 38 | <?php |
39 | - if ( comments_open() ) { |
|
39 | + if (comments_open()) { |
|
40 | 40 | comments_template(); |
41 | 41 | } |
42 | 42 | ?> |
@@ -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,10 +20,10 @@ 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 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
@@ -57,7 +57,7 @@ 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 |
63 | 63 | get_footer(); |
@@ -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,10 +20,10 @@ 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 | 25 | <?php |
26 | - while ( have_posts() ) : |
|
26 | + while (have_posts()) : |
|
27 | 27 | the_post(); |
28 | 28 | ?> |
29 | 29 | |
@@ -34,25 +34,25 @@ discard block |
||
34 | 34 | <?php lsx_entry_top(); ?> |
35 | 35 | |
36 | 36 | <div class="entry-content"> |
37 | - <h2><?php esc_html_e( 'The Last 30 Posts', 'lsx' ); ?></h2> |
|
37 | + <h2><?php esc_html_e('The Last 30 Posts', 'lsx'); ?></h2> |
|
38 | 38 | |
39 | 39 | <ul> |
40 | 40 | <?php |
41 | - $loop = new WP_Query( array( |
|
41 | + $loop = new WP_Query(array( |
|
42 | 42 | 'posts_per_page' => 30, |
43 | - ) ); |
|
43 | + )); |
|
44 | 44 | ?> |
45 | 45 | |
46 | - <?php if ( $loop->have_posts() ) : ?> |
|
46 | + <?php if ($loop->have_posts()) : ?> |
|
47 | 47 | |
48 | - <?php while ( $loop->have_posts() ) : ?> |
|
48 | + <?php while ($loop->have_posts()) : ?> |
|
49 | 49 | |
50 | 50 | <?php |
51 | 51 | $loop->the_post(); |
52 | 52 | $loop->is_home = false; |
53 | 53 | ?> |
54 | 54 | |
55 | - <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> |
|
55 | + <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> |
|
56 | 56 | |
57 | 57 | <?php endwhile; ?> |
58 | 58 | |
@@ -61,16 +61,16 @@ discard block |
||
61 | 61 | <?php wp_reset_postdata(); ?> |
62 | 62 | </ul> |
63 | 63 | |
64 | - <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2> |
|
64 | + <h2><?php esc_html_e('Categories', 'lsx'); ?></h2> |
|
65 | 65 | |
66 | 66 | <ul> |
67 | - <?php wp_list_categories( 'title_li=&hierarchical=0&show_count=1' ); ?> |
|
67 | + <?php wp_list_categories('title_li=&hierarchical=0&show_count=1'); ?> |
|
68 | 68 | </ul> |
69 | 69 | |
70 | - <h2><?php esc_html_e( 'Monthly Archives', 'lsx' ); ?></h2> |
|
70 | + <h2><?php esc_html_e('Monthly Archives', 'lsx'); ?></h2> |
|
71 | 71 | |
72 | 72 | <ul> |
73 | - <?php wp_get_archives( 'type=monthly&show_post_count=1' ); ?> |
|
73 | + <?php wp_get_archives('type=monthly&show_post_count=1'); ?> |
|
74 | 74 | </ul> |
75 | 75 | </div><!-- .entry-content --> |
76 | 76 |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | * @subpackage the-events-calendar |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! function_exists( 'lsx_tec_scripts_add_styles' ) ) : |
|
13 | +if ( ! function_exists('lsx_tec_scripts_add_styles')) : |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * The Events Calendar enqueue styles. |
@@ -19,15 +19,15 @@ discard block |
||
19 | 19 | * @subpackage the-events-calendar |
20 | 20 | */ |
21 | 21 | function lsx_tec_scripts_add_styles() { |
22 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array( 'lsx_main' ), LSX_VERSION ); |
|
23 | - wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' ); |
|
22 | + wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar.css', array('lsx_main'), LSX_VERSION); |
|
23 | + wp_style_add_data('the-events-calendar-lsx', 'rtl', 'replace'); |
|
24 | 24 | } |
25 | 25 | |
26 | - add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' ); |
|
26 | + add_action('wp_enqueue_scripts', 'lsx_tec_scripts_add_styles'); |
|
27 | 27 | |
28 | 28 | endif; |
29 | 29 | |
30 | -if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) : |
|
30 | +if ( ! function_exists('lsx_tec_theme_wrapper_start')) : |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * The Events Calendar wrapper start. |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | */ |
38 | 38 | function lsx_tec_theme_wrapper_start() { |
39 | 39 | lsx_content_wrap_before(); |
40 | - echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">'; |
|
40 | + echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">'; |
|
41 | 41 | lsx_content_before(); |
42 | 42 | echo '<main id="main" class="site-main" role="main">'; |
43 | 43 | lsx_content_top(); |
44 | 44 | } |
45 | 45 | |
46 | - add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 ); |
|
46 | + add_action('tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9); |
|
47 | 47 | |
48 | 48 | endif; |
49 | 49 | |
50 | -if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) : |
|
50 | +if ( ! function_exists('lsx_tec_theme_wrapper_end')) : |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * The Events Calendar wrapper end. |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | lsx_content_wrap_after(); |
64 | 64 | } |
65 | 65 | |
66 | - add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 ); |
|
66 | + add_action('tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11); |
|
67 | 67 | |
68 | 68 | endif; |
69 | 69 | |
70 | -if ( ! function_exists( 'lsx_tec_global_header_title' ) ) : |
|
70 | +if ( ! function_exists('lsx_tec_global_header_title')) : |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * Move the events title into the global header |
@@ -75,98 +75,98 @@ discard block |
||
75 | 75 | * @package lsx |
76 | 76 | * @subpackage the-events-calendar |
77 | 77 | */ |
78 | - function lsx_tec_global_header_title( $title ) { |
|
78 | + function lsx_tec_global_header_title($title) { |
|
79 | 79 | |
80 | - if ( tribe_is_community_edit_event_page() ) { |
|
80 | + if (tribe_is_community_edit_event_page()) { |
|
81 | 81 | |
82 | - $is_route = get_query_var( 'WP_Route' ); |
|
83 | - switch ( $is_route ) { |
|
82 | + $is_route = get_query_var('WP_Route'); |
|
83 | + switch ($is_route) { |
|
84 | 84 | case 'ce-edit-route': |
85 | - $title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) ); |
|
85 | + $title = apply_filters('tribe_ce_edit_event_page_title', __('Edit an Event', 'lsx')); |
|
86 | 86 | break; |
87 | 87 | |
88 | 88 | case 'ce-edit-organizer-route': |
89 | - $title = __( 'Edit an Organizer', 'lsx' ); |
|
89 | + $title = __('Edit an Organizer', 'lsx'); |
|
90 | 90 | break; |
91 | 91 | |
92 | 92 | case 'ce-edit-venue-route': |
93 | - $title = __( 'Edit a Venue', 'lsx' ); |
|
93 | + $title = __('Edit a Venue', 'lsx'); |
|
94 | 94 | break; |
95 | 95 | |
96 | 96 | default: |
97 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) ); |
|
97 | + $title = apply_filters('tribe_ce_submit_event_page_title', __('Submit an Event', 'lsx')); |
|
98 | 98 | break; |
99 | 99 | } |
100 | - } elseif ( tribe_is_community_my_events_page() ) { |
|
101 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ); |
|
102 | - } elseif ( tribe_is_event() ) { |
|
100 | + } elseif (tribe_is_community_my_events_page()) { |
|
101 | + $title = apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')); |
|
102 | + } elseif (tribe_is_event()) { |
|
103 | 103 | $title = tribe_get_events_title(); |
104 | 104 | } |
105 | 105 | |
106 | 106 | // Only disable the title after we have retrieved it. |
107 | - add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
107 | + add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1); |
|
108 | 108 | |
109 | - if ( is_singular( 'tribe_events' ) ) { |
|
110 | - add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
109 | + if (is_singular('tribe_events')) { |
|
110 | + add_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
111 | 111 | } |
112 | 112 | return $title; |
113 | 113 | } |
114 | - add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
114 | + add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1); |
|
115 | 115 | |
116 | 116 | endif; |
117 | 117 | |
118 | -if ( ! function_exists( 'lsx_text_disable_body_title' ) ) : |
|
118 | +if ( ! function_exists('lsx_text_disable_body_title')) : |
|
119 | 119 | /** |
120 | 120 | * Disable the events title for the post archive if the dynamic setting is active. |
121 | 121 | * |
122 | 122 | * @param $title |
123 | 123 | * @return string |
124 | 124 | */ |
125 | - function lsx_text_disable_body_title( $title ) { |
|
125 | + function lsx_text_disable_body_title($title) { |
|
126 | 126 | $title = ''; |
127 | - remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
127 | + remove_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
128 | 128 | return $title; |
129 | 129 | } |
130 | 130 | |
131 | 131 | endif; |
132 | 132 | |
133 | -if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) : |
|
133 | +if ( ! function_exists('lsx_tec_breadcrumb_filter')) : |
|
134 | 134 | /** |
135 | 135 | * Fixes the community events breadcrumb |
136 | 136 | * |
137 | 137 | * @package lsx |
138 | 138 | * @subpackage the-events-calendar |
139 | 139 | */ |
140 | - function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
140 | + function lsx_tec_breadcrumb_filter($crumbs) { |
|
141 | 141 | |
142 | - if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
142 | + if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { |
|
143 | 143 | $new_crumbs = array(); |
144 | 144 | $new_crumbs[0] = $crumbs[0]; |
145 | 145 | |
146 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
146 | + if (function_exists('woocommerce_breadcrumb')) { |
|
147 | 147 | $new_crumbs[1] = array( |
148 | - 0 => __( 'Events', 'lsx' ), |
|
149 | - 1 => get_post_type_archive_link( 'tribe_events' ), |
|
148 | + 0 => __('Events', 'lsx'), |
|
149 | + 1 => get_post_type_archive_link('tribe_events'), |
|
150 | 150 | ); |
151 | 151 | } else { |
152 | 152 | $new_crumbs[1] = array( |
153 | - 'text' => __( 'Events', 'lsx' ), |
|
154 | - 'url' => get_post_type_archive_link( 'tribe_events' ), |
|
153 | + 'text' => __('Events', 'lsx'), |
|
154 | + 'url' => get_post_type_archive_link('tribe_events'), |
|
155 | 155 | ); |
156 | 156 | } |
157 | 157 | |
158 | - if ( tribe_is_community_my_events_page() ) { |
|
158 | + if (tribe_is_community_my_events_page()) { |
|
159 | 159 | $new_crumbs[2] = $crumbs[2]; |
160 | - } elseif ( tribe_is_community_edit_event_page() ) { |
|
160 | + } elseif (tribe_is_community_edit_event_page()) { |
|
161 | 161 | |
162 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
162 | + if (function_exists('woocommerce_breadcrumb')) { |
|
163 | 163 | $new_crumbs[2] = array( |
164 | - 0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
164 | + 0 => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')), |
|
165 | 165 | 1 => tribe_community_events_list_events_link(), |
166 | 166 | ); |
167 | 167 | } else { |
168 | 168 | $new_crumbs[2] = array( |
169 | - 'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
169 | + 'text' => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')), |
|
170 | 170 | 'url' => tribe_community_events_list_events_link(), |
171 | 171 | ); |
172 | 172 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | } |
180 | 180 | return $crumbs; |
181 | 181 | } |
182 | - add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
183 | - add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
182 | + add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
183 | + add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
184 | 184 | |
185 | 185 | endif; |
@@ -7,11 +7,11 @@ discard block |
||
7 | 7 | * @category bootstrap-navigation-walker |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
10 | +if ( ! defined('ABSPATH')) { |
|
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | |
14 | -if ( ! function_exists( 'lsx_wpml_nav_language_switcher_fix' ) ) : |
|
14 | +if ( ! function_exists('lsx_wpml_nav_language_switcher_fix')) : |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Add in our custom classes to the menus. |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | * @subpackage navigation |
21 | 21 | * @category bootstrap-navigation-walker |
22 | 22 | */ |
23 | - function lsx_wpml_nav_language_switcher_fix( $items, $args ) { |
|
24 | - $items = str_replace( 'menu-item-language-current', 'menu-item-language-current dropdown', $items ); |
|
25 | - $items = str_replace( 'submenu-languages', 'submenu-languages dropdown-menu', $items ); |
|
23 | + function lsx_wpml_nav_language_switcher_fix($items, $args) { |
|
24 | + $items = str_replace('menu-item-language-current', 'menu-item-language-current dropdown', $items); |
|
25 | + $items = str_replace('submenu-languages', 'submenu-languages dropdown-menu', $items); |
|
26 | 26 | return $items; |
27 | 27 | } |
28 | 28 | |
29 | 29 | endif; |
30 | 30 | |
31 | -add_filter( 'wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2 ); |
|
31 | +add_filter('wp_nav_menu_items', 'lsx_wpml_nav_language_switcher_fix', 10, 2); |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | * @subpackage comment-walker |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! function_exists( 'lsx_get_avatar' ) ) : |
|
13 | +if ( ! function_exists('lsx_get_avatar')) : |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Comment Form Field Filter. |
@@ -18,25 +18,25 @@ discard block |
||
18 | 18 | * @package lsx |
19 | 19 | * @subpackage comment-walker |
20 | 20 | */ |
21 | - function lsx_get_avatar( $avatar ) { |
|
22 | - $avatar = str_replace( "class='avatar", "class='avatar pull-left media-object ", $avatar ); |
|
23 | - $avatar = str_replace( 'class="avatar', 'class="avatar pull-left media-object ', $avatar ); |
|
21 | + function lsx_get_avatar($avatar) { |
|
22 | + $avatar = str_replace("class='avatar", "class='avatar pull-left media-object ", $avatar); |
|
23 | + $avatar = str_replace('class="avatar', 'class="avatar pull-left media-object ', $avatar); |
|
24 | 24 | return $avatar; |
25 | 25 | } |
26 | 26 | |
27 | 27 | endif; |
28 | 28 | |
29 | -add_filter( 'get_avatar', 'lsx_get_avatar' ); |
|
29 | +add_filter('get_avatar', 'lsx_get_avatar'); |
|
30 | 30 | |
31 | -add_action( 'admin_bar_menu', function() { |
|
32 | - remove_filter( 'get_avatar', 'lsx_get_avatar' ); |
|
33 | -}, 0 ); |
|
31 | +add_action('admin_bar_menu', function() { |
|
32 | + remove_filter('get_avatar', 'lsx_get_avatar'); |
|
33 | +}, 0); |
|
34 | 34 | |
35 | -add_action( 'wp_after_admin_bar_render', function() { |
|
36 | - add_filter( 'get_avatar', 'lsx_get_avatar' ); |
|
35 | +add_action('wp_after_admin_bar_render', function() { |
|
36 | + add_filter('get_avatar', 'lsx_get_avatar'); |
|
37 | 37 | } ); |
38 | 38 | |
39 | -if ( ! function_exists( 'lsx_comment_form_fields_filter' ) ) : |
|
39 | +if ( ! function_exists('lsx_comment_form_fields_filter')) : |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Comment Form Field Filter. |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | * @package lsx |
45 | 45 | * @subpackage comment-walker |
46 | 46 | */ |
47 | - function lsx_comment_form_fields_filter( $fields ) { |
|
48 | - foreach ( $fields as &$field ) { |
|
49 | - if ( stristr( 'class=', $field ) ) { |
|
50 | - $field = str_replace( 'class="', 'class="form-control ', $field ); |
|
47 | + function lsx_comment_form_fields_filter($fields) { |
|
48 | + foreach ($fields as &$field) { |
|
49 | + if (stristr('class=', $field)) { |
|
50 | + $field = str_replace('class="', 'class="form-control ', $field); |
|
51 | 51 | } else { |
52 | - $field = str_replace( '<input', '<input class="form-control" ', $field ); |
|
52 | + $field = str_replace('<input', '<input class="form-control" ', $field); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
@@ -58,4 +58,4 @@ discard block |
||
58 | 58 | |
59 | 59 | endif; |
60 | 60 | |
61 | -add_filter( 'comment_form_default_fields', 'lsx_comment_form_fields_filter' ); |
|
61 | +add_filter('comment_form_default_fields', 'lsx_comment_form_fields_filter'); |
@@ -6,11 +6,11 @@ discard block |
||
6 | 6 | * @subpackage config |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | |
13 | -if ( ! function_exists( 'lsx_setup' ) ) : |
|
13 | +if ( ! function_exists('lsx_setup')) : |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Theme after_setup_theme action. |
@@ -22,26 +22,26 @@ discard block |
||
22 | 22 | global $content_width; |
23 | 23 | $content_width = 1140; |
24 | 24 | |
25 | - load_theme_textdomain( 'lsx', get_template_directory() . '/languages' ); |
|
25 | + load_theme_textdomain('lsx', get_template_directory() . '/languages'); |
|
26 | 26 | |
27 | - add_image_size( 'lsx-thumbnail-carousel', 350, 230, true ); |
|
28 | - add_image_size( 'lsx-thumbnail-wide', 360, 168, true ); |
|
29 | - add_image_size( 'lsx-thumbnail-square', 350, 350, true ); |
|
30 | - add_image_size( 'lsx-thumbnail-single', 750, 350, true ); |
|
31 | - add_image_size( 'lsx-banner', 1920, 600, true ); |
|
27 | + add_image_size('lsx-thumbnail-carousel', 350, 230, true); |
|
28 | + add_image_size('lsx-thumbnail-wide', 360, 168, true); |
|
29 | + add_image_size('lsx-thumbnail-square', 350, 350, true); |
|
30 | + add_image_size('lsx-thumbnail-single', 750, 350, true); |
|
31 | + add_image_size('lsx-banner', 1920, 600, true); |
|
32 | 32 | |
33 | 33 | register_nav_menus( |
34 | 34 | array( |
35 | - 'primary' => esc_html__( 'Primary Menu', 'lsx' ), |
|
36 | - 'top-menu' => esc_html__( 'Top Menu (right)', 'lsx' ), |
|
37 | - 'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ), |
|
38 | - 'social' => esc_html__( 'Social Menu', 'lsx' ), |
|
39 | - 'footer' => esc_html__( 'Footer Menu', 'lsx' ), |
|
35 | + 'primary' => esc_html__('Primary Menu', 'lsx'), |
|
36 | + 'top-menu' => esc_html__('Top Menu (right)', 'lsx'), |
|
37 | + 'top-menu-left' => esc_html__('Top Menu (left)', 'lsx'), |
|
38 | + 'social' => esc_html__('Social Menu', 'lsx'), |
|
39 | + 'footer' => esc_html__('Footer Menu', 'lsx'), |
|
40 | 40 | ) |
41 | 41 | ); |
42 | 42 | |
43 | - add_theme_support( 'automatic-feed-links' ); |
|
44 | - add_theme_support( 'custom-background' ); |
|
43 | + add_theme_support('automatic-feed-links'); |
|
44 | + add_theme_support('custom-background'); |
|
45 | 45 | |
46 | 46 | add_theme_support( |
47 | 47 | 'custom-logo', |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | ) |
54 | 54 | ); |
55 | 55 | |
56 | - add_theme_support( 'html5', array( 'caption' ) ); |
|
56 | + add_theme_support('html5', array('caption')); |
|
57 | 57 | |
58 | 58 | add_theme_support( |
59 | 59 | 'post-formats', |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | ) |
67 | 67 | ); |
68 | 68 | |
69 | - add_theme_support( 'post-thumbnails' ); |
|
70 | - add_theme_support( 'sensei' ); |
|
69 | + add_theme_support('post-thumbnails'); |
|
70 | + add_theme_support('sensei'); |
|
71 | 71 | |
72 | 72 | add_theme_support( |
73 | 73 | 'site-logo', |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | ) |
81 | 81 | ); |
82 | 82 | |
83 | - add_theme_support( 'title-tag' ); |
|
83 | + add_theme_support('title-tag'); |
|
84 | 84 | |
85 | 85 | /* |
86 | 86 | * @TODO - Necessary to test it |
87 | 87 | */ |
88 | 88 | // add_theme_support( 'woocommerce' ); |
89 | 89 | |
90 | - add_theme_support( 'starter-content', array( |
|
90 | + add_theme_support('starter-content', array( |
|
91 | 91 | 'widgets' => array( |
92 | 92 | 'sidebar-home' => array( |
93 | 93 | 'custom_widget_1' => array( |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | array( |
97 | 97 | 'title' => '', |
98 | - 'text' => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ), |
|
98 | + 'text' => wp_kses_post('<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>'), |
|
99 | 99 | ), |
100 | 100 | ), |
101 | 101 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | array( |
106 | 106 | 'title' => '', |
107 | - 'text' => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ), |
|
107 | + 'text' => wp_kses_post('<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>'), |
|
108 | 108 | ), |
109 | 109 | ), |
110 | 110 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | array( |
115 | 115 | 'title' => '', |
116 | - 'text' => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ), |
|
116 | + 'text' => wp_kses_post('<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>'), |
|
117 | 117 | ), |
118 | 118 | ), |
119 | 119 | ), |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | 'text', |
124 | 124 | |
125 | 125 | array( |
126 | - 'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ), |
|
127 | - 'text' => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ), |
|
126 | + 'title' => esc_html__('Space for Footer Widgets', 'lsx'), |
|
127 | + 'text' => esc_html__('This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx'), |
|
128 | 128 | ), |
129 | 129 | ), |
130 | 130 | |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | 'text', |
133 | 133 | |
134 | 134 | array( |
135 | - 'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ), |
|
136 | - 'text' => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ), |
|
135 | + 'title' => esc_html__('Space for Footer Widgets', 'lsx'), |
|
136 | + 'text' => esc_html__('This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx'), |
|
137 | 137 | ), |
138 | 138 | ), |
139 | 139 | |
@@ -141,8 +141,8 @@ discard block |
||
141 | 141 | 'text', |
142 | 142 | |
143 | 143 | array( |
144 | - 'title' => esc_html__( 'Contact us:', 'lsx' ), |
|
145 | - 'text' => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ), |
|
144 | + 'title' => esc_html__('Contact us:', 'lsx'), |
|
145 | + 'text' => wp_kses_post('<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment'), |
|
146 | 146 | ), |
147 | 147 | ), |
148 | 148 | ), |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | 'text', |
153 | 153 | |
154 | 154 | array( |
155 | - 'title' => esc_html__( 'A Footer Call to Action', 'lsx' ), |
|
156 | - 'text' => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ), |
|
155 | + 'title' => esc_html__('A Footer Call to Action', 'lsx'), |
|
156 | + 'text' => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx'), |
|
157 | 157 | ), |
158 | 158 | ), |
159 | 159 | ), |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | 'home' => array( |
164 | 164 | 'template' => 'page-templates/template-front-page.php', |
165 | 165 | 'thumbnail' => '{{image-banner-example-01}}', |
166 | - 'post_title' => esc_html__( 'LSX is a free WordPress theme', 'lsx' ), |
|
166 | + 'post_title' => esc_html__('LSX is a free WordPress theme', 'lsx'), |
|
167 | 167 | 'post_content' => '', |
168 | 168 | ), |
169 | 169 | |
@@ -180,17 +180,17 @@ discard block |
||
180 | 180 | |
181 | 181 | 'attachments' => array( |
182 | 182 | 'image-banner-example-01' => array( |
183 | - 'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ), |
|
183 | + 'post_title' => esc_html_x('Banner Example 01', 'Theme starter content', 'lsx'), |
|
184 | 184 | 'file' => 'assets/images/admin/banner-example-01.jpg', |
185 | 185 | ), |
186 | 186 | |
187 | 187 | 'image-banner-example-02' => array( |
188 | - 'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ), |
|
188 | + 'post_title' => esc_html_x('Banner Example 02', 'Theme starter content', 'lsx'), |
|
189 | 189 | 'file' => 'assets/images/admin/banner-example-02.jpg', |
190 | 190 | ), |
191 | 191 | |
192 | 192 | 'image-banner-example-03' => array( |
193 | - 'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ), |
|
193 | + 'post_title' => esc_html_x('Banner Example 03', 'Theme starter content', 'lsx'), |
|
194 | 194 | 'file' => 'assets/images/admin/banner-example-03.jpg', |
195 | 195 | ), |
196 | 196 | ), |
@@ -199,12 +199,12 @@ discard block |
||
199 | 199 | 'show_on_front' => 'page', |
200 | 200 | 'page_on_front' => '{{home}}', |
201 | 201 | 'page_for_posts' => '{{blog}}', |
202 | - 'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ), |
|
202 | + 'blogdescription' => esc_html__('LSX starter content example', 'lsx'), |
|
203 | 203 | ), |
204 | 204 | |
205 | 205 | 'nav_menus' => array( |
206 | 206 | 'primary' => array( |
207 | - 'name' => esc_html__( 'Primary Menu', 'lsx' ), |
|
207 | + 'name' => esc_html__('Primary Menu', 'lsx'), |
|
208 | 208 | |
209 | 209 | 'items' => array( |
210 | 210 | 'page_home', |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ), |
216 | 216 | |
217 | 217 | 'top-menu' => array( |
218 | - 'name' => esc_html__( 'Top Menu', 'lsx' ), |
|
218 | + 'name' => esc_html__('Top Menu', 'lsx'), |
|
219 | 219 | |
220 | 220 | 'items' => array( |
221 | 221 | 'custom_link_1' => array( |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | ), |
244 | 244 | |
245 | 245 | 'social' => array( |
246 | - 'name' => esc_html__( 'Social Menu', 'lsx' ), |
|
246 | + 'name' => esc_html__('Social Menu', 'lsx'), |
|
247 | 247 | |
248 | 248 | 'items' => array( |
249 | 249 | 'link_facebook', |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | ), |
259 | 259 | |
260 | 260 | 'footer' => array( |
261 | - 'name' => esc_html__( 'Footer Menu', 'lsx' ), |
|
261 | + 'name' => esc_html__('Footer Menu', 'lsx'), |
|
262 | 262 | |
263 | 263 | 'items' => array( |
264 | 264 | 'page_about', |
@@ -272,14 +272,14 @@ discard block |
||
272 | 272 | 'lsx_header_search' => false, |
273 | 273 | 'lsx_layout' => '1c', |
274 | 274 | ), |
275 | - ) ); |
|
275 | + )); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | endif; |
279 | 279 | |
280 | -add_action( 'after_setup_theme', 'lsx_setup' ); |
|
280 | +add_action('after_setup_theme', 'lsx_setup'); |
|
281 | 281 | |
282 | -if ( ! function_exists( 'lsx_init' ) ) : |
|
282 | +if ( ! function_exists('lsx_init')) : |
|
283 | 283 | |
284 | 284 | /** |
285 | 285 | * Theme init action. |
@@ -288,20 +288,20 @@ discard block |
||
288 | 288 | * @subpackage config |
289 | 289 | */ |
290 | 290 | function lsx_init() { |
291 | - add_post_type_support( 'page', 'excerpt' ); |
|
291 | + add_post_type_support('page', 'excerpt'); |
|
292 | 292 | |
293 | - if ( class_exists( 'WooCommerce' ) ) { |
|
294 | - remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 ); |
|
293 | + if (class_exists('WooCommerce')) { |
|
294 | + remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20); |
|
295 | 295 | } |
296 | 296 | |
297 | - remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 ); |
|
297 | + remove_action('comment_form', 'wp_comment_form_unfiltered_html_nonce', 10); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | endif; |
301 | 301 | |
302 | -add_action( 'init', 'lsx_init', 100 ); |
|
302 | +add_action('init', 'lsx_init', 100); |
|
303 | 303 | |
304 | -if ( ! function_exists( 'lsx_process_content_width' ) ) : |
|
304 | +if ( ! function_exists('lsx_process_content_width')) : |
|
305 | 305 | |
306 | 306 | /** |
307 | 307 | * Overwrite the $content_width var, based on the layout of the page. |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | global $content_width; |
314 | 314 | |
315 | 315 | if ( |
316 | - is_page_template( 'page-templates/template-front-page.php' ) || |
|
317 | - is_page_template( 'page-templates/template-full-width.php' ) |
|
316 | + is_page_template('page-templates/template-front-page.php') || |
|
317 | + is_page_template('page-templates/template-full-width.php') |
|
318 | 318 | ) { |
319 | 319 | $content_width = 1140; |
320 | 320 | } |
@@ -322,9 +322,9 @@ discard block |
||
322 | 322 | |
323 | 323 | endif; |
324 | 324 | |
325 | -add_action( 'wp_head', 'lsx_process_content_width' ); |
|
325 | +add_action('wp_head', 'lsx_process_content_width'); |
|
326 | 326 | |
327 | -if ( ! function_exists( 'lsx_file_get_contents' ) ) : |
|
327 | +if ( ! function_exists('lsx_file_get_contents')) : |
|
328 | 328 | |
329 | 329 | /** |
330 | 330 | * Get file contents. |
@@ -332,19 +332,19 @@ discard block |
||
332 | 332 | * @package lsx |
333 | 333 | * @subpackage config |
334 | 334 | */ |
335 | - function lsx_file_get_contents( $file ) { |
|
336 | - if ( file_exists( $file ) ) { |
|
335 | + function lsx_file_get_contents($file) { |
|
336 | + if (file_exists($file)) { |
|
337 | 337 | global $wp_filesystem; |
338 | 338 | |
339 | - if ( empty( $wp_filesystem ) ) { |
|
340 | - require_once( ABSPATH . 'wp-admin/includes/file.php' ); |
|
339 | + if (empty($wp_filesystem)) { |
|
340 | + require_once(ABSPATH . 'wp-admin/includes/file.php'); |
|
341 | 341 | WP_Filesystem(); |
342 | 342 | } |
343 | 343 | |
344 | - if ( $wp_filesystem ) { |
|
345 | - $contents = $wp_filesystem->get_contents( $file ); |
|
344 | + if ($wp_filesystem) { |
|
345 | + $contents = $wp_filesystem->get_contents($file); |
|
346 | 346 | |
347 | - if ( ! empty( $contents ) ) { |
|
347 | + if ( ! empty($contents)) { |
|
348 | 348 | return $contents; |
349 | 349 | } |
350 | 350 | } |
@@ -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__( '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__('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_attr_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_attr_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); |