@@ -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. |
@@ -22,26 +22,26 @@ discard block |
||
22 | 22 | |
23 | 23 | // Get plugin version. |
24 | 24 | $plugin = 'the-events-calendar/the-events-calendar.php'; |
25 | - $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); |
|
25 | + $data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin); |
|
26 | 26 | $version = $data['Version']; |
27 | 27 | |
28 | - if ( substr( $version, 0, 1 ) >= '5' ) { |
|
28 | + if (substr($version, 0, 1) >= '5') { |
|
29 | 29 | // New Version 5.0 and up. |
30 | - wp_enqueue_style( 'the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array( 'lsx_main' ), LSX_VERSION ); |
|
30 | + wp_enqueue_style('the-events-calendar-lsx', get_template_directory_uri() . '/assets/css/the-events-calendar/the-events-calendar-5.css', array('lsx_main'), LSX_VERSION); |
|
31 | 31 | } else { |
32 | 32 | // Old Version. |
33 | - 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 ); |
|
33 | + 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); |
|
34 | 34 | } |
35 | 35 | |
36 | - 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 ); |
|
37 | - wp_style_add_data( 'the-events-calendar-lsx', 'rtl', 'replace' ); |
|
36 | + 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); |
|
37 | + wp_style_add_data('the-events-calendar-lsx', 'rtl', 'replace'); |
|
38 | 38 | } |
39 | 39 | |
40 | - add_action( 'wp_enqueue_scripts', 'lsx_tec_scripts_add_styles' ); |
|
40 | + add_action('wp_enqueue_scripts', 'lsx_tec_scripts_add_styles'); |
|
41 | 41 | |
42 | 42 | endif; |
43 | 43 | |
44 | -if ( ! function_exists( 'lsx_tec_theme_wrapper_start' ) ) : |
|
44 | +if ( ! function_exists('lsx_tec_theme_wrapper_start')) : |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * The Events Calendar wrapper start. |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | */ |
52 | 52 | function lsx_tec_theme_wrapper_start() { |
53 | 53 | lsx_content_wrap_before(); |
54 | - echo '<div id="primary" class="content-area ' . esc_attr( lsx_main_class() ) . '">'; |
|
54 | + echo '<div id="primary" class="content-area ' . esc_attr(lsx_main_class()) . '">'; |
|
55 | 55 | lsx_content_before(); |
56 | 56 | echo '<main id="main" class="site-main" role="main">'; |
57 | 57 | lsx_content_top(); |
58 | 58 | } |
59 | 59 | |
60 | - add_action( 'tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9 ); |
|
60 | + add_action('tribe_events_before_html', 'lsx_tec_theme_wrapper_start', 9); |
|
61 | 61 | |
62 | 62 | endif; |
63 | 63 | |
64 | -if ( ! function_exists( 'lsx_tec_theme_wrapper_end' ) ) : |
|
64 | +if ( ! function_exists('lsx_tec_theme_wrapper_end')) : |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * The Events Calendar wrapper end. |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | lsx_content_wrap_after(); |
78 | 78 | } |
79 | 79 | |
80 | - add_action( 'tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11 ); |
|
80 | + add_action('tribe_events_after_html', 'lsx_tec_theme_wrapper_end', 11); |
|
81 | 81 | |
82 | 82 | endif; |
83 | 83 | |
84 | -if ( ! function_exists( 'lsx_tec_global_header_title' ) ) : |
|
84 | +if ( ! function_exists('lsx_tec_global_header_title')) : |
|
85 | 85 | |
86 | 86 | /** |
87 | 87 | * Move the events title into the global header |
@@ -89,45 +89,45 @@ discard block |
||
89 | 89 | * @package lsx |
90 | 90 | * @subpackage the-events-calendar |
91 | 91 | */ |
92 | - function lsx_tec_global_header_title( $title ) { |
|
92 | + function lsx_tec_global_header_title($title) { |
|
93 | 93 | |
94 | - if ( tribe_is_community_edit_event_page() ) { |
|
94 | + if (tribe_is_community_edit_event_page()) { |
|
95 | 95 | |
96 | - $is_route = get_query_var( 'WP_Route' ); |
|
97 | - switch ( $is_route ) { |
|
96 | + $is_route = get_query_var('WP_Route'); |
|
97 | + switch ($is_route) { |
|
98 | 98 | case 'ce-edit-route': |
99 | - $title = apply_filters( 'tribe_ce_edit_event_page_title', __( 'Edit an Event', 'lsx' ) ); |
|
99 | + $title = apply_filters('tribe_ce_edit_event_page_title', __('Edit an Event', 'lsx')); |
|
100 | 100 | break; |
101 | 101 | |
102 | 102 | case 'ce-edit-organizer-route': |
103 | - $title = __( 'Edit an Organizer', 'lsx' ); |
|
103 | + $title = __('Edit an Organizer', 'lsx'); |
|
104 | 104 | break; |
105 | 105 | |
106 | 106 | case 'ce-edit-venue-route': |
107 | - $title = __( 'Edit a Venue', 'lsx' ); |
|
107 | + $title = __('Edit a Venue', 'lsx'); |
|
108 | 108 | break; |
109 | 109 | |
110 | 110 | default: |
111 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'Submit an Event', 'lsx' ) ); |
|
111 | + $title = apply_filters('tribe_ce_submit_event_page_title', __('Submit an Event', 'lsx')); |
|
112 | 112 | break; |
113 | 113 | } |
114 | - } elseif ( tribe_is_community_my_events_page() ) { |
|
115 | - $title = apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ); |
|
116 | - } elseif ( tribe_is_event() ) { |
|
114 | + } elseif (tribe_is_community_my_events_page()) { |
|
115 | + $title = apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')); |
|
116 | + } elseif (tribe_is_event()) { |
|
117 | 117 | $title = tribe_get_events_title(); |
118 | 118 | } |
119 | 119 | |
120 | 120 | // Only disable the title after we have retrieved it. |
121 | - add_filter( 'tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
121 | + add_filter('tribe_get_events_title', 'lsx_text_disable_body_title', 200, 1); |
|
122 | 122 | |
123 | - if ( is_singular( 'tribe_events' ) ) { |
|
124 | - add_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
123 | + if (is_singular('tribe_events')) { |
|
124 | + add_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
125 | 125 | } |
126 | 126 | |
127 | - if ( class_exists( 'LSX_Banners' ) ) { |
|
128 | - if ( is_archive() && is_post_type_archive( 'tribe_events' ) ) { |
|
129 | - $options = get_option( '_lsx_settings', false ); |
|
130 | - if ( is_array( $options ) && isset( $options['tribe_events'] ) && isset( $options['tribe_events']['title'] ) && '' !== $options['tribe_events']['title'] ) { |
|
127 | + if (class_exists('LSX_Banners')) { |
|
128 | + if (is_archive() && is_post_type_archive('tribe_events')) { |
|
129 | + $options = get_option('_lsx_settings', false); |
|
130 | + if (is_array($options) && isset($options['tribe_events']) && isset($options['tribe_events']['title']) && '' !== $options['tribe_events']['title']) { |
|
131 | 131 | $title = $options['tribe_events']['title']; |
132 | 132 | } |
133 | 133 | } |
@@ -135,63 +135,63 @@ discard block |
||
135 | 135 | } |
136 | 136 | return $title; |
137 | 137 | } |
138 | - add_filter( 'lsx_banner_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
139 | - add_filter( 'lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1 ); |
|
138 | + add_filter('lsx_banner_title', 'lsx_tec_global_header_title', 200, 1); |
|
139 | + add_filter('lsx_global_header_title', 'lsx_tec_global_header_title', 200, 1); |
|
140 | 140 | |
141 | 141 | endif; |
142 | 142 | |
143 | -if ( ! function_exists( 'lsx_text_disable_body_title' ) ) : |
|
143 | +if ( ! function_exists('lsx_text_disable_body_title')) : |
|
144 | 144 | /** |
145 | 145 | * Disable the events title for the post archive if the dynamic setting is active. |
146 | 146 | * |
147 | 147 | * @param $title |
148 | 148 | * @return string |
149 | 149 | */ |
150 | - function lsx_text_disable_body_title( $title ) { |
|
150 | + function lsx_text_disable_body_title($title) { |
|
151 | 151 | $title = ''; |
152 | - remove_filter( 'the_title', 'lsx_text_disable_body_title', 200, 1 ); |
|
152 | + remove_filter('the_title', 'lsx_text_disable_body_title', 200, 1); |
|
153 | 153 | return $title; |
154 | 154 | } |
155 | 155 | |
156 | 156 | endif; |
157 | 157 | |
158 | -if ( ! function_exists( 'lsx_tec_breadcrumb_filter' ) ) : |
|
158 | +if ( ! function_exists('lsx_tec_breadcrumb_filter')) : |
|
159 | 159 | /** |
160 | 160 | * Fixes the community events breadcrumb |
161 | 161 | * |
162 | 162 | * @package lsx |
163 | 163 | * @subpackage the-events-calendar |
164 | 164 | */ |
165 | - function lsx_tec_breadcrumb_filter( $crumbs ) { |
|
165 | + function lsx_tec_breadcrumb_filter($crumbs) { |
|
166 | 166 | |
167 | - if ( tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { |
|
167 | + if (tribe_is_venue() || tribe_is_organizer() || tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { |
|
168 | 168 | $new_crumbs = array(); |
169 | 169 | $new_crumbs[0] = $crumbs[0]; |
170 | 170 | |
171 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
171 | + if (function_exists('woocommerce_breadcrumb')) { |
|
172 | 172 | $new_crumbs[1] = array( |
173 | - 0 => __( 'Events', 'lsx' ), |
|
174 | - 1 => get_post_type_archive_link( 'tribe_events' ), |
|
173 | + 0 => __('Events', 'lsx'), |
|
174 | + 1 => get_post_type_archive_link('tribe_events'), |
|
175 | 175 | ); |
176 | 176 | } else { |
177 | 177 | $new_crumbs[1] = array( |
178 | - 'text' => __( 'Events', 'lsx' ), |
|
179 | - 'url' => get_post_type_archive_link( 'tribe_events' ), |
|
178 | + 'text' => __('Events', 'lsx'), |
|
179 | + 'url' => get_post_type_archive_link('tribe_events'), |
|
180 | 180 | ); |
181 | 181 | } |
182 | 182 | |
183 | - if ( tribe_is_community_my_events_page() ) { |
|
183 | + if (tribe_is_community_my_events_page()) { |
|
184 | 184 | $new_crumbs[2] = $crumbs[2]; |
185 | - } elseif ( tribe_is_community_edit_event_page() ) { |
|
185 | + } elseif (tribe_is_community_edit_event_page()) { |
|
186 | 186 | |
187 | - if ( function_exists( 'woocommerce_breadcrumb' ) ) { |
|
187 | + if (function_exists('woocommerce_breadcrumb')) { |
|
188 | 188 | $new_crumbs[2] = array( |
189 | - 0 => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
189 | + 0 => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')), |
|
190 | 190 | 1 => tribe_community_events_list_events_link(), |
191 | 191 | ); |
192 | 192 | } else { |
193 | 193 | $new_crumbs[2] = array( |
194 | - 'text' => apply_filters( 'tribe_ce_submit_event_page_title', __( 'My Events', 'lsx' ) ), |
|
194 | + 'text' => apply_filters('tribe_ce_submit_event_page_title', __('My Events', 'lsx')), |
|
195 | 195 | 'url' => tribe_community_events_list_events_link(), |
196 | 196 | ); |
197 | 197 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | return $crumbs; |
206 | 206 | } |
207 | - add_filter( 'wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
208 | - add_filter( 'woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1 ); |
|
207 | + add_filter('wpseo_breadcrumb_links', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
208 | + add_filter('woocommerce_get_breadcrumb', 'lsx_tec_breadcrumb_filter', 30, 1); |
|
209 | 209 | |
210 | 210 | endif; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @subpackage sensei |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; // Exit if accessed directly. |
11 | 11 | } |
12 | 12 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * Constructor. |
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | - add_action( 'init', array( $this, 'init' ) ); |
|
29 | + add_action('init', array($this, 'init')); |
|
30 | 30 | } // End __construct() |
31 | 31 | |
32 | 32 | /** |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @return self |
36 | 36 | */ |
37 | 37 | public static function instance() { |
38 | - if ( ! self::$instance ) { |
|
38 | + if ( ! self::$instance) { |
|
39 | 39 | self::$instance = new self(); |
40 | 40 | } |
41 | 41 | return self::$instance; |
@@ -49,32 +49,32 @@ discard block |
||
49 | 49 | global $woothemes_sensei; |
50 | 50 | |
51 | 51 | // Switching the course filters and the headers around. |
52 | - remove_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 ); |
|
53 | - remove_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_sorting' ) ); |
|
54 | - remove_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_filters' ) ); |
|
55 | - add_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 11, 0 ); |
|
56 | - add_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_sorting' ), 12 ); |
|
57 | - add_action( 'sensei_archive_before_course_loop', array( 'Sensei_Course', 'course_archive_filters' ), 12 ); |
|
52 | + remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0); |
|
53 | + remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting')); |
|
54 | + remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters')); |
|
55 | + add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 11, 0); |
|
56 | + add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'), 12); |
|
57 | + add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'), 12); |
|
58 | 58 | |
59 | 59 | // First add the thumbnail. |
60 | - add_action( 'sensei_course_content_inside_before', array( $this, 'get_course_thumbnail' ), 1 ); |
|
60 | + add_action('sensei_course_content_inside_before', array($this, 'get_course_thumbnail'), 1); |
|
61 | 61 | |
62 | 62 | // This is for our wrapper, we run it on 2, after the thumbnail we added. |
63 | - add_action( 'sensei_course_content_inside_before', array( $this, 'course_body_div_open' ), 1 ); |
|
64 | - add_action( 'sensei_course_content_inside_after', array( $this, 'course_body_div_close' ), 50 ); |
|
63 | + add_action('sensei_course_content_inside_before', array($this, 'course_body_div_open'), 1); |
|
64 | + add_action('sensei_course_content_inside_after', array($this, 'course_body_div_close'), 50); |
|
65 | 65 | |
66 | 66 | // This is for our wrapper, we run it on 2, after the thumbnail we added. |
67 | - add_action( 'sensei_course_content_inside_before', array( $this, 'course_body_div_results_open' ), 20 ); |
|
68 | - add_action( 'sensei_course_content_inside_after', array( $this, 'course_body_div_results_close' ), 49 ); |
|
67 | + add_action('sensei_course_content_inside_before', array($this, 'course_body_div_results_open'), 20); |
|
68 | + add_action('sensei_course_content_inside_after', array($this, 'course_body_div_results_close'), 49); |
|
69 | 69 | |
70 | - add_action( 'sensei_single_course_content_inside_before', array( $this, 'display_course_amount' ), 20 ); |
|
70 | + add_action('sensei_single_course_content_inside_before', array($this, 'display_course_amount'), 20); |
|
71 | 71 | |
72 | 72 | // removes the course image above the content. |
73 | - remove_action( 'sensei_course_content_inside_before', array( $woothemes_sensei->course, 'course_image' ), 30, 1 ); |
|
73 | + remove_action('sensei_course_content_inside_before', array($woothemes_sensei->course, 'course_image'), 30, 1); |
|
74 | 74 | // add the course image to the left of the content. |
75 | - add_action( 'lsx_sensei_course_content_inside_before', array( $woothemes_sensei->course, 'course_image' ), 30, 1 ); |
|
75 | + add_action('lsx_sensei_course_content_inside_before', array($woothemes_sensei->course, 'course_image'), 30, 1); |
|
76 | 76 | |
77 | - add_filter( 'attach_shortcode_hooks', 'lsx_attach_shortcode_hooks', 10, 1 ); |
|
77 | + add_filter('attach_shortcode_hooks', 'lsx_attach_shortcode_hooks', 10, 1); |
|
78 | 78 | |
79 | 79 | } |
80 | 80 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | public function get_course_thumbnail() { |
87 | 87 | ?> |
88 | 88 | <div class="course-thumbnail"> |
89 | - <?php do_action( 'lsx_sensei_course_content_inside_before', get_the_ID() ); ?> |
|
89 | + <?php do_action('lsx_sensei_course_content_inside_before', get_the_ID()); ?> |
|
90 | 90 | </div> |
91 | 91 | <?php |
92 | 92 | } |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function course_body_div_open() { |
100 | 100 | global $post, $current_user; |
101 | - $is_user_taking_course = Sensei_Utils::has_started_course( $post->ID, $current_user->ID ); |
|
101 | + $is_user_taking_course = Sensei_Utils::has_started_course($post->ID, $current_user->ID); |
|
102 | 102 | $user_taking_course_class = ''; |
103 | - if ( ! empty( $is_user_taking_course ) ) { |
|
103 | + if ( ! empty($is_user_taking_course)) { |
|
104 | 104 | $user_taking_course_class = 'currently-in-course'; |
105 | 105 | } |
106 | 106 | ?> |
107 | - <div class="course-body <?php echo esc_html( $user_taking_course_class ); ?>"> |
|
107 | + <div class="course-body <?php echo esc_html($user_taking_course_class); ?>"> |
|
108 | 108 | <?php |
109 | 109 | } |
110 | 110 | |
@@ -148,18 +148,18 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public function display_course_amount() { |
150 | 150 | global $post, $current_user; |
151 | - $is_user_taking_course = Sensei_Course::is_user_enrolled( $post->ID, $current_user->ID ); |
|
152 | - $is_user_starting_course = Sensei_Utils::has_started_course( $post->ID, $current_user->ID ); |
|
153 | - $wc_post_id = absint( get_post_meta( $post->ID, '_course_woocommerce_product', true ) ); |
|
151 | + $is_user_taking_course = Sensei_Course::is_user_enrolled($post->ID, $current_user->ID); |
|
152 | + $is_user_starting_course = Sensei_Utils::has_started_course($post->ID, $current_user->ID); |
|
153 | + $wc_post_id = absint(get_post_meta($post->ID, '_course_woocommerce_product', true)); |
|
154 | 154 | $course_purchasable = ''; |
155 | - if ( class_exists( 'Sensei_WC' ) ) { |
|
156 | - $course_purchasable = Sensei_WC::is_course_purchasable( $post->ID ); |
|
155 | + if (class_exists('Sensei_WC')) { |
|
156 | + $course_purchasable = Sensei_WC::is_course_purchasable($post->ID); |
|
157 | 157 | $currency = get_woocommerce_currency_symbol(); |
158 | - $product = new WC_Product( $wc_post_id ); |
|
159 | - if ( ( ! empty( $product->get_price() ) ) && ( ( ! $is_user_taking_course ) || ( ! $is_user_starting_course ) ) ) { |
|
160 | - echo '<span class="course-product-price price"><span>' . esc_html( $currency ) . ' </span>' . sprintf( '%0.2f', esc_html( $product->get_price() ) ) . '</span>'; |
|
161 | - } elseif ( ( '' === $product->get_price() || 0 == $product->get_price() ) && $course_purchasable && ( ( ! $is_user_taking_course ) || ( ! $is_user_starting_course ) ) ) { |
|
162 | - echo '<span class="course-product-price price">' . wp_kses_post( 'Free!', 'lsx' ) . '</span>'; |
|
158 | + $product = new WC_Product($wc_post_id); |
|
159 | + if (( ! empty($product->get_price())) && (( ! $is_user_taking_course) || ( ! $is_user_starting_course))) { |
|
160 | + echo '<span class="course-product-price price"><span>' . esc_html($currency) . ' </span>' . sprintf('%0.2f', esc_html($product->get_price())) . '</span>'; |
|
161 | + } elseif (('' === $product->get_price() || 0 == $product->get_price()) && $course_purchasable && (( ! $is_user_taking_course) || ( ! $is_user_starting_course))) { |
|
162 | + echo '<span class="course-product-price price">' . wp_kses_post('Free!', 'lsx') . '</span>'; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | ); |
14 | 14 | |
15 | 15 | } |
16 | -add_action( 'admin_init', 'editor_styles' ); |
|
16 | +add_action('admin_init', 'editor_styles'); |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Add theme support functions. |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @package lsx |
22 | 22 | */ |
23 | 23 | |
24 | -if ( ! function_exists( 'theme_support' ) ) : |
|
24 | +if ( ! function_exists('theme_support')) : |
|
25 | 25 | /** |
26 | 26 | * Add theme support functions. |
27 | 27 | * |
@@ -29,44 +29,44 @@ discard block |
||
29 | 29 | */ |
30 | 30 | function theme_support() { |
31 | 31 | // Add support for editor styles. |
32 | - add_theme_support( 'editor-styles' ); |
|
32 | + add_theme_support('editor-styles'); |
|
33 | 33 | // Add support for full and wide align images. |
34 | - add_theme_support( 'align-wide' ); |
|
34 | + add_theme_support('align-wide'); |
|
35 | 35 | // Add support for styling blocks. |
36 | - add_theme_support( 'wp-block-styles' ); |
|
36 | + add_theme_support('wp-block-styles'); |
|
37 | 37 | // Add support for responsive embedded content. |
38 | - add_theme_support( 'responsive-embeds' ); |
|
38 | + add_theme_support('responsive-embeds'); |
|
39 | 39 | // Add custom editor font sizes. |
40 | 40 | add_theme_support( |
41 | 41 | 'editor-font-sizes', |
42 | 42 | array( |
43 | 43 | array( |
44 | - 'name' => esc_html_x( 'Small', 'font size option label', 'lsx' ), |
|
45 | - 'shortName' => esc_html_x( 'S', 'abbreviation of the font size option label', 'lsx' ), |
|
44 | + 'name' => esc_html_x('Small', 'font size option label', 'lsx'), |
|
45 | + 'shortName' => esc_html_x('S', 'abbreviation of the font size option label', 'lsx'), |
|
46 | 46 | 'size' => 13, |
47 | 47 | 'slug' => 'small', |
48 | 48 | ), |
49 | 49 | array( |
50 | - 'name' => esc_html_x( 'Normal', 'font size option label', 'lsx' ), |
|
51 | - 'shortName' => esc_html_x( 'N', 'abbreviation of the font size option label', 'lsx' ), |
|
50 | + 'name' => esc_html_x('Normal', 'font size option label', 'lsx'), |
|
51 | + 'shortName' => esc_html_x('N', 'abbreviation of the font size option label', 'lsx'), |
|
52 | 52 | 'size' => 15, |
53 | 53 | 'slug' => 'normal', |
54 | 54 | ), |
55 | 55 | array( |
56 | - 'name' => esc_html_x( 'Medium', 'font size option label', 'lsx' ), |
|
57 | - 'shortName' => esc_html_x( 'M', 'abbreviation of the font size option label', 'lsx' ), |
|
56 | + 'name' => esc_html_x('Medium', 'font size option label', 'lsx'), |
|
57 | + 'shortName' => esc_html_x('M', 'abbreviation of the font size option label', 'lsx'), |
|
58 | 58 | 'size' => 22, |
59 | 59 | 'slug' => 'medium', |
60 | 60 | ), |
61 | 61 | array( |
62 | - 'name' => esc_html_x( 'Large', 'font size option label', 'lsx' ), |
|
63 | - 'shortName' => esc_html_x( 'L', 'abbreviation of the font size option label', 'lsx' ), |
|
62 | + 'name' => esc_html_x('Large', 'font size option label', 'lsx'), |
|
63 | + 'shortName' => esc_html_x('L', 'abbreviation of the font size option label', 'lsx'), |
|
64 | 64 | 'size' => 30, |
65 | 65 | 'slug' => 'large', |
66 | 66 | ), |
67 | 67 | array( |
68 | - 'name' => esc_html_x( 'Huge', 'font size option label', 'lsx' ), |
|
69 | - 'shortName' => esc_html_x( 'XL', 'abbreviation of the font size option label', 'lsx' ), |
|
68 | + 'name' => esc_html_x('Huge', 'font size option label', 'lsx'), |
|
69 | + 'shortName' => esc_html_x('XL', 'abbreviation of the font size option label', 'lsx'), |
|
70 | 70 | 'size' => 40, |
71 | 71 | 'slug' => 'huge', |
72 | 72 | ), |
@@ -74,48 +74,48 @@ discard block |
||
74 | 74 | ); |
75 | 75 | |
76 | 76 | // Add support for custom color scheme. |
77 | - add_theme_support( 'editor-color-palette', array( |
|
77 | + add_theme_support('editor-color-palette', array( |
|
78 | 78 | array( |
79 | - 'name' => __( 'Strong Blue', 'lsx' ), |
|
79 | + 'name' => __('Strong Blue', 'lsx'), |
|
80 | 80 | 'slug' => 'strong-blue', |
81 | 81 | 'color' => '#27639e', |
82 | 82 | ), |
83 | 83 | array( |
84 | - 'name' => __( 'Lighter Blue', 'lsx' ), |
|
84 | + 'name' => __('Lighter Blue', 'lsx'), |
|
85 | 85 | 'slug' => 'lighter-blue', |
86 | 86 | 'color' => '#428bca', |
87 | 87 | ), |
88 | 88 | array( |
89 | - 'name' => __( 'Yellow', 'lsx' ), |
|
89 | + 'name' => __('Yellow', 'lsx'), |
|
90 | 90 | 'slug' => 'light-yellow', |
91 | 91 | 'color' => '#f7ae00', |
92 | 92 | ), |
93 | 93 | array( |
94 | - 'name' => __( 'Dark Yellow', 'lsx' ), |
|
94 | + 'name' => __('Dark Yellow', 'lsx'), |
|
95 | 95 | 'slug' => 'dark-yellow', |
96 | 96 | 'color' => '#ab7800', |
97 | 97 | ), |
98 | 98 | array( |
99 | - 'name' => __( 'Green', 'lsx' ), |
|
99 | + 'name' => __('Green', 'lsx'), |
|
100 | 100 | 'slug' => 'light-green', |
101 | 101 | 'color' => '#6BA913', |
102 | 102 | ), |
103 | 103 | array( |
104 | - 'name' => __( 'Dark Green', 'lsx' ), |
|
104 | + 'name' => __('Dark Green', 'lsx'), |
|
105 | 105 | 'slug' => 'dark-green', |
106 | 106 | 'color' => '#3F640B', |
107 | 107 | ), |
108 | 108 | array( |
109 | - 'name' => __( 'White', 'lsx' ), |
|
109 | + 'name' => __('White', 'lsx'), |
|
110 | 110 | 'slug' => 'white', |
111 | 111 | 'color' => '#ffffff', |
112 | 112 | ), |
113 | 113 | array( |
114 | - 'name' => __( 'Black', 'lsx' ), |
|
114 | + 'name' => __('Black', 'lsx'), |
|
115 | 115 | 'slug' => 'black', |
116 | 116 | 'color' => '#000000', |
117 | 117 | ), |
118 | - ) ); |
|
118 | + )); |
|
119 | 119 | |
120 | 120 | $primary_color = 'rgba(39,99,158,1)'; |
121 | 121 | $secondary_color = 'rgba(247,174,0,1)'; |
@@ -126,30 +126,30 @@ discard block |
||
126 | 126 | 'editor-gradient-presets', |
127 | 127 | array( |
128 | 128 | array( |
129 | - 'name' => __( 'Primary to Secondary', 'lsx' ), |
|
130 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $secondary_color ) . ' 100%)', |
|
129 | + 'name' => __('Primary to Secondary', 'lsx'), |
|
130 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($secondary_color) . ' 100%)', |
|
131 | 131 | 'slug' => 'primary-to-secondary', |
132 | 132 | ), |
133 | 133 | array( |
134 | - 'name' => __( 'Primary to Tertiary', 'lsx' ), |
|
135 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
134 | + 'name' => __('Primary to Tertiary', 'lsx'), |
|
135 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)', |
|
136 | 136 | 'slug' => 'primary-to-tertiary', |
137 | 137 | ), |
138 | 138 | array( |
139 | - 'name' => __( 'Primary to Background', 'lsx' ), |
|
140 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $primary_color ) . ' 0%, ' . esc_attr( $background_color ) . ' 100%)', |
|
139 | + 'name' => __('Primary to Background', 'lsx'), |
|
140 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($primary_color) . ' 0%, ' . esc_attr($background_color) . ' 100%)', |
|
141 | 141 | 'slug' => 'primary-to-background', |
142 | 142 | ), |
143 | 143 | array( |
144 | - 'name' => __( 'Secondary to Tertiary', 'lsx' ), |
|
145 | - 'gradient' => 'linear-gradient(135deg, ' . esc_attr( $secondary_color ) . ' 0%, ' . esc_attr( $tertiary_color ) . ' 100%)', |
|
144 | + 'name' => __('Secondary to Tertiary', 'lsx'), |
|
145 | + 'gradient' => 'linear-gradient(135deg, ' . esc_attr($secondary_color) . ' 0%, ' . esc_attr($tertiary_color) . ' 100%)', |
|
146 | 146 | 'slug' => 'secondary-to-tertiary', |
147 | 147 | ), |
148 | 148 | ) |
149 | 149 | ); |
150 | 150 | } |
151 | 151 | endif; |
152 | -add_action( 'after_setup_theme', 'theme_support' ); |
|
152 | +add_action('after_setup_theme', 'theme_support'); |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * WPForms submit button, match Gutenberg button block |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | * @param [type] $form_data |
158 | 158 | * @return void |
159 | 159 | */ |
160 | -function lsx_wpforms_match_button_block( $form_data ) { |
|
160 | +function lsx_wpforms_match_button_block($form_data) { |
|
161 | 161 | $form_data['settings']['submit_class'] .= ' btn'; |
162 | 162 | return $form_data; |
163 | 163 | } |
164 | -add_filter( 'wpforms_frontend_form_data', 'lsx_wpforms_match_button_block' ); |
|
164 | +add_filter('wpforms_frontend_form_data', 'lsx_wpforms_match_button_block'); |
@@ -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,33 +7,33 @@ |
||
7 | 7 | * @package lsx |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) { |
|
10 | +if ( ! defined('ABSPATH')) { |
|
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | |
14 | -define( 'LSX_VERSION', '2.8' ); |
|
14 | +define('LSX_VERSION', '2.8'); |
|
15 | 15 | |
16 | -if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { |
|
16 | +if (in_array('wordpress-seo/wp-seo.php', apply_filters('active_plugins', get_option('active_plugins')))) { |
|
17 | 17 | require get_template_directory() . '/includes/yoast/class-lsx-yoast.php'; |
18 | 18 | } |
19 | 19 | |
20 | -if ( class_exists( 'WooCommerce' ) ) { |
|
20 | +if (class_exists('WooCommerce')) { |
|
21 | 21 | require get_template_directory() . '/includes/woocommerce/woocommerce.php'; |
22 | 22 | } |
23 | 23 | |
24 | -if ( class_exists( 'Tribe__Events__Main' ) ) { |
|
24 | +if (class_exists('Tribe__Events__Main')) { |
|
25 | 25 | require get_template_directory() . '/includes/the-events-calendar/the-events-calendar.php'; |
26 | 26 | } |
27 | 27 | |
28 | -if ( class_exists( 'Sensei_Main' ) || class_exists( 'Sensei_WC' ) ) { |
|
28 | +if (class_exists('Sensei_Main') || class_exists('Sensei_WC')) { |
|
29 | 29 | require get_template_directory() . '/includes/sensei/class-lsx-sensei.php'; |
30 | 30 | } |
31 | 31 | |
32 | -if ( class_exists( 'Popup_Maker' ) ) { |
|
32 | +if (class_exists('Popup_Maker')) { |
|
33 | 33 | require get_template_directory() . '/includes/popup-maker/class-lsx-popup-maker.php'; |
34 | 34 | } |
35 | 35 | |
36 | -if ( class_exists( 'bbPress' ) ) { |
|
36 | +if (class_exists('bbPress')) { |
|
37 | 37 | require get_template_directory() . '/includes/bbpress/bbpress.php'; |
38 | 38 | } |
39 | 39 |
@@ -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,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> |