@@ -6,13 +6,13 @@ discard block |
||
6 | 6 | * @package Sensei/Templates/Emails/HTML |
7 | 7 | * @version 1.6.0 |
8 | 8 | */ |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
|
9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly ?> |
|
10 | 10 | |
11 | 11 | <?php |
12 | 12 | |
13 | 13 | // Get data for email content |
14 | 14 | global $sensei_email_data; |
15 | -extract( $sensei_email_data ); |
|
15 | +extract($sensei_email_data); |
|
16 | 16 | |
17 | 17 | // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
18 | 18 | $small = "text-align: center !important;"; |
@@ -21,20 +21,20 @@ discard block |
||
21 | 21 | |
22 | 22 | ?> |
23 | 23 | |
24 | -<?php do_action( 'sensei_before_email_content', $template ); ?> |
|
24 | +<?php do_action('sensei_before_email_content', $template); ?> |
|
25 | 25 | |
26 | -<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo $commenter_name; ?></h2> |
|
26 | +<h2 style="<?php echo esc_attr($large); ?>"><?php echo $commenter_name; ?></h2> |
|
27 | 27 | |
28 | -<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'has replied to your private message regarding the %1$s', 'woothemes-sensei' ), $content_type ); ?></p> |
|
28 | +<p style="<?php echo esc_attr($small); ?>"><?php printf(__('has replied to your private message regarding the %1$s', 'woothemes-sensei'), $content_type); ?></p> |
|
29 | 29 | |
30 | -<h2 style="<?php echo esc_attr( $large ); ?>"><?php echo $content_title; ?></h2> |
|
30 | +<h2 style="<?php echo esc_attr($large); ?>"><?php echo $content_title; ?></h2> |
|
31 | 31 | |
32 | 32 | <hr/> |
33 | 33 | |
34 | -<?php echo wpautop( $message ); ?> |
|
34 | +<?php echo wpautop($message); ?> |
|
35 | 35 | |
36 | 36 | <hr/> |
37 | 37 | |
38 | -<p style="<?php echo esc_attr( $small ); ?>"><?php printf( __( 'You can view the message and reply %1$shere%2$s.', 'woothemes-sensei' ), '<a href="' . $comment_link . '">', '</a>' ); ?></p> |
|
38 | +<p style="<?php echo esc_attr($small); ?>"><?php printf(__('You can view the message and reply %1$shere%2$s.', 'woothemes-sensei'), '<a href="'.$comment_link.'">', '</a>'); ?></p> |
|
39 | 39 | |
40 | -<?php do_action( 'sensei_after_email_content', $template ); ?> |
|
41 | 40 | \ No newline at end of file |
41 | +<?php do_action('sensei_after_email_content', $template); ?> |
|
42 | 42 | \ No newline at end of file |
@@ -6,7 +6,10 @@ |
||
6 | 6 | * @package Sensei/Templates/Emails/HTML |
7 | 7 | * @version 1.6.0 |
8 | 8 | */ |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
|
9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
10 | + exit; |
|
11 | +} |
|
12 | +// Exit if accessed directly ?> |
|
10 | 13 | |
11 | 14 | <?php |
12 | 15 |
@@ -35,9 +35,9 @@ |
||
35 | 35 | <p style="<?php echo esc_attr( $style_small ); ?>"> |
36 | 36 | <?php |
37 | 37 | |
38 | - echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>'; |
|
38 | + echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>'; |
|
39 | 39 | |
40 | - ?> |
|
40 | + ?> |
|
41 | 41 | </p> |
42 | 42 | |
43 | 43 | <?php |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @author WooThemes |
6 | 6 | * @package Sensei/Templates/Emails/HTML |
7 | 7 | */ |
8 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
8 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly |
|
9 | 9 | |
10 | 10 | // Get data for email content |
11 | 11 | global $sensei_email_data; |
@@ -15,33 +15,33 @@ discard block |
||
15 | 15 | |
16 | 16 | $style_large = "text-align: center !important;font-size: 350% !important;line-height: 100% !important;"; |
17 | 17 | |
18 | -do_action( 'sensei_before_email_content', $template ); |
|
18 | +do_action('sensei_before_email_content', $template); |
|
19 | 19 | ?> |
20 | 20 | |
21 | -<p style="<?php echo esc_attr( $style_small ); ?>"> |
|
22 | - <?php _e( 'The Course', 'woothemes-sensei' ); ?> |
|
21 | +<p style="<?php echo esc_attr($style_small); ?>"> |
|
22 | + <?php _e('The Course', 'woothemes-sensei'); ?> |
|
23 | 23 | </p> |
24 | 24 | |
25 | -<h2 style="<?php echo esc_attr( $style_large ); ?>"> |
|
25 | +<h2 style="<?php echo esc_attr($style_large); ?>"> |
|
26 | 26 | <?php echo $sensei_email_data['course_name']; ?> |
27 | 27 | </h2> |
28 | 28 | |
29 | -<p style="<?php echo esc_attr( $style_small ); ?>"> |
|
30 | - <?php _e( 'has been assigned to you.', 'woothemes-sensei' ); ?> |
|
29 | +<p style="<?php echo esc_attr($style_small); ?>"> |
|
30 | + <?php _e('has been assigned to you.', 'woothemes-sensei'); ?> |
|
31 | 31 | </p> |
32 | 32 | |
33 | 33 | <hr/> |
34 | 34 | |
35 | -<p style="<?php echo esc_attr( $style_small ); ?>"> |
|
35 | +<p style="<?php echo esc_attr($style_small); ?>"> |
|
36 | 36 | <?php |
37 | 37 | |
38 | - echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>'; |
|
38 | + echo __('You can edit the assigned course here: ', 'woothemes-sensei').'<a href="'.esc_url($sensei_email_data['course_edit_link']).'">'.$sensei_email_data['course_name'].'</a>'; |
|
39 | 39 | |
40 | 40 | ?> |
41 | 41 | </p> |
42 | 42 | |
43 | 43 | <?php |
44 | 44 | |
45 | -do_action( 'sensei_after_email_content', $sensei_email_data['template'] ); |
|
45 | +do_action('sensei_after_email_content', $sensei_email_data['template']); |
|
46 | 46 | |
47 | 47 | ?> |
48 | 48 | \ No newline at end of file |
@@ -1,5 +1,8 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Analysis User Profile List Table Class |
@@ -15,14 +15,14 @@ |
||
15 | 15 | // Load colours |
16 | 16 | $base = '#557da1'; |
17 | 17 | if( isset( Sensei()->settings->settings['email_base_color'] ) && '' != Sensei()->settings->settings['email_base_color'] ) { |
18 | - $base = Sensei()->settings->settings['email_base_color']; |
|
18 | + $base = Sensei()->settings->settings['email_base_color']; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | $base_lighter_40 = sensei_hex_lighter( $base, 40 ); |
22 | 22 | |
23 | 23 | $footer_text = sprintf( __( '%1$s - Powered by Sensei', 'woothemes-sensei' ), get_bloginfo( 'name' ) ); |
24 | 24 | if( isset( Sensei()->settings->settings['email_footer_text'] ) ) { |
25 | - $footer_text = Sensei()->settings->settings['email_footer_text']; |
|
25 | + $footer_text = Sensei()->settings->settings['email_footer_text']; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. |
@@ -7,21 +7,21 @@ discard block |
||
7 | 7 | * @version 1.6.0 |
8 | 8 | */ |
9 | 9 | |
10 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
10 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly |
|
11 | 11 | |
12 | 12 | global $sensei_email_data; |
13 | -extract( $sensei_email_data ); |
|
13 | +extract($sensei_email_data); |
|
14 | 14 | |
15 | 15 | // Load colours |
16 | 16 | $base = '#557da1'; |
17 | -if( isset( Sensei()->settings->settings['email_base_color'] ) && '' != Sensei()->settings->settings['email_base_color'] ) { |
|
17 | +if (isset(Sensei()->settings->settings['email_base_color']) && '' != Sensei()->settings->settings['email_base_color']) { |
|
18 | 18 | $base = Sensei()->settings->settings['email_base_color']; |
19 | 19 | } |
20 | 20 | |
21 | -$base_lighter_40 = sensei_hex_lighter( $base, 40 ); |
|
21 | +$base_lighter_40 = sensei_hex_lighter($base, 40); |
|
22 | 22 | |
23 | -$footer_text = sprintf( __( '%1$s - Powered by Sensei', 'woothemes-sensei' ), get_bloginfo( 'name' ) ); |
|
24 | -if( isset( Sensei()->settings->settings['email_footer_text'] ) ) { |
|
23 | +$footer_text = sprintf(__('%1$s - Powered by Sensei', 'woothemes-sensei'), get_bloginfo('name')); |
|
24 | +if (isset(Sensei()->settings->settings['email_footer_text'])) { |
|
25 | 25 | $footer_text = Sensei()->settings->settings['email_footer_text']; |
26 | 26 | } |
27 | 27 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <table border="0" cellpadding="10" cellspacing="0" width="100%"> |
61 | 61 | <tr> |
62 | 62 | <td colspan="2" valign="middle" id="credit" style="<?php echo $credit; ?>"> |
63 | - <?php echo wpautop( wp_kses_post( wptexturize( apply_filters( 'sensei_email_footer_text', $footer_text ) ) ) ); ?> |
|
63 | + <?php echo wpautop(wp_kses_post(wptexturize(apply_filters('sensei_email_footer_text', $footer_text)))); ?> |
|
64 | 64 | </td> |
65 | 65 | </tr> |
66 | 66 | </table> |
@@ -1,5 +1,8 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
5 | +// Exit if accessed directly |
|
3 | 6 | |
4 | 7 | /** |
5 | 8 | * Sensei Analysis User Profile List Table Class |
@@ -16,75 +16,75 @@ discard block |
||
16 | 16 | |
17 | 17 | <?php |
18 | 18 | |
19 | - /** |
|
20 | - * Actions just before the sensei single course lessons loop begins |
|
21 | - * |
|
22 | - * @hooked WooThemes_Sensei_Course::load_single_course_lessons_query |
|
23 | - * @since 1.9.0 |
|
24 | - */ |
|
25 | - do_action( 'sensei_single_course_lessons_before' ); |
|
19 | + /** |
|
20 | + * Actions just before the sensei single course lessons loop begins |
|
21 | + * |
|
22 | + * @hooked WooThemes_Sensei_Course::load_single_course_lessons_query |
|
23 | + * @since 1.9.0 |
|
24 | + */ |
|
25 | + do_action( 'sensei_single_course_lessons_before' ); |
|
26 | 26 | |
27 | - ?> |
|
27 | + ?> |
|
28 | 28 | |
29 | 29 | <?php |
30 | 30 | |
31 | - //lessons loaded into loop in the sensei_single_course_lessons_before hook |
|
32 | - if( have_posts() ): |
|
31 | + //lessons loaded into loop in the sensei_single_course_lessons_before hook |
|
32 | + if( have_posts() ): |
|
33 | 33 | |
34 | - // start course lessons loop |
|
35 | - while ( have_posts() ): the_post(); ?> |
|
34 | + // start course lessons loop |
|
35 | + while ( have_posts() ): the_post(); ?> |
|
36 | 36 | |
37 | 37 | <article <?php post_class(); ?> > |
38 | 38 | |
39 | 39 | <?php |
40 | 40 | |
41 | - /** |
|
42 | - * The hook is inside the course lesson on the single course. It fires |
|
43 | - * for each lesson. It is just before the lesson excerpt. |
|
44 | - * |
|
45 | - * @since 1.9.0 |
|
46 | - * |
|
47 | - * @param $lessons_id |
|
48 | - * |
|
49 | - * @hooked WooThemes_Sensei_Lesson::the_lesson_meta - 5 |
|
50 | - * @hooked WooThemes_Sensei_Lesson::the_lesson_thumbnail - 8 |
|
51 | - * |
|
52 | - */ |
|
53 | - do_action( 'sensei_single_course_inside_before_lesson', get_the_ID() ); |
|
54 | - |
|
55 | - ?> |
|
41 | + /** |
|
42 | + * The hook is inside the course lesson on the single course. It fires |
|
43 | + * for each lesson. It is just before the lesson excerpt. |
|
44 | + * |
|
45 | + * @since 1.9.0 |
|
46 | + * |
|
47 | + * @param $lessons_id |
|
48 | + * |
|
49 | + * @hooked WooThemes_Sensei_Lesson::the_lesson_meta - 5 |
|
50 | + * @hooked WooThemes_Sensei_Lesson::the_lesson_thumbnail - 8 |
|
51 | + * |
|
52 | + */ |
|
53 | + do_action( 'sensei_single_course_inside_before_lesson', get_the_ID() ); |
|
54 | + |
|
55 | + ?> |
|
56 | 56 | |
57 | 57 | <section class="entry"> |
58 | 58 | |
59 | 59 | <?php |
60 | - /** |
|
61 | - * Output all course lessons. If none found for this course |
|
62 | - * a notice will be displayed. What is displayed |
|
63 | - * is manipulated via a |
|
64 | - */ |
|
65 | - the_excerpt(); |
|
66 | - ?> |
|
60 | + /** |
|
61 | + * Output all course lessons. If none found for this course |
|
62 | + * a notice will be displayed. What is displayed |
|
63 | + * is manipulated via a |
|
64 | + */ |
|
65 | + the_excerpt(); |
|
66 | + ?> |
|
67 | 67 | |
68 | 68 | </section> |
69 | 69 | |
70 | 70 | <?php |
71 | 71 | |
72 | - /** |
|
73 | - * The hook is inside the course lesson on the single course. It is just before the lesson closing markup. |
|
74 | - * It fires for each lesson. |
|
75 | - * |
|
76 | - * @since 1.9.0 |
|
77 | - */ |
|
78 | - do_action( 'sensei_single_course_inside_after_lesson', get_the_ID() ); |
|
72 | + /** |
|
73 | + * The hook is inside the course lesson on the single course. It is just before the lesson closing markup. |
|
74 | + * It fires for each lesson. |
|
75 | + * |
|
76 | + * @since 1.9.0 |
|
77 | + */ |
|
78 | + do_action( 'sensei_single_course_inside_after_lesson', get_the_ID() ); |
|
79 | 79 | |
80 | - ?> |
|
80 | + ?> |
|
81 | 81 | |
82 | 82 | </article> |
83 | 83 | |
84 | 84 | <?php |
85 | - // end course lessons loop |
|
86 | - endwhile; |
|
87 | - ?> |
|
85 | + // end course lessons loop |
|
86 | + endwhile; |
|
87 | + ?> |
|
88 | 88 | |
89 | 89 | <?php else: ?> |
90 | 90 | |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | |
95 | 95 | <?php |
96 | 96 | |
97 | - /** |
|
98 | - * Actions just before the sensei single course lessons loop begins |
|
99 | - * |
|
100 | - * @hooked WooThemes_Sensei_Course::reset_single_course_query |
|
101 | - * |
|
102 | - * @since 1.9.0 |
|
103 | - */ |
|
104 | - do_action( 'sensei_single_course_lessons_after' ); |
|
97 | + /** |
|
98 | + * Actions just before the sensei single course lessons loop begins |
|
99 | + * |
|
100 | + * @hooked WooThemes_Sensei_Course::reset_single_course_query |
|
101 | + * |
|
102 | + * @since 1.9.0 |
|
103 | + */ |
|
104 | + do_action( 'sensei_single_course_lessons_after' ); |
|
105 | 105 | |
106 | - ?> |
|
106 | + ?> |
|
107 | 107 | |
108 | 108 | </section> |
@@ -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 displaying all single course meta information. |
5 | 5 | * |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | * @hooked WooThemes_Sensei_Course::load_single_course_lessons_query |
23 | 23 | * @since 1.9.0 |
24 | 24 | */ |
25 | - do_action( 'sensei_single_course_lessons_before' ); |
|
25 | + do_action('sensei_single_course_lessons_before'); |
|
26 | 26 | |
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <?php |
30 | 30 | |
31 | 31 | //lessons loaded into loop in the sensei_single_course_lessons_before hook |
32 | - if( have_posts() ): |
|
32 | + if (have_posts()): |
|
33 | 33 | |
34 | 34 | // start course lessons loop |
35 | - while ( have_posts() ): the_post(); ?> |
|
35 | + while (have_posts()): the_post(); ?> |
|
36 | 36 | |
37 | 37 | <article <?php post_class(); ?> > |
38 | 38 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @hooked WooThemes_Sensei_Lesson::the_lesson_thumbnail - 8 |
51 | 51 | * |
52 | 52 | */ |
53 | - do_action( 'sensei_single_course_inside_before_lesson', get_the_ID() ); |
|
53 | + do_action('sensei_single_course_inside_before_lesson', get_the_ID()); |
|
54 | 54 | |
55 | 55 | ?> |
56 | 56 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @since 1.9.0 |
77 | 77 | */ |
78 | - do_action( 'sensei_single_course_inside_after_lesson', get_the_ID() ); |
|
78 | + do_action('sensei_single_course_inside_after_lesson', get_the_ID()); |
|
79 | 79 | |
80 | 80 | ?> |
81 | 81 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | <?php else: ?> |
90 | 90 | |
91 | - <?php _e('Sorry, this course has no lessons yet.','woothemes-sensei'); ?> |
|
91 | + <?php _e('Sorry, this course has no lessons yet.', 'woothemes-sensei'); ?> |
|
92 | 92 | |
93 | 93 | <?php endif; ?> |
94 | 94 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * |
102 | 102 | * @since 1.9.0 |
103 | 103 | */ |
104 | - do_action( 'sensei_single_course_lessons_after' ); |
|
104 | + do_action('sensei_single_course_lessons_after'); |
|
105 | 105 | |
106 | 106 | ?> |
107 | 107 |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | /** |
4 | 6 | * The Template for displaying all single course meta information. |
5 | 7 | * |
@@ -86,9 +88,12 @@ discard block |
||
86 | 88 | endwhile; |
87 | 89 | ?> |
88 | 90 | |
89 | - <?php else: ?> |
|
91 | + <?php else { |
|
92 | + : ?> |
|
90 | 93 | |
91 | - <?php _e('Sorry, this course has no lessons yet.','woothemes-sensei'); ?> |
|
94 | + <?php _e('Sorry, this course has no lessons yet.','woothemes-sensei'); |
|
95 | +} |
|
96 | +?> |
|
92 | 97 | |
93 | 98 | <?php endif; ?> |
94 | 99 |
@@ -1,32 +1,32 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * List the Course Modules and Lesson in these modules |
|
5 | - * |
|
6 | - * Template is hooked into Single Course sensei_single_main_content. It will |
|
7 | - * only be shown if the course contains modules. |
|
8 | - * |
|
9 | - * All lessons shown here will not be included in the list of other lessons. |
|
10 | - * |
|
11 | - * @author Automattic |
|
12 | - * @package Sensei |
|
13 | - * @category Templates |
|
14 | - * @version 1.9.0 |
|
15 | - */ |
|
4 | + * List the Course Modules and Lesson in these modules |
|
5 | + * |
|
6 | + * Template is hooked into Single Course sensei_single_main_content. It will |
|
7 | + * only be shown if the course contains modules. |
|
8 | + * |
|
9 | + * All lessons shown here will not be included in the list of other lessons. |
|
10 | + * |
|
11 | + * @author Automattic |
|
12 | + * @package Sensei |
|
13 | + * @category Templates |
|
14 | + * @version 1.9.0 |
|
15 | + */ |
|
16 | 16 | ?> |
17 | 17 | |
18 | 18 | <?php |
19 | 19 | |
20 | - /** |
|
21 | - * Hook runs inside single-course/course-modules.php |
|
22 | - * |
|
23 | - * It runs before the modules are shown. This hook fires on the single course page. It will show |
|
24 | - * irrespective of irrespective the course has any modules or not. |
|
25 | - * |
|
26 | - * @since 1.8.0 |
|
27 | - * |
|
28 | - */ |
|
29 | - do_action('sensei_single_course_modules_before'); |
|
20 | + /** |
|
21 | + * Hook runs inside single-course/course-modules.php |
|
22 | + * |
|
23 | + * It runs before the modules are shown. This hook fires on the single course page. It will show |
|
24 | + * irrespective of irrespective the course has any modules or not. |
|
25 | + * |
|
26 | + * @since 1.8.0 |
|
27 | + * |
|
28 | + */ |
|
29 | + do_action('sensei_single_course_modules_before'); |
|
30 | 30 | |
31 | 31 | ?> |
32 | 32 | |
@@ -39,19 +39,19 @@ discard block |
||
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - /** |
|
43 | - * Hook runs inside single-course/course-modules.php |
|
44 | - * |
|
45 | - * It runs inside the if statement after the article tag opens just before the modules are shown. This hook will NOT fire if there |
|
46 | - * are no modules to show. |
|
47 | - * |
|
48 | - * @since 1.9.0 |
|
49 | - * |
|
50 | - * @hooked Sensei()->modules->course_modules_title - 20 |
|
51 | - */ |
|
52 | - do_action('sensei_single_course_modules_inside_before'); |
|
42 | + /** |
|
43 | + * Hook runs inside single-course/course-modules.php |
|
44 | + * |
|
45 | + * It runs inside the if statement after the article tag opens just before the modules are shown. This hook will NOT fire if there |
|
46 | + * are no modules to show. |
|
47 | + * |
|
48 | + * @since 1.9.0 |
|
49 | + * |
|
50 | + * @hooked Sensei()->modules->course_modules_title - 20 |
|
51 | + */ |
|
52 | + do_action('sensei_single_course_modules_inside_before'); |
|
53 | 53 | |
54 | - ?> |
|
54 | + ?> |
|
55 | 55 | |
56 | 56 | <header> |
57 | 57 | |
@@ -101,18 +101,18 @@ discard block |
||
101 | 101 | |
102 | 102 | <?php |
103 | 103 | |
104 | - /** |
|
105 | - * Hook runs inside single-course/course-modules.php |
|
106 | - * |
|
107 | - * It runs inside the if statement before the closing article tag directly after the modules were shown. |
|
108 | - * This hook will not trigger if there are no modules to show. |
|
109 | - * |
|
110 | - * @since 1.9.0 |
|
111 | - * |
|
112 | - */ |
|
113 | - do_action('sensei_single_course_modules_inside_after'); |
|
114 | - |
|
115 | - ?> |
|
104 | + /** |
|
105 | + * Hook runs inside single-course/course-modules.php |
|
106 | + * |
|
107 | + * It runs inside the if statement before the closing article tag directly after the modules were shown. |
|
108 | + * This hook will not trigger if there are no modules to show. |
|
109 | + * |
|
110 | + * @since 1.9.0 |
|
111 | + * |
|
112 | + */ |
|
113 | + do_action('sensei_single_course_modules_inside_after'); |
|
114 | + |
|
115 | + ?> |
|
116 | 116 | |
117 | 117 | </article> |
118 | 118 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * List the Course Modules and Lesson in these modules |
5 | 5 | * |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | ?> |
32 | 32 | |
33 | -<?php if( sensei_have_modules() ): ?> |
|
33 | +<?php if (sensei_have_modules()): ?> |
|
34 | 34 | |
35 | - <?php while ( sensei_have_modules() ): sensei_setup_module(); ?> |
|
36 | - <?php if( sensei_module_has_lessons() ): ?> |
|
35 | + <?php while (sensei_have_modules()): sensei_setup_module(); ?> |
|
36 | + <?php if (sensei_module_has_lessons()): ?> |
|
37 | 37 | |
38 | 38 | <article class="module"> |
39 | 39 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | <h2> |
59 | 59 | |
60 | - <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute();?>"> |
|
60 | + <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute(); ?>"> |
|
61 | 61 | |
62 | 62 | <?php sensei_the_module_title(); ?> |
63 | 63 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | <ul class="lessons-list" > |
81 | 81 | |
82 | - <?php while( sensei_module_has_lessons() ): the_post(); ?> |
|
82 | + <?php while (sensei_module_has_lessons()): the_post(); ?> |
|
83 | 83 | |
84 | 84 | <li class="' . $status . '"> |
85 | 85 |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | /** |
4 | 6 | * The Template for displaying the my course page data. |
5 | 7 | * |
@@ -1,33 +1,33 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Template for displaying course archives, including the course page template. |
|
4 | - * |
|
5 | - * Override this template by copying it to your_theme/sensei/archive-course.php |
|
6 | - * |
|
7 | - * @author Automattic |
|
8 | - * @package Sensei |
|
9 | - * @category Templates |
|
10 | - * @version 1.9.0 |
|
11 | - */ |
|
3 | + * The Template for displaying course archives, including the course page template. |
|
4 | + * |
|
5 | + * Override this template by copying it to your_theme/sensei/archive-course.php |
|
6 | + * |
|
7 | + * @author Automattic |
|
8 | + * @package Sensei |
|
9 | + * @category Templates |
|
10 | + * @version 1.9.0 |
|
11 | + */ |
|
12 | 12 | ?> |
13 | 13 | |
14 | 14 | <?php get_sensei_header(); ?> |
15 | 15 | |
16 | 16 | <?php |
17 | 17 | |
18 | - /** |
|
19 | - * This action before course archive loop. This hook fires within the archive-course.php |
|
20 | - * It fires even if the current archive has no posts. |
|
21 | - * |
|
22 | - * @since 1.9.0 |
|
23 | - * |
|
24 | - * @hooked Sensei_Course::course_archive_sorting 20 |
|
25 | - * @hooked Sensei_Course::course_archive_filters 20 |
|
26 | - * @hooked Sensei_Templates::deprecated_archive_hook 80 |
|
27 | - */ |
|
28 | - do_action( 'sensei_archive_before_course_loop' ); |
|
18 | + /** |
|
19 | + * This action before course archive loop. This hook fires within the archive-course.php |
|
20 | + * It fires even if the current archive has no posts. |
|
21 | + * |
|
22 | + * @since 1.9.0 |
|
23 | + * |
|
24 | + * @hooked Sensei_Course::course_archive_sorting 20 |
|
25 | + * @hooked Sensei_Course::course_archive_filters 20 |
|
26 | + * @hooked Sensei_Templates::deprecated_archive_hook 80 |
|
27 | + */ |
|
28 | + do_action( 'sensei_archive_before_course_loop' ); |
|
29 | 29 | |
30 | - ?> |
|
30 | + ?> |
|
31 | 31 | |
32 | 32 | <?php if ( have_posts() ): ?> |
33 | 33 | |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | |
42 | 42 | <?php |
43 | 43 | |
44 | - /** |
|
45 | - * This action runs after including the course archive loop. This hook fires within the archive-course.php |
|
46 | - * It fires even if the current archive has no posts. |
|
47 | - * |
|
48 | - * @since 1.9.0 |
|
49 | - */ |
|
50 | - do_action( 'sensei_archive_after_course_loop' ); |
|
44 | + /** |
|
45 | + * This action runs after including the course archive loop. This hook fires within the archive-course.php |
|
46 | + * It fires even if the current archive has no posts. |
|
47 | + * |
|
48 | + * @since 1.9.0 |
|
49 | + */ |
|
50 | + do_action( 'sensei_archive_after_course_loop' ); |
|
51 | 51 | |
52 | - ?> |
|
52 | + ?> |
|
53 | 53 | |
54 | 54 | <?php get_sensei_footer(); ?> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | ?> |
13 | 13 | |
14 | -<?php get_sensei_header(); ?> |
|
14 | +<?php get_sensei_header(); ?> |
|
15 | 15 | |
16 | 16 | <?php |
17 | 17 | |
@@ -25,17 +25,17 @@ discard block |
||
25 | 25 | * @hooked Sensei_Course::course_archive_filters 20 |
26 | 26 | * @hooked Sensei_Templates::deprecated_archive_hook 80 |
27 | 27 | */ |
28 | - do_action( 'sensei_archive_before_course_loop' ); |
|
28 | + do_action('sensei_archive_before_course_loop'); |
|
29 | 29 | |
30 | 30 | ?> |
31 | 31 | |
32 | - <?php if ( have_posts() ): ?> |
|
32 | + <?php if (have_posts()): ?> |
|
33 | 33 | |
34 | - <?php sensei_load_template( 'loop-course.php' ); ?> |
|
34 | + <?php sensei_load_template('loop-course.php'); ?> |
|
35 | 35 | |
36 | 36 | <?php else: ?> |
37 | 37 | |
38 | - <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' ); ?></p> |
|
38 | + <p><?php _e('No courses found that match your selection.', 'woothemes-sensei'); ?></p> |
|
39 | 39 | |
40 | 40 | <?php endif; // End If Statement ?> |
41 | 41 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @since 1.9.0 |
49 | 49 | */ |
50 | - do_action( 'sensei_archive_after_course_loop' ); |
|
50 | + do_action('sensei_archive_after_course_loop'); |
|
51 | 51 | |
52 | 52 | ?> |
53 | 53 |
@@ -33,9 +33,12 @@ |
||
33 | 33 | |
34 | 34 | <?php sensei_load_template( 'loop-course.php' ); ?> |
35 | 35 | |
36 | - <?php else: ?> |
|
36 | + <?php else { |
|
37 | + : ?> |
|
37 | 38 | |
38 | - <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' ); ?></p> |
|
39 | + <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' ); |
|
40 | +} |
|
41 | +?></p> |
|
39 | 42 | |
40 | 43 | <?php endif; // End If Statement ?> |
41 | 44 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined('ABSPATH')) exit; |
|
3 | 3 | /** |
4 | 4 | * Content-message.php template file |
5 | 5 | * |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | ?> |
16 | 16 | |
17 | -<article <?php post_class( array( 'post','sensei_message'), get_the_ID() ); ?>> |
|
17 | +<article <?php post_class(array('post', 'sensei_message'), get_the_ID()); ?>> |
|
18 | 18 | |
19 | 19 | <section class="message-content"> |
20 | 20 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @hooked Sensei_Messages::the_message_title - 10 |
30 | 30 | * @hooked Sensei_Messages::the_message_sender - 20 |
31 | 31 | */ |
32 | - do_action( 'sensei_content_message_before', get_the_ID() ); |
|
32 | + do_action('sensei_content_message_before', get_the_ID()); |
|
33 | 33 | ?> |
34 | 34 | |
35 | 35 | <section class="entry"> |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | <p class="message-excerpt"> |
49 | 49 | |
50 | - <?php the_excerpt();?> |
|
50 | + <?php the_excerpt(); ?> |
|
51 | 51 | |
52 | 52 | </p> |
53 | 53 | |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | * @since 1.9 |
73 | 73 | * @param string $post_id |
74 | 74 | */ |
75 | - do_action( 'sensei_content_message_after', get_the_ID() ); |
|
75 | + do_action('sensei_content_message_after', get_the_ID()); |
|
76 | 76 | ?> |
77 | 77 | |
78 | 78 | </section> <!-- article .message-content --> |
79 | 79 | |
80 | -</article> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'sensei_message', 'post' ) ) ) ); ?> --> |
|
80 | +</article> <!-- article .(<?php esc_attr_e(join(' ', get_post_class(array('sensei_message', 'post')))); ?> --> |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | /** |
4 | 6 | * The Template for displaying the my course page data. |
5 | 7 | * |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * Content-message.php template file |
|
5 | - * |
|
6 | - * responsible for content on archive like pages. Only shows the message excerpt. |
|
7 | - * |
|
8 | - * For single message content please see single-message.php |
|
9 | - * |
|
10 | - * @author Automattic |
|
11 | - * @package Sensei |
|
12 | - * @category Templates |
|
13 | - * @version 1.9.0 |
|
14 | - */ |
|
4 | + * Content-message.php template file |
|
5 | + * |
|
6 | + * responsible for content on archive like pages. Only shows the message excerpt. |
|
7 | + * |
|
8 | + * For single message content please see single-message.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( array( 'post','sensei_message'), get_the_ID() ); ?>> |
@@ -19,31 +19,31 @@ discard block |
||
19 | 19 | <section class="message-content"> |
20 | 20 | |
21 | 21 | <?php |
22 | - /** |
|
23 | - * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
24 | - * content.php template. This applies to the specific post type that you've targeted. |
|
25 | - * |
|
26 | - * @since 1.9 |
|
27 | - * @param string $message_id |
|
28 | - * |
|
29 | - * @hooked Sensei_Messages::the_message_title - 10 |
|
30 | - * @hooked Sensei_Messages::the_message_sender - 20 |
|
31 | - */ |
|
32 | - do_action( 'sensei_content_message_before', get_the_ID() ); |
|
33 | - ?> |
|
22 | + /** |
|
23 | + * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
24 | + * content.php template. This applies to the specific post type that you've targeted. |
|
25 | + * |
|
26 | + * @since 1.9 |
|
27 | + * @param string $message_id |
|
28 | + * |
|
29 | + * @hooked Sensei_Messages::the_message_title - 10 |
|
30 | + * @hooked Sensei_Messages::the_message_sender - 20 |
|
31 | + */ |
|
32 | + do_action( 'sensei_content_message_before', get_the_ID() ); |
|
33 | + ?> |
|
34 | 34 | |
35 | 35 | <section class="entry"> |
36 | 36 | |
37 | 37 | <?php |
38 | - /** |
|
39 | - * Fires just before the post content in the content-message.php file. |
|
40 | - * |
|
41 | - * @since 1.9 |
|
42 | - * |
|
43 | - * @param string $message_id |
|
44 | - */ |
|
45 | - do_action('sensei_content_message_inside_before', get_the_ID()); |
|
46 | - ?> |
|
38 | + /** |
|
39 | + * Fires just before the post content in the content-message.php file. |
|
40 | + * |
|
41 | + * @since 1.9 |
|
42 | + * |
|
43 | + * @param string $message_id |
|
44 | + */ |
|
45 | + do_action('sensei_content_message_inside_before', get_the_ID()); |
|
46 | + ?> |
|
47 | 47 | |
48 | 48 | <p class="message-excerpt"> |
49 | 49 | |
@@ -52,28 +52,28 @@ discard block |
||
52 | 52 | </p> |
53 | 53 | |
54 | 54 | <?php |
55 | - /** |
|
56 | - * Fires just after the post content in the message-content.php file. |
|
57 | - * |
|
58 | - * @since 1.9 |
|
59 | - * |
|
60 | - * @param string $message_id |
|
61 | - */ |
|
62 | - do_action('sensei_content_message_inside_after', get_the_ID()); |
|
63 | - ?> |
|
55 | + /** |
|
56 | + * Fires just after the post content in the message-content.php file. |
|
57 | + * |
|
58 | + * @since 1.9 |
|
59 | + * |
|
60 | + * @param string $message_id |
|
61 | + */ |
|
62 | + do_action('sensei_content_message_inside_after', get_the_ID()); |
|
63 | + ?> |
|
64 | 64 | |
65 | 65 | </section> <!-- section .entry --> |
66 | 66 | |
67 | 67 | <?php |
68 | - /** |
|
69 | - * This action runs after the sensei message content. It runs inside the sensei |
|
70 | - * message-content.php template. |
|
71 | - * |
|
72 | - * @since 1.9 |
|
73 | - * @param string $message_id |
|
74 | - */ |
|
75 | - do_action( 'sensei_content_message_after', get_the_ID() ); |
|
76 | - ?> |
|
68 | + /** |
|
69 | + * This action runs after the sensei message content. It runs inside the sensei |
|
70 | + * message-content.php template. |
|
71 | + * |
|
72 | + * @since 1.9 |
|
73 | + * @param string $message_id |
|
74 | + */ |
|
75 | + do_action( 'sensei_content_message_after', get_the_ID() ); |
|
76 | + ?> |
|
77 | 77 | |
78 | 78 | </section> <!-- article .message-content --> |
79 | 79 |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for displaying Gap Fill Line Questions. |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-gap-fill.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
4 | + * The Template for displaying Gap Fill Line Questions. |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-gap-fill.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 | - /** |
|
18 | - * Get the question data with the current quiz id |
|
19 | - * All data is loaded in this array to keep the template clean. |
|
20 | - */ |
|
21 | - $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() ); |
|
17 | + /** |
|
18 | + * Get the question data with the current quiz id |
|
19 | + * All data is loaded in this array to keep the template clean. |
|
20 | + */ |
|
21 | + $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() ); |
|
22 | 22 | |
23 | 23 | ?> |
24 | 24 |
@@ -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 displaying Gap Fill Line Questions. |
5 | 5 | * |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * Get the question data with the current quiz id |
19 | 19 | * All data is loaded in this array to keep the template clean. |
20 | 20 | */ |
21 | - $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() ); |
|
21 | + $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID()); |
|
22 | 22 | |
23 | 23 | ?> |
24 | 24 | |
@@ -26,16 +26,16 @@ discard block |
||
26 | 26 | |
27 | 27 | <span class="gapfill-answer-pre"> |
28 | 28 | |
29 | - <?php echo apply_filters( 'sensei_answer_text', esc_html( $question_data[ 'gapfill_pre' ] ) ); ?> |
|
29 | + <?php echo apply_filters('sensei_answer_text', esc_html($question_data['gapfill_pre'])); ?> |
|
30 | 30 | |
31 | - <input type="text" id="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ); ?>" |
|
32 | - name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ] . ']' ); ?>" |
|
33 | - value="<?php echo esc_attr( $question_data[ 'user_answer_entry' ] ); ?>" |
|
31 | + <input type="text" id="<?php echo esc_attr('question_'.$question_data['ID']); ?>" |
|
32 | + name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>" |
|
33 | + value="<?php echo esc_attr($question_data['user_answer_entry']); ?>" |
|
34 | 34 | class="gapfill-answer-gap" /> |
35 | 35 | |
36 | 36 | <span class="gapfill-answer-post"> |
37 | 37 | |
38 | - <?php echo apply_filters( 'sensei_answer_text', esc_html( $question_data[ 'gapfill_post' ] ) ); ?> |
|
38 | + <?php echo apply_filters('sensei_answer_text', esc_html($question_data['gapfill_post'])); ?> |
|
39 | 39 | |
40 | 40 | </span> |
41 | 41 |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | /** |
4 | 6 | * The Template for displaying the my course page data. |
5 | 7 | * |
@@ -12,12 +12,12 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php |
14 | 14 | |
15 | - /** |
|
16 | - * Get the question data with the current quiz id |
|
17 | - * All data is loaded in this array to keep the template clean. |
|
18 | - */ |
|
19 | - $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() ); |
|
20 | - $boolean_options = array( 'true', 'false' ); |
|
15 | + /** |
|
16 | + * Get the question data with the current quiz id |
|
17 | + * All data is loaded in this array to keep the template clean. |
|
18 | + */ |
|
19 | + $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() ); |
|
20 | + $boolean_options = array( 'true', 'false' ); |
|
21 | 21 | |
22 | 22 | ?> |
23 | 23 | |
@@ -25,42 +25,42 @@ discard block |
||
25 | 25 | |
26 | 26 | <?php |
27 | 27 | |
28 | - // setup the options the right answer set by the admin/teacher |
|
29 | - // will be compared to. |
|
30 | - $boolean_options = array( 'true', 'false' ); |
|
28 | + // setup the options the right answer set by the admin/teacher |
|
29 | + // will be compared to. |
|
30 | + $boolean_options = array( 'true', 'false' ); |
|
31 | 31 | |
32 | - //loop through the 2 boolean options and compare them with |
|
33 | - // the selected right answer |
|
34 | - foreach ( $boolean_options as $option ){ |
|
32 | + //loop through the 2 boolean options and compare them with |
|
33 | + // the selected right answer |
|
34 | + foreach ( $boolean_options as $option ){ |
|
35 | 35 | |
36 | - $answer_class = ''; |
|
36 | + $answer_class = ''; |
|
37 | 37 | |
38 | - // Add classes to indicate correctness, only if there is a grade |
|
39 | - if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) { |
|
38 | + // Add classes to indicate correctness, only if there is a grade |
|
39 | + if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) { |
|
40 | 40 | |
41 | - if( $question_right_answer == $question_data[ 'question_right_answer' ] ) { |
|
41 | + if( $question_right_answer == $question_data[ 'question_right_answer' ] ) { |
|
42 | 42 | |
43 | - if( $question_data[ 'user_correct' ] ) { |
|
43 | + if( $question_data[ 'user_correct' ] ) { |
|
44 | 44 | |
45 | - $answer_class = 'user_right'; |
|
45 | + $answer_class = 'user_right'; |
|
46 | 46 | |
47 | - } |
|
47 | + } |
|
48 | 48 | |
49 | - $answer_class .= ' right_answer'; |
|
49 | + $answer_class .= ' right_answer'; |
|
50 | 50 | |
51 | - } else { |
|
51 | + } else { |
|
52 | 52 | |
53 | - if( ! $question_data[ 'user_correct' ] ) { |
|
53 | + if( ! $question_data[ 'user_correct' ] ) { |
|
54 | 54 | |
55 | - $answer_class = 'user_wrong'; |
|
55 | + $answer_class = 'user_wrong'; |
|
56 | 56 | |
57 | - } |
|
57 | + } |
|
58 | 58 | |
59 | - } // end if right answer == current booloean options |
|
59 | + } // end if right answer == current booloean options |
|
60 | 60 | |
61 | - }// end if $user_correct .. $question_grade |
|
61 | + }// end if $user_correct .. $question_grade |
|
62 | 62 | |
63 | - ?> |
|
63 | + ?> |
|
64 | 64 | |
65 | 65 | <li class="<?php esc_attr_e( $answer_class ); ?>"> |
66 | 66 | |
@@ -74,17 +74,17 @@ discard block |
||
74 | 74 | <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ) . '-option-'.$option; ?>"> |
75 | 75 | <?php |
76 | 76 | |
77 | - if( 'true' == $option ){ |
|
77 | + if( 'true' == $option ){ |
|
78 | 78 | |
79 | - _e( 'True', 'woothemes-sensei' ); |
|
79 | + _e( 'True', 'woothemes-sensei' ); |
|
80 | 80 | |
81 | - }else{ |
|
81 | + }else{ |
|
82 | 82 | |
83 | - _e( 'False', 'woothemes-sensei' ); |
|
83 | + _e( 'False', 'woothemes-sensei' ); |
|
84 | 84 | |
85 | - } |
|
85 | + } |
|
86 | 86 | |
87 | - ?> |
|
87 | + ?> |
|
88 | 88 | |
89 | 89 | |
90 | 90 | </label> |
@@ -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 displaying True/False ( Boolean ) Question type. |
5 | 5 | * |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | * Get the question data with the current quiz id |
17 | 17 | * All data is loaded in this array to keep the template clean. |
18 | 18 | */ |
19 | - $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() ); |
|
20 | - $boolean_options = array( 'true', 'false' ); |
|
19 | + $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID()); |
|
20 | + $boolean_options = array('true', 'false'); |
|
21 | 21 | |
22 | 22 | ?> |
23 | 23 | |
@@ -27,20 +27,20 @@ discard block |
||
27 | 27 | |
28 | 28 | // setup the options the right answer set by the admin/teacher |
29 | 29 | // will be compared to. |
30 | - $boolean_options = array( 'true', 'false' ); |
|
30 | + $boolean_options = array('true', 'false'); |
|
31 | 31 | |
32 | 32 | //loop through the 2 boolean options and compare them with |
33 | 33 | // the selected right answer |
34 | - foreach ( $boolean_options as $option ){ |
|
34 | + foreach ($boolean_options as $option) { |
|
35 | 35 | |
36 | 36 | $answer_class = ''; |
37 | 37 | |
38 | 38 | // Add classes to indicate correctness, only if there is a grade |
39 | - if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) { |
|
39 | + if (isset($question_data['user_correct']) && 0 < $question_data['question_grade']) { |
|
40 | 40 | |
41 | - if( $question_right_answer == $question_data[ 'question_right_answer' ] ) { |
|
41 | + if ($question_right_answer == $question_data['question_right_answer']) { |
|
42 | 42 | |
43 | - if( $question_data[ 'user_correct' ] ) { |
|
43 | + if ($question_data['user_correct']) { |
|
44 | 44 | |
45 | 45 | $answer_class = 'user_right'; |
46 | 46 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | } else { |
52 | 52 | |
53 | - if( ! $question_data[ 'user_correct' ] ) { |
|
53 | + if ( ! $question_data['user_correct']) { |
|
54 | 54 | |
55 | 55 | $answer_class = 'user_wrong'; |
56 | 56 | |
@@ -62,25 +62,25 @@ discard block |
||
62 | 62 | |
63 | 63 | ?> |
64 | 64 | |
65 | - <li class="<?php esc_attr_e( $answer_class ); ?>"> |
|
65 | + <li class="<?php esc_attr_e($answer_class); ?>"> |
|
66 | 66 | |
67 | 67 | <input type="radio" |
68 | - id="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ) . '-option-true'; ?>" |
|
69 | - name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ] . ']' ); ?>" |
|
68 | + id="<?php echo esc_attr('question_'.$question_data['ID']).'-option-true'; ?>" |
|
69 | + name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>" |
|
70 | 70 | value="true" |
71 | - <?php echo checked( $question_data[ 'user_answer_entry' ], $option, false ); ?> |
|
72 | - <?php if ( !is_user_logged_in() ) { echo ' disabled'; } ?> |
|
71 | + <?php echo checked($question_data['user_answer_entry'], $option, false); ?> |
|
72 | + <?php if ( ! is_user_logged_in()) { echo ' disabled'; } ?> |
|
73 | 73 | |
74 | - <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ) . '-option-'.$option; ?>"> |
|
74 | + <label for="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$option; ?>"> |
|
75 | 75 | <?php |
76 | 76 | |
77 | - if( 'true' == $option ){ |
|
77 | + if ('true' == $option) { |
|
78 | 78 | |
79 | - _e( 'True', 'woothemes-sensei' ); |
|
79 | + _e('True', 'woothemes-sensei'); |
|
80 | 80 | |
81 | - }else{ |
|
81 | + } else { |
|
82 | 82 | |
83 | - _e( 'False', 'woothemes-sensei' ); |
|
83 | + _e('False', 'woothemes-sensei'); |
|
84 | 84 | |
85 | 85 | } |
86 | 86 |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
3 | + exit; |
|
4 | +} |
|
3 | 5 | /** |
4 | 6 | * The Template for displaying True/False ( Boolean ) Question type. |
5 | 7 | * |
@@ -78,7 +80,7 @@ discard block |
||
78 | 80 | |
79 | 81 | _e( 'True', 'woothemes-sensei' ); |
80 | 82 | |
81 | - }else{ |
|
83 | + } else{ |
|
82 | 84 | |
83 | 85 | _e( 'False', 'woothemes-sensei' ); |
84 | 86 |