@@ -103,7 +103,7 @@ |
||
103 | 103 | * @param array $instance The settings for this instance. |
104 | 104 | * @return void |
105 | 105 | */ |
106 | - public function form( $instance ) { |
|
106 | + public function form( $instance ) { |
|
107 | 107 | |
108 | 108 | /* Set up some default widget settings. */ |
109 | 109 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @param array $instance The settings for this instance. |
115 | 115 | * @return void |
116 | 116 | */ |
117 | - public function form( $instance ) { |
|
117 | + public function form( $instance ) { |
|
118 | 118 | |
119 | 119 | /* Set up some default widget settings. */ |
120 | 120 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | $post_args = array( 'post_type' => 'lesson', |
169 | 169 | 'posts_per_page' => intval( $instance[ 'limit' ] ), |
170 | 170 | 'orderby' => 'menu_order date', |
171 | - 'order' => 'DESC', |
|
172 | - 'post_status' => 'publish', |
|
171 | + 'order' => 'DESC', |
|
172 | + 'post_status' => 'publish', |
|
173 | 173 | 'suppress_filters' => 0 |
174 | 174 | ); |
175 | 175 | $posts_array = get_posts( $post_args ); |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | if ( count( $posts_array ) > 0 ) { ?> |
178 | 178 | <ul> |
179 | 179 | <?php foreach ($posts_array as $post_item){ |
180 | - $post_id = absint( $post_item->ID ); |
|
181 | - $post_title = $post_item->post_title; |
|
182 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
183 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
184 | - $author_display_name = $user_info->display_name; |
|
185 | - $author_id = $post_item->post_author; |
|
186 | - $lesson_course_id = get_post_meta( $post_id, '_lesson_course', true ); |
|
187 | - ?> |
|
180 | + $post_id = absint( $post_item->ID ); |
|
181 | + $post_title = $post_item->post_title; |
|
182 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
183 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
184 | + $author_display_name = $user_info->display_name; |
|
185 | + $author_id = $post_item->post_author; |
|
186 | + $lesson_course_id = get_post_meta( $post_id, '_lesson_course', true ); |
|
187 | + ?> |
|
188 | 188 | <li class="fix"> |
189 | 189 | <?php do_action( 'sensei_lesson_image', $post_id, '100', '100', false, true ); ?> |
190 | 190 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @param array $instance The settings for this instance. |
107 | 107 | * @return void |
108 | 108 | */ |
109 | - public function form( $instance ) { |
|
109 | + public function form( $instance ) { |
|
110 | 110 | |
111 | 111 | /* Set up some default widget settings. */ |
112 | 112 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | $post_args = array( 'post_type' => 'course', |
154 | 154 | 'posts_per_page' => intval( $instance[ 'limit' ] ), |
155 | 155 | 'orderby' => 'menu_order date', |
156 | - 'order' => 'ASC', |
|
157 | - 'post_status' => 'publish', |
|
156 | + 'order' => 'ASC', |
|
157 | + 'post_status' => 'publish', |
|
158 | 158 | 'suppress_filters' => 0, |
159 | 159 | ); |
160 | 160 | |
@@ -171,13 +171,13 @@ discard block |
||
171 | 171 | if ( count( $posts_array ) > 0 ) { ?> |
172 | 172 | <ul> |
173 | 173 | <?php foreach ($posts_array as $post_item){ |
174 | - $post_id = absint( $post_item->ID ); |
|
175 | - $post_title = $post_item->post_title; |
|
176 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
177 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
178 | - $author_display_name = $user_info->display_name; |
|
179 | - $author_id = $post_item->post_author; |
|
180 | - ?> |
|
174 | + $post_id = absint( $post_item->ID ); |
|
175 | + $post_title = $post_item->post_title; |
|
176 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
177 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
178 | + $author_display_name = $user_info->display_name; |
|
179 | + $author_id = $post_item->post_author; |
|
180 | + ?> |
|
181 | 181 | <li class="fix"> |
182 | 182 | <?php do_action( 'sensei_course_image', $post_id ); ?> |
183 | 183 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | remove_filter( 'pre_get_posts', 'sensei_course_archive_filter', 10, 1 ); |
65 | 65 | |
66 | 66 | if ( in_array( $instance['component'], array_keys( $this->woo_widget_componentslist ) ) |
67 | - && ( 'activecourses' == $instance['component'] || 'completedcourses' == $instance['component'] ) |
|
68 | - && !is_user_logged_in() ) { |
|
67 | + && ( 'activecourses' == $instance['component'] || 'completedcourses' == $instance['component'] ) |
|
68 | + && !is_user_logged_in() ) { |
|
69 | 69 | |
70 | 70 | // No Output |
71 | - return; |
|
71 | + return; |
|
72 | 72 | |
73 | 73 | } else { |
74 | 74 | /* Our variables from the widget settings. */ |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * @param array $instance The settings for this instance. |
131 | 131 | * @return void |
132 | 132 | */ |
133 | - public function form( $instance ) { |
|
133 | + public function form( $instance ) { |
|
134 | 134 | |
135 | 135 | /* Set up some default widget settings. */ |
136 | 136 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | /** |
169 | 169 | * Load the desired component, if a method is available for it. |
170 | 170 | * @param string $component The component to potentially be loaded. |
171 | - * |
|
171 | + * |
|
172 | 172 | * @since 1.0.0 |
173 | 173 | * @return void |
174 | 174 | */ |
@@ -207,24 +207,24 @@ discard block |
||
207 | 207 | |
208 | 208 | } |
209 | 209 | |
210 | - if ( ! empty( $course_ids ) ) { |
|
210 | + if ( ! empty( $course_ids ) ) { |
|
211 | 211 | |
212 | - $posts_array = Sensei()->course->course_query( intval( $instance['limit'] ), esc_attr( $instance['component'] ), $course_ids ); |
|
212 | + $posts_array = Sensei()->course->course_query( intval( $instance['limit'] ), esc_attr( $instance['component'] ), $course_ids ); |
|
213 | 213 | |
214 | 214 | } else { |
215 | 215 | |
216 | - if ( 'activecourses' == esc_attr( $instance['component'] ) || 'completedcourses' == esc_attr( $instance['component'] ) ) { |
|
216 | + if ( 'activecourses' == esc_attr( $instance['component'] ) || 'completedcourses' == esc_attr( $instance['component'] ) ) { |
|
217 | 217 | $posts_array = array(); |
218 | 218 | |
219 | - } else { |
|
219 | + } else { |
|
220 | 220 | |
221 | - $course_args = array( |
|
222 | - 'post_type' => 'course', |
|
223 | - 'orderby' => 'date', |
|
224 | - 'order' => 'DESC', |
|
225 | - 'post_status' => 'publish', |
|
226 | - 'posts_per_page' => $instance['limit'], |
|
227 | - ); |
|
221 | + $course_args = array( |
|
222 | + 'post_type' => 'course', |
|
223 | + 'orderby' => 'date', |
|
224 | + 'order' => 'DESC', |
|
225 | + 'post_status' => 'publish', |
|
226 | + 'posts_per_page' => $instance['limit'], |
|
227 | + ); |
|
228 | 228 | |
229 | 229 | $posts_array = get_posts( $course_args ); |
230 | 230 | } |
@@ -234,13 +234,13 @@ discard block |
||
234 | 234 | if ( count( $posts_array ) > 0 ) { ?> |
235 | 235 | <ul> |
236 | 236 | <?php foreach ($posts_array as $post_item){ |
237 | - $post_id = absint( $post_item->ID ); |
|
238 | - $post_title = $post_item->post_title; |
|
239 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
240 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
241 | - $author_display_name = $user_info->display_name; |
|
242 | - $author_id = $post_item->post_author; |
|
243 | - ?> |
|
237 | + $post_id = absint( $post_item->ID ); |
|
238 | + $post_title = $post_item->post_title; |
|
239 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
240 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
241 | + $author_display_name = $user_info->display_name; |
|
242 | + $author_id = $post_item->post_author; |
|
243 | + ?> |
|
244 | 244 | <li class="fix"> |
245 | 245 | <?php do_action( 'sensei_course_image', $post_id ); ?> |
246 | 246 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |
@@ -255,9 +255,9 @@ discard block |
||
255 | 255 | </li> |
256 | 256 | <?php } // End For Loop ?> |
257 | 257 | <?php if ( 'activecourses' == esc_attr( $instance['component'] ) || 'completedcourses' == esc_attr( $instance['component'] ) ) { |
258 | - $my_account_page_id = intval( Sensei()->settings->settings[ 'my_course_page' ] ); |
|
259 | - echo '<li class="my-account fix"><a href="'. esc_url( get_permalink( $my_account_page_id ) ) .'">'.__('My Courses', 'woothemes-sensei').' <span class="meta-nav"></span></a></li>'; |
|
260 | - } // End If Statement ?> |
|
258 | + $my_account_page_id = intval( Sensei()->settings->settings[ 'my_course_page' ] ); |
|
259 | + echo '<li class="my-account fix"><a href="'. esc_url( get_permalink( $my_account_page_id ) ) .'">'.__('My Courses', 'woothemes-sensei').' <span class="meta-nav"></span></a></li>'; |
|
260 | + } // End If Statement ?> |
|
261 | 261 | </ul> |
262 | 262 | <?php } else { |
263 | 263 | // No posts returned. This means the user either has no active or no completed courses. |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * Content-lesson.php template file |
|
5 | - * |
|
6 | - * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
7 | - * |
|
8 | - * For single lesson content please see single-lesson.php |
|
9 | - * |
|
10 | - * @author Automattic |
|
11 | - * @package Sensei |
|
12 | - * @category Templates |
|
13 | - * @version 1.9.0 |
|
14 | - */ |
|
4 | + * Content-lesson.php template file |
|
5 | + * |
|
6 | + * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
7 | + * |
|
8 | + * For single lesson content please see single-lesson.php |
|
9 | + * |
|
10 | + * @author Automattic |
|
11 | + * @package Sensei |
|
12 | + * @category Templates |
|
13 | + * @version 1.9.0 |
|
14 | + */ |
|
15 | 15 | ?> |
16 | 16 | |
17 | 17 | <article <?php post_class( get_the_ID() ); ?> > |
@@ -19,32 +19,32 @@ discard block |
||
19 | 19 | <section class="lesson-content"> |
20 | 20 | |
21 | 21 | <?php |
22 | - /** |
|
23 | - * sensei_content_lesson_before |
|
24 | - * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
25 | - * content.php template. This applies to the specific post type that you've targeted. |
|
26 | - * |
|
27 | - * @since 1.9.0 |
|
28 | - * @param string $post_id |
|
29 | - */ |
|
30 | - do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
31 | - ?> |
|
22 | + /** |
|
23 | + * sensei_content_lesson_before |
|
24 | + * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
25 | + * content.php template. This applies to the specific post type that you've targeted. |
|
26 | + * |
|
27 | + * @since 1.9.0 |
|
28 | + * @param string $post_id |
|
29 | + */ |
|
30 | + do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
31 | + ?> |
|
32 | 32 | |
33 | 33 | <section class="entry"> |
34 | 34 | |
35 | 35 | <?php |
36 | - /** |
|
37 | - * Fires just before the post content in the content-lesson.php file. |
|
38 | - * |
|
39 | - * @since 1.9.0 |
|
40 | - * |
|
41 | - * @hooked Sensei()->modules->module_archive_description - 11 |
|
42 | - * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
43 | - * |
|
44 | - * @param string $post_id |
|
45 | - */ |
|
46 | - do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
47 | - ?> |
|
36 | + /** |
|
37 | + * Fires just before the post content in the content-lesson.php file. |
|
38 | + * |
|
39 | + * @since 1.9.0 |
|
40 | + * |
|
41 | + * @hooked Sensei()->modules->module_archive_description - 11 |
|
42 | + * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
43 | + * |
|
44 | + * @param string $post_id |
|
45 | + */ |
|
46 | + do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
47 | + ?> |
|
48 | 48 | |
49 | 49 | <p class="lesson-excerpt"> |
50 | 50 | |
@@ -53,28 +53,28 @@ discard block |
||
53 | 53 | </p> |
54 | 54 | |
55 | 55 | <?php |
56 | - /** |
|
57 | - * Fires just after the post content in the lesson-content.php file. |
|
58 | - * |
|
59 | - * @since 1.9.0 |
|
60 | - * |
|
61 | - * @param string $post_id |
|
62 | - */ |
|
63 | - do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
64 | - ?> |
|
56 | + /** |
|
57 | + * Fires just after the post content in the lesson-content.php file. |
|
58 | + * |
|
59 | + * @since 1.9.0 |
|
60 | + * |
|
61 | + * @param string $post_id |
|
62 | + */ |
|
63 | + do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
64 | + ?> |
|
65 | 65 | |
66 | 66 | </section> <!-- section .entry --> |
67 | 67 | |
68 | 68 | <?php |
69 | - /** |
|
70 | - * This action runs after the sensei lesson content. It runs inside the sensei |
|
71 | - * lesson-content.php template. |
|
72 | - * |
|
73 | - * @since 1.9.0 |
|
74 | - * @param string $post_id |
|
75 | - */ |
|
76 | - do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
77 | - ?> |
|
69 | + /** |
|
70 | + * This action runs after the sensei lesson content. It runs inside the sensei |
|
71 | + * lesson-content.php template. |
|
72 | + * |
|
73 | + * @since 1.9.0 |
|
74 | + * @param string $post_id |
|
75 | + */ |
|
76 | + do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
77 | + ?> |
|
78 | 78 | |
79 | 79 | </section> <!-- article .lesson-content --> |
80 | 80 |
@@ -1,29 +1,29 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Template for displaying lesson archives, including the lesson page template. |
|
4 | - * This template also handels the lesson modules taxonomy and the lessons_tag taxonomy. |
|
5 | - * |
|
6 | - * Override this template by copying it to your_theme/sensei/archive-lesson.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
3 | + * The Template for displaying lesson archives, including the lesson page template. |
|
4 | + * This template also handels the lesson modules taxonomy and the lessons_tag taxonomy. |
|
5 | + * |
|
6 | + * Override this template by copying it to your_theme/sensei/archive-lesson.php |
|
7 | + * |
|
8 | + * @author Automattic |
|
9 | + * @package Sensei |
|
10 | + * @category Templates |
|
11 | + * @version 1.9.0 |
|
12 | + */ |
|
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <?php get_sensei_header(); ?> |
16 | 16 | |
17 | 17 | <?php |
18 | 18 | |
19 | - /** |
|
20 | - * Action before lesson archive loop. This action runs within the archive-lesson.php. |
|
21 | - * |
|
22 | - * It will be executed even if there are no posts on the archive page. |
|
23 | - */ |
|
24 | - do_action( 'sensei_archive_before_lesson_loop' ); |
|
19 | + /** |
|
20 | + * Action before lesson archive loop. This action runs within the archive-lesson.php. |
|
21 | + * |
|
22 | + * It will be executed even if there are no posts on the archive page. |
|
23 | + */ |
|
24 | + do_action( 'sensei_archive_before_lesson_loop' ); |
|
25 | 25 | |
26 | - ?> |
|
26 | + ?> |
|
27 | 27 | |
28 | 28 | <?php if ( have_posts() ): ?> |
29 | 29 | |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | |
38 | 38 | <?php |
39 | 39 | |
40 | - /** |
|
41 | - * Action after lesson archive loop on the archive-lesson.php template file |
|
42 | - * It will be executed even if there are no posts on the archive page. |
|
43 | - * |
|
44 | - * @since 1.9.0 |
|
45 | - */ |
|
46 | - do_action( 'sensei_archive_after_lesson_loop' ); |
|
47 | - ?> |
|
40 | + /** |
|
41 | + * Action after lesson archive loop on the archive-lesson.php template file |
|
42 | + * It will be executed even if there are no posts on the archive page. |
|
43 | + * |
|
44 | + * @since 1.9.0 |
|
45 | + */ |
|
46 | + do_action( 'sensei_archive_after_lesson_loop' ); |
|
47 | + ?> |
|
48 | 48 | <?php get_sensei_footer(); ?> |
@@ -1,65 +1,65 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for outputting Lesson Archive items |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/loop-lesson.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
4 | + * The Template for outputting Lesson Archive items |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/loop-lesson.php |
|
7 | + * |
|
8 | + * @author Automattic |
|
9 | + * @package Sensei |
|
10 | + * @category Templates |
|
11 | + * @version 1.9.0 |
|
12 | + */ |
|
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <?php |
16 | 16 | /** |
17 | - * This runs before the post type items in the loop-lesson.php template. |
|
18 | - * |
|
19 | - * @since 1.9 |
|
20 | - */ |
|
17 | + * This runs before the post type items in the loop-lesson.php template. |
|
18 | + * |
|
19 | + * @since 1.9 |
|
20 | + */ |
|
21 | 21 | do_action( 'sensei_loop_lesson_before' ); |
22 | 22 | ?> |
23 | 23 | |
24 | 24 | <section class="lesson-container" > |
25 | 25 | |
26 | 26 | <?php |
27 | - /** |
|
28 | - * This runs before the lesson items in the loop-lesson.php template. |
|
29 | - * |
|
30 | - * @since 1.9.0 |
|
31 | - * |
|
32 | - * @hooked Sensei()->lesson->lesson_tag_archive_description - 11 |
|
33 | - * @hooked Sensei()->lesson->the_archive_header - 20 |
|
34 | - */ |
|
35 | - do_action( 'sensei_loop_lesson_inside_before' ); |
|
36 | - ?> |
|
27 | + /** |
|
28 | + * This runs before the lesson items in the loop-lesson.php template. |
|
29 | + * |
|
30 | + * @since 1.9.0 |
|
31 | + * |
|
32 | + * @hooked Sensei()->lesson->lesson_tag_archive_description - 11 |
|
33 | + * @hooked Sensei()->lesson->the_archive_header - 20 |
|
34 | + */ |
|
35 | + do_action( 'sensei_loop_lesson_inside_before' ); |
|
36 | + ?> |
|
37 | 37 | |
38 | 38 | |
39 | 39 | <?php |
40 | - //Loop through all lessons |
|
41 | - while ( have_posts() ) { the_post(); |
|
40 | + //Loop through all lessons |
|
41 | + while ( have_posts() ) { the_post(); |
|
42 | 42 | |
43 | - sensei_load_template_part( 'content', 'lesson' ); |
|
43 | + sensei_load_template_part( 'content', 'lesson' ); |
|
44 | 44 | |
45 | - } |
|
46 | - ?> |
|
45 | + } |
|
46 | + ?> |
|
47 | 47 | |
48 | 48 | <?php |
49 | - /** |
|
50 | - * This runs inside the <ul> after the lesson items in the loop-lesson.php template. |
|
51 | - * |
|
52 | - * @since 1.9.0 |
|
53 | - */ |
|
54 | - do_action( 'sensei_loop_lesson_inside_after' ); |
|
55 | - ?> |
|
49 | + /** |
|
50 | + * This runs inside the <ul> after the lesson items in the loop-lesson.php template. |
|
51 | + * |
|
52 | + * @since 1.9.0 |
|
53 | + */ |
|
54 | + do_action( 'sensei_loop_lesson_inside_after' ); |
|
55 | + ?> |
|
56 | 56 | |
57 | 57 | </section> |
58 | 58 | |
59 | 59 | <?php |
60 | 60 | /** |
61 | - * This runs after the lesson items <ul> in the loop-lesson.php template. |
|
62 | - * |
|
63 | - * @since 1.9.0 |
|
64 | - */ |
|
61 | + * This runs after the lesson items <ul> in the loop-lesson.php template. |
|
62 | + * |
|
63 | + * @since 1.9.0 |
|
64 | + */ |
|
65 | 65 | do_action( 'sensei_loop_lesson_after' ); |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * Pagination - Lesson |
|
5 | - * |
|
6 | - * @author Automattic |
|
7 | - * @package Sensei |
|
8 | - * @category Templates |
|
9 | - * @version 1.9.0 |
|
10 | - */ |
|
4 | + * Pagination - Lesson |
|
5 | + * |
|
6 | + * @author Automattic |
|
7 | + * @package Sensei |
|
8 | + * @category Templates |
|
9 | + * @version 1.9.0 |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | global $post; |
13 | 13 | $nav_id_array = sensei_get_prev_next_lessons( $post->ID ); |
@@ -13,23 +13,23 @@ |
||
13 | 13 | global $wp_query; |
14 | 14 | |
15 | 15 | if ( $wp_query->max_num_pages <= 1 ) { |
16 | - return; |
|
16 | + return; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | ?> |
20 | 20 | <nav class="sensei-pagination"> |
21 | 21 | <?php |
22 | - echo paginate_links( apply_filters( 'sensei_pagination_args', array( |
|
23 | - 'base' => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ), |
|
24 | - 'format' => '', |
|
25 | - 'add_args' => '', |
|
26 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
27 | - 'total' => $wp_query->max_num_pages, |
|
28 | - 'prev_text' => '←', |
|
29 | - 'next_text' => '→', |
|
30 | - 'type' => 'list', |
|
31 | - 'end_size' => 3, |
|
32 | - 'mid_size' => 3 |
|
33 | - ) ) ); |
|
34 | - ?> |
|
22 | + echo paginate_links( apply_filters( 'sensei_pagination_args', array( |
|
23 | + 'base' => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ), |
|
24 | + 'format' => '', |
|
25 | + 'add_args' => '', |
|
26 | + 'current' => max( 1, get_query_var( 'paged' ) ), |
|
27 | + 'total' => $wp_query->max_num_pages, |
|
28 | + 'prev_text' => '←', |
|
29 | + 'next_text' => '→', |
|
30 | + 'type' => 'list', |
|
31 | + 'end_size' => 3, |
|
32 | + 'mid_size' => 3 |
|
33 | + ) ) ); |
|
34 | + ?> |
|
35 | 35 | </nav> |