@@ -10,8 +10,8 @@ |
||
10 | 10 | * @author WooThemes |
11 | 11 | * @since 1.0.0 |
12 | 12 | */ |
13 | -if( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) exit(); |
|
13 | +if ( ! defined('WP_UNINSTALL_PLUGIN')) exit(); |
|
14 | 14 | |
15 | 15 | $token = 'woothemes-sensei'; |
16 | -delete_option( 'skip_install_sensei_pages' ); |
|
17 | -delete_option( 'sensei_installed' ); |
|
18 | 16 | \ No newline at end of file |
17 | +delete_option('skip_install_sensei_pages'); |
|
18 | +delete_option('sensei_installed'); |
|
19 | 19 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * Content-lesson.php template file |
5 | 5 | * |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | ?> |
16 | 16 | |
17 | -<article <?php post_class( get_the_ID() ); ?> > |
|
17 | +<article <?php post_class(get_the_ID()); ?> > |
|
18 | 18 | |
19 | 19 | <section class="lesson-content"> |
20 | 20 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @since 1.9.0 |
28 | 28 | * @param string $post_id |
29 | 29 | */ |
30 | - do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
30 | + do_action('sensei_content_lesson_before', get_the_ID()); |
|
31 | 31 | ?> |
32 | 32 | |
33 | 33 | <section class="entry"> |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | * @since 1.9.0 |
74 | 74 | * @param string $post_id |
75 | 75 | */ |
76 | - do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
76 | + do_action('sensei_content_lesson_after', get_the_ID()); |
|
77 | 77 | ?> |
78 | 78 | |
79 | 79 | </section> <!-- article .lesson-content --> |
80 | 80 | |
81 | -</article> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'lesson', 'post' ) ) ) ); ?> --> |
|
82 | 81 | \ No newline at end of file |
82 | +</article> <!-- article .(<?php esc_attr_e(join(' ', get_post_class(array('lesson', 'post')))); ?> --> |
|
83 | 83 | \ No newline at end of file |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | ?> |
14 | 14 | |
15 | -<?php get_sensei_header(); ?> |
|
15 | +<?php get_sensei_header(); ?> |
|
16 | 16 | |
17 | 17 | <?php |
18 | 18 | |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | * @since 1.9.0 |
24 | 24 | * |
25 | 25 | */ |
26 | - do_action( 'sensei_teacher_archive_course_loop_before' ); |
|
26 | + do_action('sensei_teacher_archive_course_loop_before'); |
|
27 | 27 | |
28 | 28 | ?> |
29 | 29 | |
30 | - <?php if ( have_posts() ): ?> |
|
30 | + <?php if (have_posts()): ?> |
|
31 | 31 | |
32 | - <?php sensei_load_template( 'loop-course.php' ); ?> |
|
32 | + <?php sensei_load_template('loop-course.php'); ?> |
|
33 | 33 | |
34 | 34 | <?php else: ?> |
35 | 35 | |
36 | - <p><?php _e( 'There are no courses for this teacher.', 'woothemes-sensei' ); ?></p> |
|
36 | + <p><?php _e('There are no courses for this teacher.', 'woothemes-sensei'); ?></p> |
|
37 | 37 | |
38 | 38 | <?php endif; // End If Statement ?> |
39 | 39 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @since 1.9.0 |
47 | 47 | */ |
48 | - do_action( 'sensei_teacher_archive_course_loop_after' ); |
|
48 | + do_action('sensei_teacher_archive_course_loop_after'); |
|
49 | 49 | |
50 | 50 | ?> |
51 | 51 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | ?> |
14 | 14 | |
15 | -<?php get_sensei_header(); ?> |
|
15 | +<?php get_sensei_header(); ?> |
|
16 | 16 | |
17 | 17 | <?php |
18 | 18 | |
@@ -21,17 +21,17 @@ discard block |
||
21 | 21 | * |
22 | 22 | * It will be executed even if there are no posts on the archive page. |
23 | 23 | */ |
24 | - do_action( 'sensei_archive_before_lesson_loop' ); |
|
24 | + do_action('sensei_archive_before_lesson_loop'); |
|
25 | 25 | |
26 | 26 | ?> |
27 | 27 | |
28 | - <?php if ( have_posts() ): ?> |
|
28 | + <?php if (have_posts()): ?> |
|
29 | 29 | |
30 | - <?php sensei_load_template( 'loop-lesson.php' ); ?> |
|
30 | + <?php sensei_load_template('loop-lesson.php'); ?> |
|
31 | 31 | |
32 | 32 | <?php else: ?> |
33 | 33 | |
34 | - <p><?php _e( 'No lessons found that match your selection.', 'woothemes-sensei' ); ?></p> |
|
34 | + <p><?php _e('No lessons found that match your selection.', 'woothemes-sensei'); ?></p> |
|
35 | 35 | |
36 | 36 | <?php endif; // End If Statement ?> |
37 | 37 | |
@@ -43,6 +43,6 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @since 1.9.0 |
45 | 45 | */ |
46 | - do_action( 'sensei_archive_after_lesson_loop' ); |
|
46 | + do_action('sensei_archive_after_lesson_loop'); |
|
47 | 47 | ?> |
48 | 48 | <?php get_sensei_footer(); ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * The Template for outputting Lesson Archive items |
5 | 5 | * |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @since 1.9 |
20 | 20 | */ |
21 | -do_action( 'sensei_loop_lesson_before' ); |
|
21 | +do_action('sensei_loop_lesson_before'); |
|
22 | 22 | ?> |
23 | 23 | |
24 | 24 | <section class="lesson-container" > |
@@ -32,15 +32,15 @@ discard block |
||
32 | 32 | * @hooked Sensei()->lesson->lesson_tag_archive_description - 11 |
33 | 33 | * @hooked Sensei()->lesson->the_archive_header - 20 |
34 | 34 | */ |
35 | - do_action( 'sensei_loop_lesson_inside_before' ); |
|
35 | + do_action('sensei_loop_lesson_inside_before'); |
|
36 | 36 | ?> |
37 | 37 | |
38 | 38 | |
39 | 39 | <?php |
40 | 40 | //Loop through all lessons |
41 | - while ( have_posts() ) { the_post(); |
|
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 | 45 | } |
46 | 46 | ?> |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @since 1.9.0 |
53 | 53 | */ |
54 | - do_action( 'sensei_loop_lesson_inside_after' ); |
|
54 | + do_action('sensei_loop_lesson_inside_after'); |
|
55 | 55 | ?> |
56 | 56 | |
57 | 57 | </section> |
@@ -62,4 +62,4 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @since 1.9.0 |
64 | 64 | */ |
65 | -do_action( 'sensei_loop_lesson_after' ); |
|
65 | +do_action('sensei_loop_lesson_after'); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * Pagination - Lesson |
5 | 5 | * |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | global $post; |
13 | -$nav_id_array = sensei_get_prev_next_lessons( $post->ID ); |
|
14 | -$previous_lesson_id = absint( $nav_id_array['prev_lesson'] ); |
|
15 | -$next_lesson_id = absint( $nav_id_array['next_lesson'] ); |
|
13 | +$nav_id_array = sensei_get_prev_next_lessons($post->ID); |
|
14 | +$previous_lesson_id = absint($nav_id_array['prev_lesson']); |
|
15 | +$next_lesson_id = absint($nav_id_array['next_lesson']); |
|
16 | 16 | // Output HTML |
17 | -if ( ( 0 < $previous_lesson_id ) || ( 0 < $next_lesson_id ) ) { ?> |
|
17 | +if ((0 < $previous_lesson_id) || (0 < $next_lesson_id)) { ?> |
|
18 | 18 | <nav id="post-entries" class="post-entries fix"> |
19 | - <?php if ( 0 < $previous_lesson_id ) { ?><div class="nav-prev fl"><a href="<?php echo esc_url( get_permalink( $previous_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $previous_lesson_id ); ?></a></div><?php } ?> |
|
20 | - <?php if ( 0 < $next_lesson_id ) { ?><div class="nav-next fr"><a href="<?php echo esc_url( get_permalink( $next_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $next_lesson_id ); ?></a></div><?php } ?> |
|
19 | + <?php if (0 < $previous_lesson_id) { ?><div class="nav-prev fl"><a href="<?php echo esc_url(get_permalink($previous_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($previous_lesson_id); ?></a></div><?php } ?> |
|
20 | + <?php if (0 < $next_lesson_id) { ?><div class="nav-next fr"><a href="<?php echo esc_url(get_permalink($next_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($next_lesson_id); ?></a></div><?php } ?> |
|
21 | 21 | </nav><!-- #post-entries --> |
22 | 22 | <?php } ?> |
23 | 23 | \ No newline at end of file |
@@ -7,10 +7,10 @@ |
||
7 | 7 | * @version 1.1.0 |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
10 | +if ( ! defined('ABSPATH')) exit; |
|
11 | 11 | |
12 | 12 | ?> |
13 | 13 | <nav id="post-entries" class="post-entries fix"> |
14 | - <div class="nav-prev fl"><?php previous_post_link( '%link', '<span class="meta-nav"></span> %title' ); ?></div> |
|
15 | - <div class="nav-next fr"><?php next_post_link( '%link', '%title <span class="meta-nav"></span>' ); ?></div> |
|
14 | + <div class="nav-prev fl"><?php previous_post_link('%link', '<span class="meta-nav"></span> %title'); ?></div> |
|
15 | + <div class="nav-next fr"><?php next_post_link('%link', '%title <span class="meta-nav"></span>'); ?></div> |
|
16 | 16 | </nav><!-- #post-entries --> |
17 | 17 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * Pagination - Lesson |
5 | 5 | * |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | global $post; |
12 | -$quiz_lesson = absint( get_post_meta( $post->ID, '_quiz_lesson', true ) ); |
|
13 | -$nav_id_array = sensei_get_prev_next_lessons( $quiz_lesson ); |
|
14 | -$previous_lesson_id = absint( $nav_id_array['prev_lesson'] ); |
|
15 | -$next_lesson_id = absint( $nav_id_array['next_lesson'] ); |
|
12 | +$quiz_lesson = absint(get_post_meta($post->ID, '_quiz_lesson', true)); |
|
13 | +$nav_id_array = sensei_get_prev_next_lessons($quiz_lesson); |
|
14 | +$previous_lesson_id = absint($nav_id_array['prev_lesson']); |
|
15 | +$next_lesson_id = absint($nav_id_array['next_lesson']); |
|
16 | 16 | // Output HTML |
17 | -if ( ( 0 < $previous_lesson_id ) || ( 0 < $next_lesson_id ) ) { ?> |
|
17 | +if ((0 < $previous_lesson_id) || (0 < $next_lesson_id)) { ?> |
|
18 | 18 | <nav id="post-entries" class="post-entries fix"> |
19 | - <?php if ( 0 < $previous_lesson_id ) { ?><div class="nav-prev fl"><a href="<?php echo esc_url( get_permalink( $previous_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $previous_lesson_id ); ?></a></div><?php } ?> |
|
20 | - <?php if ( 0 < $next_lesson_id ) { ?><div class="nav-next fr"><a href="<?php echo esc_url( get_permalink( $next_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $next_lesson_id ); ?></a></div><?php } ?> |
|
19 | + <?php if (0 < $previous_lesson_id) { ?><div class="nav-prev fl"><a href="<?php echo esc_url(get_permalink($previous_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($previous_lesson_id); ?></a></div><?php } ?> |
|
20 | + <?php if (0 < $next_lesson_id) { ?><div class="nav-next fr"><a href="<?php echo esc_url(get_permalink($next_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($next_lesson_id); ?></a></div><?php } ?> |
|
21 | 21 | </nav><!-- #post-entries --> |
22 | 22 | <?php } ?> |
23 | 23 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * Pagination - Show numbered pagination for sensei archives |
5 | 5 | * |
@@ -12,24 +12,24 @@ discard block |
||
12 | 12 | |
13 | 13 | global $wp_query; |
14 | 14 | |
15 | -if ( $wp_query->max_num_pages <= 1 ) { |
|
15 | +if ($wp_query->max_num_pages <= 1) { |
|
16 | 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 ) ) ), |
|
22 | + echo paginate_links(apply_filters('sensei_pagination_args', array( |
|
23 | + 'base' => esc_url_raw(str_replace(999999999, '%#%', get_pagenum_link(999999999, false))), |
|
24 | 24 | 'format' => '', |
25 | 25 | 'add_args' => '', |
26 | - 'current' => max( 1, get_query_var( 'paged' ) ), |
|
26 | + 'current' => max(1, get_query_var('paged')), |
|
27 | 27 | 'total' => $wp_query->max_num_pages, |
28 | 28 | 'prev_text' => '←', |
29 | 29 | 'next_text' => '→', |
30 | 30 | 'type' => 'list', |
31 | 31 | 'end_size' => 3, |
32 | 32 | 'mid_size' => 3 |
33 | - ) ) ); |
|
33 | + ))); |
|
34 | 34 | ?> |
35 | 35 | </nav> |