@@ -93,14 +93,17 @@ |
||
93 | 93 | |
94 | 94 | $class_names = join( ' ', $classes ); |
95 | 95 | |
96 | - if ( $args->has_children ) |
|
97 | - $class_names .= ' dropdown'; |
|
96 | + if ( $args->has_children ) { |
|
97 | + $class_names .= ' dropdown'; |
|
98 | + } |
|
98 | 99 | |
99 | - if ( in_array( 'current-menu-item', $classes ) ) |
|
100 | - $class_names .= ' active'; |
|
100 | + if ( in_array( 'current-menu-item', $classes ) ) { |
|
101 | + $class_names .= ' active'; |
|
102 | + } |
|
101 | 103 | |
102 | - if ( in_array( 'current-menu-parent', $classes ) ) |
|
103 | - $class_names .= ' active'; |
|
104 | + if ( in_array( 'current-menu-parent', $classes ) ) { |
|
105 | + $class_names .= ' active'; |
|
106 | + } |
|
104 | 107 | |
105 | 108 | //Check if this is ment to be a "social" type menu |
106 | 109 | $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; |
@@ -8,232 +8,232 @@ |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
11 | - exit; |
|
11 | + exit; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | if ( ! class_exists( 'Walker_Nav_Menu' ) ) { |
15 | - return; |
|
15 | + return; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if ( ! class_exists( 'LSX_Bootstrap_Navwalker' ) ) : |
19 | 19 | |
20 | - /** |
|
21 | - * Cleaner Bootstrap walker |
|
22 | - * |
|
23 | - * @package lsx |
|
24 | - * @subpackage navigation |
|
25 | - * @category bootstrap-navigation-walker |
|
26 | - */ |
|
27 | - class LSX_Bootstrap_Navwalker extends Walker_Nav_Menu { |
|
28 | - |
|
29 | - /** |
|
30 | - * Used to append additional content. |
|
31 | - * |
|
32 | - * @see Walker::start_lvl() |
|
33 | - * @since 3.0.0 |
|
34 | - * |
|
35 | - * @param string $output Passed by reference. Used to append additional content. |
|
36 | - * @param int $depth Depth of page. Used for padding. |
|
37 | - */ |
|
38 | - public function start_lvl( &$output, $depth = 0, $args = array() ) { |
|
39 | - $indent = str_repeat( "\t", $depth ); |
|
40 | - $output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n"; |
|
41 | - } |
|
42 | - |
|
43 | - /** |
|
44 | - * Used to append additional content. |
|
45 | - * @param string $item Passed by reference. |
|
46 | - */ |
|
47 | - public function filter_default_pages( &$item ) { |
|
48 | - return $item; |
|
49 | - } |
|
50 | - |
|
51 | - /** |
|
52 | - * @see Walker::start_el() |
|
53 | - * @since 3.0.0 |
|
54 | - * |
|
55 | - * @param string $output Passed by reference. Used to append additional content. |
|
56 | - * @param object $item Menu item data object. |
|
57 | - * @param int $depth Depth of menu item. Used for padding. |
|
58 | - * @param int $current_page Menu item ID. |
|
59 | - * @param object $args |
|
60 | - */ |
|
61 | - public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { |
|
62 | - $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; |
|
63 | - |
|
64 | - /** |
|
65 | - * If this is a default menu being called we need to fix |
|
66 | - * the item object thats coming through. |
|
67 | - */ |
|
68 | - if ( ! isset( $item->title ) ) { |
|
69 | - return; |
|
70 | - } |
|
71 | - |
|
72 | - /** |
|
73 | - * Dividers, Headers or Disabled |
|
74 | - * ============================= |
|
75 | - * Determine whether the item is a Divider, Header, Disabled or regular |
|
76 | - * menu item. To prevent errors we use the strcasecmp() function to so a |
|
77 | - * comparison that is not case sensitive. The strcasecmp() function returns |
|
78 | - * a 0 if the strings are equal. |
|
79 | - */ |
|
80 | - if ( 0 == strcasecmp( $item->attr_title, 'divider' ) && 1 === $depth ) { |
|
81 | - $output .= $indent . '<li role="presentation" class="divider">'; |
|
82 | - } elseif ( 0 == strcasecmp( $item->title, 'divider' ) && 1 === $depth ) { |
|
83 | - $output .= $indent . '<li role="presentation" class="divider">'; |
|
84 | - } elseif ( 0 == strcasecmp( $item->attr_title, 'dropdown-header' ) && 1 === $depth ) { |
|
85 | - $output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title ); |
|
86 | - } elseif ( 0 == strcasecmp( $item->attr_title, 'disabled' ) ) { |
|
87 | - $output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>'; |
|
88 | - } else { |
|
89 | - $class_names = ''; |
|
90 | - $value = ''; |
|
91 | - |
|
92 | - $classes = empty( $item->classes ) ? array() : (array) $item->classes; |
|
93 | - $classes[] = 'menu-item-' . $item->ID; |
|
94 | - |
|
95 | - $classes = apply_filters( 'lsx_nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ); |
|
96 | - |
|
97 | - $class_names = join( ' ', $classes ); |
|
98 | - |
|
99 | - if ( $args->has_children ) |
|
100 | - $class_names .= ' dropdown'; |
|
101 | - |
|
102 | - if ( in_array( 'current-menu-item', $classes ) ) |
|
103 | - $class_names .= ' active'; |
|
104 | - |
|
105 | - if ( in_array( 'current-menu-parent', $classes ) ) |
|
106 | - $class_names .= ' active'; |
|
107 | - |
|
108 | - //Check if this is ment to be a "social" type menu |
|
109 | - $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; |
|
110 | - |
|
111 | - $id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args ); |
|
112 | - $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; |
|
113 | - |
|
114 | - $output .= $indent . '<li' . $id . $value . $class_names . '>'; |
|
115 | - |
|
116 | - $atts = array(); |
|
117 | - $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : $item->title; |
|
118 | - $atts['target'] = ! empty( $item->target ) ? $item->target : ''; |
|
119 | - $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; |
|
120 | - |
|
121 | - // If item has_children add atts to a. |
|
122 | - if ( $args->has_children ) { |
|
123 | - $atts['href'] = ! empty( $item->url ) ? $item->url : ''; |
|
124 | - $atts['data-toggle'] = 'dropdown'; |
|
125 | - $atts['class'] = 'dropdown-toggle'; |
|
126 | - $atts['aria-haspopup'] = 'true'; |
|
127 | - } else { |
|
128 | - $atts['href'] = ! empty( $item->url ) ? $item->url : ''; |
|
129 | - } |
|
130 | - |
|
131 | - $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args ); |
|
132 | - |
|
133 | - $attributes = ''; |
|
134 | - foreach ( $atts as $attr => $value ) { |
|
135 | - if ( ! empty( $value ) ) { |
|
136 | - $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); |
|
137 | - $attributes .= ' ' . $attr . '="' . $value . '"'; |
|
138 | - } |
|
139 | - } |
|
140 | - |
|
141 | - $item_output = $args->before; |
|
142 | - |
|
143 | - $item_output .= '<a' . $attributes . '>'; |
|
144 | - $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; |
|
145 | - $item_output .= ( $args->has_children && 0 === $depth ) ? ' <span class="caret"></span></a>' : '</a>'; |
|
146 | - $item_output .= $args->after; |
|
147 | - |
|
148 | - $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); |
|
149 | - } |
|
150 | - } |
|
151 | - |
|
152 | - /** |
|
153 | - * Traverse elements to create list from elements. |
|
154 | - * |
|
155 | - * Display one element if the element doesn't have any children otherwise, |
|
156 | - * display the element and its children. Will only traverse up to the max |
|
157 | - * depth and no ignore elements under that depth. |
|
158 | - * |
|
159 | - * This method shouldn't be called directly, use the walk() method instead. |
|
160 | - * |
|
161 | - * @see Walker::start_el() |
|
162 | - * @since 2.5.0 |
|
163 | - * |
|
164 | - * @param object $element Data object |
|
165 | - * @param array $children_elements List of elements to continue traversing. |
|
166 | - * @param int $max_depth Max depth to traverse. |
|
167 | - * @param int $depth Depth of current element. |
|
168 | - * @param array $args |
|
169 | - * @param string $output Passed by reference. Used to append additional content. |
|
170 | - * @return null Null on failure with no changes to parameters. |
|
171 | - */ |
|
172 | - public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { |
|
173 | - if ( ! $element ) { |
|
174 | - return; |
|
175 | - } |
|
176 | - |
|
177 | - $id_field = $this->db_fields['id']; |
|
178 | - |
|
179 | - if ( is_object( $args[0] ) ) { |
|
180 | - $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
181 | - } |
|
182 | - |
|
183 | - parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * Menu Fallback |
|
188 | - * ============= |
|
189 | - * If this function is assigned to the wp_nav_menu's fallback_cb variable |
|
190 | - * and a manu has not been assigned to the theme location in the WordPress |
|
191 | - * menu manager the function with display nothing to a non-logged in user, |
|
192 | - * and will add a link to the WordPress menu manager if logged in as an admin. |
|
193 | - * |
|
194 | - * @param array $args passed from the wp_nav_menu function. |
|
195 | - * |
|
196 | - */ |
|
197 | - public static function fallback( $args ) { |
|
198 | - if ( current_user_can( 'manage_options' ) ) { |
|
199 | - $fb_output = null; |
|
200 | - |
|
201 | - if ( $args['container'] ) { |
|
202 | - $fb_output = '<' . $args['container']; |
|
203 | - |
|
204 | - if ( $args['container_id'] ) { |
|
205 | - $fb_output .= ' id="' . $args['container_id'] . '"'; |
|
206 | - } |
|
207 | - |
|
208 | - if ( $args['container_class'] ) { |
|
209 | - $fb_output .= ' class="' . $args['container_class'] . '"'; |
|
210 | - } |
|
211 | - |
|
212 | - $fb_output .= '>'; |
|
213 | - } |
|
214 | - |
|
215 | - $fb_output .= '<ul'; |
|
216 | - |
|
217 | - if ( $args['menu_id'] ) { |
|
218 | - $fb_output .= ' id="' . $args['menu_id'] . '"'; |
|
219 | - } |
|
220 | - |
|
221 | - if ( $args['menu_class'] ) { |
|
222 | - $fb_output .= ' class="' . $args['menu_class'] . '"'; |
|
223 | - } |
|
224 | - |
|
225 | - $fb_output .= '>'; |
|
226 | - $fb_output .= '<li><a href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add a menu', 'lsx' ) . '</a></li>'; |
|
227 | - $fb_output .= '</ul>'; |
|
228 | - |
|
229 | - if ( $args['container'] ) { |
|
230 | - $fb_output .= '</' . $args['container'] . '>'; |
|
231 | - } |
|
232 | - |
|
233 | - echo wp_kses_post( $fb_output ); |
|
234 | - } |
|
235 | - } |
|
236 | - |
|
237 | - } |
|
20 | + /** |
|
21 | + * Cleaner Bootstrap walker |
|
22 | + * |
|
23 | + * @package lsx |
|
24 | + * @subpackage navigation |
|
25 | + * @category bootstrap-navigation-walker |
|
26 | + */ |
|
27 | + class LSX_Bootstrap_Navwalker extends Walker_Nav_Menu { |
|
28 | + |
|
29 | + /** |
|
30 | + * Used to append additional content. |
|
31 | + * |
|
32 | + * @see Walker::start_lvl() |
|
33 | + * @since 3.0.0 |
|
34 | + * |
|
35 | + * @param string $output Passed by reference. Used to append additional content. |
|
36 | + * @param int $depth Depth of page. Used for padding. |
|
37 | + */ |
|
38 | + public function start_lvl( &$output, $depth = 0, $args = array() ) { |
|
39 | + $indent = str_repeat( "\t", $depth ); |
|
40 | + $output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n"; |
|
41 | + } |
|
42 | + |
|
43 | + /** |
|
44 | + * Used to append additional content. |
|
45 | + * @param string $item Passed by reference. |
|
46 | + */ |
|
47 | + public function filter_default_pages( &$item ) { |
|
48 | + return $item; |
|
49 | + } |
|
50 | + |
|
51 | + /** |
|
52 | + * @see Walker::start_el() |
|
53 | + * @since 3.0.0 |
|
54 | + * |
|
55 | + * @param string $output Passed by reference. Used to append additional content. |
|
56 | + * @param object $item Menu item data object. |
|
57 | + * @param int $depth Depth of menu item. Used for padding. |
|
58 | + * @param int $current_page Menu item ID. |
|
59 | + * @param object $args |
|
60 | + */ |
|
61 | + public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { |
|
62 | + $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; |
|
63 | + |
|
64 | + /** |
|
65 | + * If this is a default menu being called we need to fix |
|
66 | + * the item object thats coming through. |
|
67 | + */ |
|
68 | + if ( ! isset( $item->title ) ) { |
|
69 | + return; |
|
70 | + } |
|
71 | + |
|
72 | + /** |
|
73 | + * Dividers, Headers or Disabled |
|
74 | + * ============================= |
|
75 | + * Determine whether the item is a Divider, Header, Disabled or regular |
|
76 | + * menu item. To prevent errors we use the strcasecmp() function to so a |
|
77 | + * comparison that is not case sensitive. The strcasecmp() function returns |
|
78 | + * a 0 if the strings are equal. |
|
79 | + */ |
|
80 | + if ( 0 == strcasecmp( $item->attr_title, 'divider' ) && 1 === $depth ) { |
|
81 | + $output .= $indent . '<li role="presentation" class="divider">'; |
|
82 | + } elseif ( 0 == strcasecmp( $item->title, 'divider' ) && 1 === $depth ) { |
|
83 | + $output .= $indent . '<li role="presentation" class="divider">'; |
|
84 | + } elseif ( 0 == strcasecmp( $item->attr_title, 'dropdown-header' ) && 1 === $depth ) { |
|
85 | + $output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title ); |
|
86 | + } elseif ( 0 == strcasecmp( $item->attr_title, 'disabled' ) ) { |
|
87 | + $output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>'; |
|
88 | + } else { |
|
89 | + $class_names = ''; |
|
90 | + $value = ''; |
|
91 | + |
|
92 | + $classes = empty( $item->classes ) ? array() : (array) $item->classes; |
|
93 | + $classes[] = 'menu-item-' . $item->ID; |
|
94 | + |
|
95 | + $classes = apply_filters( 'lsx_nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ); |
|
96 | + |
|
97 | + $class_names = join( ' ', $classes ); |
|
98 | + |
|
99 | + if ( $args->has_children ) |
|
100 | + $class_names .= ' dropdown'; |
|
101 | + |
|
102 | + if ( in_array( 'current-menu-item', $classes ) ) |
|
103 | + $class_names .= ' active'; |
|
104 | + |
|
105 | + if ( in_array( 'current-menu-parent', $classes ) ) |
|
106 | + $class_names .= ' active'; |
|
107 | + |
|
108 | + //Check if this is ment to be a "social" type menu |
|
109 | + $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; |
|
110 | + |
|
111 | + $id = apply_filters( 'nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args ); |
|
112 | + $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; |
|
113 | + |
|
114 | + $output .= $indent . '<li' . $id . $value . $class_names . '>'; |
|
115 | + |
|
116 | + $atts = array(); |
|
117 | + $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : $item->title; |
|
118 | + $atts['target'] = ! empty( $item->target ) ? $item->target : ''; |
|
119 | + $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : ''; |
|
120 | + |
|
121 | + // If item has_children add atts to a. |
|
122 | + if ( $args->has_children ) { |
|
123 | + $atts['href'] = ! empty( $item->url ) ? $item->url : ''; |
|
124 | + $atts['data-toggle'] = 'dropdown'; |
|
125 | + $atts['class'] = 'dropdown-toggle'; |
|
126 | + $atts['aria-haspopup'] = 'true'; |
|
127 | + } else { |
|
128 | + $atts['href'] = ! empty( $item->url ) ? $item->url : ''; |
|
129 | + } |
|
130 | + |
|
131 | + $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args ); |
|
132 | + |
|
133 | + $attributes = ''; |
|
134 | + foreach ( $atts as $attr => $value ) { |
|
135 | + if ( ! empty( $value ) ) { |
|
136 | + $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); |
|
137 | + $attributes .= ' ' . $attr . '="' . $value . '"'; |
|
138 | + } |
|
139 | + } |
|
140 | + |
|
141 | + $item_output = $args->before; |
|
142 | + |
|
143 | + $item_output .= '<a' . $attributes . '>'; |
|
144 | + $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; |
|
145 | + $item_output .= ( $args->has_children && 0 === $depth ) ? ' <span class="caret"></span></a>' : '</a>'; |
|
146 | + $item_output .= $args->after; |
|
147 | + |
|
148 | + $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); |
|
149 | + } |
|
150 | + } |
|
151 | + |
|
152 | + /** |
|
153 | + * Traverse elements to create list from elements. |
|
154 | + * |
|
155 | + * Display one element if the element doesn't have any children otherwise, |
|
156 | + * display the element and its children. Will only traverse up to the max |
|
157 | + * depth and no ignore elements under that depth. |
|
158 | + * |
|
159 | + * This method shouldn't be called directly, use the walk() method instead. |
|
160 | + * |
|
161 | + * @see Walker::start_el() |
|
162 | + * @since 2.5.0 |
|
163 | + * |
|
164 | + * @param object $element Data object |
|
165 | + * @param array $children_elements List of elements to continue traversing. |
|
166 | + * @param int $max_depth Max depth to traverse. |
|
167 | + * @param int $depth Depth of current element. |
|
168 | + * @param array $args |
|
169 | + * @param string $output Passed by reference. Used to append additional content. |
|
170 | + * @return null Null on failure with no changes to parameters. |
|
171 | + */ |
|
172 | + public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { |
|
173 | + if ( ! $element ) { |
|
174 | + return; |
|
175 | + } |
|
176 | + |
|
177 | + $id_field = $this->db_fields['id']; |
|
178 | + |
|
179 | + if ( is_object( $args[0] ) ) { |
|
180 | + $args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] ); |
|
181 | + } |
|
182 | + |
|
183 | + parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * Menu Fallback |
|
188 | + * ============= |
|
189 | + * If this function is assigned to the wp_nav_menu's fallback_cb variable |
|
190 | + * and a manu has not been assigned to the theme location in the WordPress |
|
191 | + * menu manager the function with display nothing to a non-logged in user, |
|
192 | + * and will add a link to the WordPress menu manager if logged in as an admin. |
|
193 | + * |
|
194 | + * @param array $args passed from the wp_nav_menu function. |
|
195 | + * |
|
196 | + */ |
|
197 | + public static function fallback( $args ) { |
|
198 | + if ( current_user_can( 'manage_options' ) ) { |
|
199 | + $fb_output = null; |
|
200 | + |
|
201 | + if ( $args['container'] ) { |
|
202 | + $fb_output = '<' . $args['container']; |
|
203 | + |
|
204 | + if ( $args['container_id'] ) { |
|
205 | + $fb_output .= ' id="' . $args['container_id'] . '"'; |
|
206 | + } |
|
207 | + |
|
208 | + if ( $args['container_class'] ) { |
|
209 | + $fb_output .= ' class="' . $args['container_class'] . '"'; |
|
210 | + } |
|
211 | + |
|
212 | + $fb_output .= '>'; |
|
213 | + } |
|
214 | + |
|
215 | + $fb_output .= '<ul'; |
|
216 | + |
|
217 | + if ( $args['menu_id'] ) { |
|
218 | + $fb_output .= ' id="' . $args['menu_id'] . '"'; |
|
219 | + } |
|
220 | + |
|
221 | + if ( $args['menu_class'] ) { |
|
222 | + $fb_output .= ' class="' . $args['menu_class'] . '"'; |
|
223 | + } |
|
224 | + |
|
225 | + $fb_output .= '>'; |
|
226 | + $fb_output .= '<li><a href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">' . esc_html__( 'Add a menu', 'lsx' ) . '</a></li>'; |
|
227 | + $fb_output .= '</ul>'; |
|
228 | + |
|
229 | + if ( $args['container'] ) { |
|
230 | + $fb_output .= '</' . $args['container'] . '>'; |
|
231 | + } |
|
232 | + |
|
233 | + echo wp_kses_post( $fb_output ); |
|
234 | + } |
|
235 | + } |
|
236 | + |
|
237 | + } |
|
238 | 238 | |
239 | 239 | endif; |
@@ -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 |
@@ -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' ); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | |
17 | 17 | if ( ! defined( 'ABSPATH' ) ) { |
18 | - die( '-1' ); |
|
18 | + die( '-1' ); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | $posts = tribe_get_related_posts(); |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | <div class="tribe-related-event-info"> |
35 | 35 | <h3 class="tribe-related-events-title"><a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title( $post->ID ); ?></a></h3> |
36 | 36 | <?php |
37 | - if ( Tribe__Events__Main::POSTTYPE === $post->post_type ) { |
|
38 | - echo wp_kses_post( tribe_events_event_schedule_details( $post ) ); |
|
39 | - } |
|
40 | - ?> |
|
37 | + if ( Tribe__Events__Main::POSTTYPE === $post->post_type ) { |
|
38 | + echo wp_kses_post( tribe_events_event_schedule_details( $post ) ); |
|
39 | + } |
|
40 | + ?> |
|
41 | 41 | <a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="moretag"><?php esc_html_e( 'View event', 'lsx' ); ?></a> |
42 | 42 | </div> |
43 | 43 | </li> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
13 | - die( '-1' ); |
|
13 | + die( '-1' ); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | $venue_details = tribe_get_venue_details(); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | <?php esc_html_e( 'Price:', 'lsx' ); ?> |
58 | 58 | <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span> |
59 | 59 | <?php |
60 | - /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
|
61 | - do_action( 'tribe_events_inside_cost' ) |
|
62 | - ?> |
|
60 | + /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
|
61 | + do_action( 'tribe_events_inside_cost' ) |
|
62 | + ?> |
|
63 | 63 | </div> |
64 | 64 | <?php endif; ?> |
65 | 65 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
13 | - die( '-1' ); |
|
13 | + die( '-1' ); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | $venue_details = tribe_get_venue_details(); |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | <!-- Venue Display Info --> |
51 | 51 | <div class="tribe-events-venue-details"> |
52 | 52 | <?php |
53 | - $address_delimiter = empty( $venue_address ) ? ' ' : ', '; |
|
53 | + $address_delimiter = empty( $venue_address ) ? ' ' : ', '; |
|
54 | 54 | |
55 | - // These details are already escaped in various ways earlier in the code. |
|
56 | - echo implode( $address_delimiter, $venue_details ); |
|
57 | - ?> |
|
55 | + // These details are already escaped in various ways earlier in the code. |
|
56 | + echo implode( $address_delimiter, $venue_details ); |
|
57 | + ?> |
|
58 | 58 | </div> <!-- .tribe-events-venue-details --> |
59 | 59 | <?php endif; ?> |
60 | 60 | |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | <?php esc_html_e( 'Price:', 'lsx' ); ?> |
66 | 66 | <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span> |
67 | 67 | <?php |
68 | - /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
|
69 | - do_action( 'tribe_events_inside_cost' ) |
|
70 | - ?> |
|
68 | + /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
|
69 | + do_action( 'tribe_events_inside_cost' ) |
|
70 | + ?> |
|
71 | 71 | </div> |
72 | 72 | <?php endif; ?> |
73 | 73 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
13 | - die( '-1' ); |
|
13 | + die( '-1' ); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | // Setup an array of venue details for use later in the template. |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | <div class="tribe-events-venue-details"> |
54 | 54 | <?php echo wp_kses_post( implode( ', ', $venue_details ) ); ?> |
55 | 55 | <?php |
56 | - if ( tribe_show_google_map_link() ) { |
|
57 | - echo wp_kses_post( tribe_get_map_link_html() ); |
|
58 | - } |
|
59 | - ?> |
|
56 | + if ( tribe_show_google_map_link() ) { |
|
57 | + echo wp_kses_post( tribe_get_map_link_html() ); |
|
58 | + } |
|
59 | + ?> |
|
60 | 60 | </div> <!-- .tribe-events-venue-details --> |
61 | 61 | <?php endif; ?> |
62 | 62 | |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | <?php esc_html_e( 'Price:', 'lsx' ); ?> |
71 | 71 | <span class="ticket-cost"><?php echo esc_html( tribe_get_cost( null, true ) ); ?></span> |
72 | 72 | <?php |
73 | - /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
|
74 | - do_action( 'tribe_events_inside_cost' ) |
|
75 | - ?> |
|
73 | + /** This action is documented in the-events-calendar/src/views/list/single-event.php */ |
|
74 | + do_action( 'tribe_events_inside_cost' ) |
|
75 | + ?> |
|
76 | 76 | </div> |
77 | 77 | <?php endif; ?> |
78 | 78 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if ( ! defined( 'ABSPATH' ) ) { |
13 | - die( '-1' ); |
|
13 | + die( '-1' ); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | // Setup an array of venue details for use later in the template. |
@@ -54,15 +54,15 @@ discard block |
||
54 | 54 | <!-- Venue Display Info --> |
55 | 55 | <div class="tribe-events-venue-details"> |
56 | 56 | <?php |
57 | - $address_delimiter = empty( $venue_address ) ? ' ' : ', '; |
|
57 | + $address_delimiter = empty( $venue_address ) ? ' ' : ', '; |
|
58 | 58 | |
59 | - // These details are already escaped in various ways earlier in the process. |
|
60 | - echo implode( $address_delimiter, $venue_details ); |
|
59 | + // These details are already escaped in various ways earlier in the process. |
|
60 | + echo implode( $address_delimiter, $venue_details ); |
|
61 | 61 | |
62 | - if ( tribe_show_google_map_link() ) { |
|
63 | - echo wp_kses_post( tribe_get_map_link_html() ); |
|
64 | - } |
|
65 | - ?> |
|
62 | + if ( tribe_show_google_map_link() ) { |
|
63 | + echo wp_kses_post( tribe_get_map_link_html() ); |
|
64 | + } |
|
65 | + ?> |
|
66 | 66 | </div> <!-- .tribe-events-venue-details --> |
67 | 67 | <?php endif; ?> |
68 | 68 | |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | <?php esc_html_e( 'Price:', 'lsx' ); ?> |
76 | 76 | <span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span> |
77 | 77 | <?php |
78 | - /** |
|
79 | - * Runs after cost is displayed in list style views |
|
80 | - * |
|
81 | - * @since 4.5 |
|
82 | - */ |
|
83 | - do_action( 'tribe_events_inside_cost' ) |
|
84 | - ?> |
|
78 | + /** |
|
79 | + * Runs after cost is displayed in list style views |
|
80 | + * |
|
81 | + * @since 4.5 |
|
82 | + */ |
|
83 | + do_action( 'tribe_events_inside_cost' ) |
|
84 | + ?> |
|
85 | 85 | </div> |
86 | 86 | <?php endif; ?> |
87 | 87 |
@@ -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 |
@@ -46,13 +46,13 @@ |
||
46 | 46 | |
47 | 47 | <p> |
48 | 48 | <?php |
49 | - printf( |
|
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' ), |
|
52 | - '<a href="https://wordpress.org/themes/lsx" target="_blank rel="noopener noreferrer">', |
|
53 | - '</a>' |
|
54 | - ); |
|
55 | - ?> |
|
49 | + printf( |
|
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' ), |
|
52 | + '<a href="https://wordpress.org/themes/lsx" target="_blank rel="noopener noreferrer">', |
|
53 | + '</a>' |
|
54 | + ); |
|
55 | + ?> |
|
56 | 56 | </p> |
57 | 57 | |
58 | 58 | <div class="more-button"> |