@@ -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 |
@@ -15,19 +15,19 @@ discard block |
||
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' ); |
|
29 | - |
|
30 | - ?> |
|
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 | + |
|
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(); ?> |
@@ -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,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 | * |
@@ -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,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 |
@@ -1,23 +1,23 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for displaying True/False ( Boolean ) Question type. |
|
5 | - * |
|
6 | - * @author Automattic |
|
7 | - * @package Sensei |
|
8 | - * @category Templates |
|
9 | - * @version 1.9.0 |
|
10 | - */ |
|
4 | + * The Template for displaying True/False ( Boolean ) Question type. |
|
5 | + * |
|
6 | + * @author Automattic |
|
7 | + * @package Sensei |
|
8 | + * @category Templates |
|
9 | + * @version 1.9.0 |
|
10 | + */ |
|
11 | 11 | ?> |
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,44 +25,44 @@ 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 | - $option_value = $option ? 'true' : 'false'; |
|
63 | + $option_value = $option ? 'true' : 'false'; |
|
64 | 64 | |
65 | - ?> |
|
65 | + ?> |
|
66 | 66 | |
67 | 67 | <li class="<?php esc_attr_e( $answer_class ); ?>"> |
68 | 68 | |
@@ -76,17 +76,17 @@ discard block |
||
76 | 76 | <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ) . '-option-' . $option_value; ?>"> |
77 | 77 | <?php |
78 | 78 | |
79 | - if( 'true' == $option ){ |
|
79 | + if( 'true' == $option ){ |
|
80 | 80 | |
81 | - _e( 'True', 'woothemes-sensei' ); |
|
81 | + _e( 'True', 'woothemes-sensei' ); |
|
82 | 82 | |
83 | - }else{ |
|
83 | + }else{ |
|
84 | 84 | |
85 | - _e( 'False', 'woothemes-sensei' ); |
|
85 | + _e( 'False', 'woothemes-sensei' ); |
|
86 | 86 | |
87 | - } |
|
87 | + } |
|
88 | 88 | |
89 | - ?> |
|
89 | + ?> |
|
90 | 90 | |
91 | 91 | |
92 | 92 | </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 | |
@@ -64,25 +64,25 @@ discard block |
||
64 | 64 | |
65 | 65 | ?> |
66 | 66 | |
67 | - <li class="<?php esc_attr_e( $answer_class ); ?>"> |
|
67 | + <li class="<?php esc_attr_e($answer_class); ?>"> |
|
68 | 68 | |
69 | 69 | <input type="radio" |
70 | - id="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ) . '-option-'. $option_value; ?>" |
|
71 | - name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ] . ']' ); ?>" |
|
70 | + id="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$option_value; ?>" |
|
71 | + name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>" |
|
72 | 72 | value="<?php echo $option_value; ?>" |
73 | - <?php echo checked( $question_data[ 'user_answer_entry' ], $option_value, false ); ?> |
|
74 | - <?php if ( !is_user_logged_in() ) { echo ' disabled'; } ?> |
|
73 | + <?php echo checked($question_data['user_answer_entry'], $option_value, false); ?> |
|
74 | + <?php if ( ! is_user_logged_in()) { echo ' disabled'; } ?> |
|
75 | 75 | /> |
76 | - <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ) . '-option-' . $option_value; ?>"> |
|
76 | + <label for="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$option_value; ?>"> |
|
77 | 77 | <?php |
78 | 78 | |
79 | - if( 'true' == $option ){ |
|
79 | + if ('true' == $option) { |
|
80 | 80 | |
81 | - _e( 'True', 'woothemes-sensei' ); |
|
81 | + _e('True', 'woothemes-sensei'); |
|
82 | 82 | |
83 | - }else{ |
|
83 | + } else { |
|
84 | 84 | |
85 | - _e( 'False', 'woothemes-sensei' ); |
|
85 | + _e('False', 'woothemes-sensei'); |
|
86 | 86 | |
87 | 87 | } |
88 | 88 |
@@ -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 Multiple Choice Questions. |
5 | 5 | * |
@@ -16,7 +16,7 @@ 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() ); |
|
19 | + $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID()); |
|
20 | 20 | |
21 | 21 | ?> |
22 | 22 | |
@@ -24,20 +24,20 @@ discard block |
||
24 | 24 | |
25 | 25 | <?php |
26 | 26 | $count = 0; |
27 | -foreach( $question_data[ 'answer_options' ] as $id => $option ) { |
|
27 | +foreach ($question_data['answer_options'] as $id => $option) { |
|
28 | 28 | ?> |
29 | 29 | |
30 | - <li class="<?php esc_attr_e( $option[ 'option_class' ] ); ?>"> |
|
31 | - <input type="<?php echo $option[ 'type' ]; ?>" |
|
32 | - id="<?php echo esc_attr( 'question_' . $question_data['ID'] ) . '-option-' . $count; ?>" |
|
33 | - name="<?php echo esc_attr( 'sensei_question[' . $question_data['ID'] . ']' ); ?>[]" |
|
34 | - value="<?php echo esc_attr( $option['answer'] ); ?>" <?php echo $option['checked']; ?> |
|
30 | + <li class="<?php esc_attr_e($option['option_class']); ?>"> |
|
31 | + <input type="<?php echo $option['type']; ?>" |
|
32 | + id="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$count; ?>" |
|
33 | + name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>[]" |
|
34 | + value="<?php echo esc_attr($option['answer']); ?>" <?php echo $option['checked']; ?> |
|
35 | 35 | <?php echo is_user_logged_in() ? '' : ' disabled'; ?> |
36 | 36 | /> |
37 | 37 | |
38 | - <label for="<?php echo esc_attr( 'question_' . $question_data['ID'] ) . '-option-' . $count; ?>"> |
|
38 | + <label for="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$count; ?>"> |
|
39 | 39 | |
40 | - <?php echo apply_filters( 'sensei_answer_text', $option['answer'] ); ?> |
|
40 | + <?php echo apply_filters('sensei_answer_text', $option['answer']); ?> |
|
41 | 41 | |
42 | 42 | </label> |
43 | 43 |
@@ -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,11 +12,11 @@ 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() ); |
|
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 | 20 | |
21 | 21 | ?> |
22 | 22 | |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | $count = 0; |
27 | 27 | foreach( $question_data[ 'answer_options' ] as $id => $option ) { |
28 | 28 | |
29 | - $count++; |
|
29 | + $count++; |
|
30 | 30 | |
31 | - ?> |
|
31 | + ?> |
|
32 | 32 | |
33 | 33 | <li class="<?php esc_attr_e( $option[ 'option_class' ] ); ?>"> |
34 | 34 | <input type="<?php echo $option[ 'type' ]; ?>" |
@@ -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 File Upload Questions. |
5 | 5 | * |
@@ -18,44 +18,44 @@ 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 | |
25 | -<?php if( $question_data[ 'question_helptext' ] ) { ?> |
|
25 | +<?php if ($question_data['question_helptext']) { ?> |
|
26 | 26 | |
27 | - <?php echo apply_filters( 'the_content', $question_data[ 'question_helptext' ] ); ?> |
|
27 | + <?php echo apply_filters('the_content', $question_data['question_helptext']); ?> |
|
28 | 28 | |
29 | 29 | <?php } ?> |
30 | 30 | |
31 | -<?php if ( $question_data[ 'answer_media_url' ] && $question_data[ 'answer_media_filename' ] ) { ?> |
|
31 | +<?php if ($question_data['answer_media_url'] && $question_data['answer_media_filename']) { ?> |
|
32 | 32 | |
33 | 33 | <p class="submitted_file"> |
34 | 34 | |
35 | 35 | <?php |
36 | 36 | |
37 | - printf( __( 'Submitted file: %1$s', 'woothemes-sensei' ), '<a href="' . esc_url( $question_data[ 'answer_media_url' ] ) |
|
37 | + printf(__('Submitted file: %1$s', 'woothemes-sensei'), '<a href="'.esc_url($question_data['answer_media_url']) |
|
38 | 38 | . '" target="_blank">' |
39 | - . esc_html( $question_data[ 'answer_media_filename' ] ) . '</a>' ); |
|
39 | + . esc_html($question_data['answer_media_filename']).'</a>'); |
|
40 | 40 | |
41 | 41 | ?> |
42 | 42 | |
43 | 43 | </p> |
44 | - <?php if( ! $question_data[ 'lesson_complete' ] ) { ?> |
|
44 | + <?php if ( ! $question_data['lesson_complete']) { ?> |
|
45 | 45 | |
46 | - <aside class="reupload_notice"><?php _e( 'Uploading a new file will replace your existing one:', 'woothemes-sensei' ); ?></aside> |
|
46 | + <aside class="reupload_notice"><?php _e('Uploading a new file will replace your existing one:', 'woothemes-sensei'); ?></aside> |
|
47 | 47 | |
48 | 48 | <?php } ?> |
49 | 49 | |
50 | 50 | <?php } ?> |
51 | 51 | |
52 | -<?php if( ! $question_data[ 'lesson_complete' ] ) { ?> |
|
52 | +<?php if ( ! $question_data['lesson_complete']) { ?> |
|
53 | 53 | |
54 | - <input type="file" name="file_upload_<?php echo $question_data[ 'ID' ] ; ?>" /> |
|
54 | + <input type="file" name="file_upload_<?php echo $question_data['ID']; ?>" /> |
|
55 | 55 | |
56 | - <input type="hidden" name="sensei_question[<?php echo $question_data[ 'ID' ]; ?>]" |
|
57 | - value="<?php echo esc_attr( $question_data[ 'user_answer_entry' ] ); ?>" /> |
|
56 | + <input type="hidden" name="sensei_question[<?php echo $question_data['ID']; ?>]" |
|
57 | + value="<?php echo esc_attr($question_data['user_answer_entry']); ?>" /> |
|
58 | 58 | |
59 | - <aside class="max_upload_size"><?php echo $question_data[ 'max_upload_size' ]; ?></aside> |
|
59 | + <aside class="max_upload_size"><?php echo $question_data['max_upload_size']; ?></aside> |
|
60 | 60 | |
61 | 61 | <?php } ?> |
@@ -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,24 +1,24 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for displaying File Upload Questions. |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-file-upload.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
4 | + * The Template for displaying File Upload Questions. |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-file-upload.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 | |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | |
35 | 35 | <?php |
36 | 36 | |
37 | - printf( __( 'Submitted file: %1$s', 'woothemes-sensei' ), '<a href="' . esc_url( $question_data[ 'answer_media_url' ] ) |
|
38 | - . '" target="_blank">' |
|
39 | - . esc_html( $question_data[ 'answer_media_filename' ] ) . '</a>' ); |
|
37 | + printf( __( 'Submitted file: %1$s', 'woothemes-sensei' ), '<a href="' . esc_url( $question_data[ 'answer_media_url' ] ) |
|
38 | + . '" target="_blank">' |
|
39 | + . esc_html( $question_data[ 'answer_media_filename' ] ) . '</a>' ); |
|
40 | 40 | |
41 | - ?> |
|
41 | + ?> |
|
42 | 42 | |
43 | 43 | </p> |
44 | 44 | <?php if( ! $question_data[ 'lesson_complete' ] ) { ?> |
@@ -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 Single Line Questions. |
5 | 5 | * |
@@ -18,18 +18,18 @@ 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 | |
25 | 25 | <div class="answer"> |
26 | 26 | |
27 | - <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ] ); ?>"> |
|
28 | - <?php _e( 'Answer:', 'woothemes-sensei' ); ?> |
|
27 | + <label for="<?php echo esc_attr('question_'.$question_data['ID']); ?>"> |
|
28 | + <?php _e('Answer:', 'woothemes-sensei'); ?> |
|
29 | 29 | </label> |
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 | |
35 | 35 | </div> |
36 | 36 | \ No newline at end of file |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for displaying Single Line Questions. |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-single-line.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
4 | + * The Template for displaying Single Line Questions. |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-single-line.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,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,27 +1,27 @@ 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 yourtheme/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 yourtheme/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 | - * This hook fire inside learner-profile.php before the content |
|
19 | - * |
|
20 | - * @since 1.9.0 |
|
21 | - * |
|
22 | - * @hooked Sensei_Learner_Profiles::deprecate_sensei_learner_profile_content_hook - 10 |
|
23 | - * @hooked Sensei_Templates::fire_sensei_complete_course_hook - 20 |
|
24 | - */ |
|
18 | + * This hook fire inside learner-profile.php before the content |
|
19 | + * |
|
20 | + * @since 1.9.0 |
|
21 | + * |
|
22 | + * @hooked Sensei_Learner_Profiles::deprecate_sensei_learner_profile_content_hook - 10 |
|
23 | + * @hooked Sensei_Templates::fire_sensei_complete_course_hook - 20 |
|
24 | + */ |
|
25 | 25 | do_action( 'sensei_learner_profile_content_before' ); |
26 | 26 | ?> |
27 | 27 | |
@@ -30,15 +30,15 @@ discard block |
||
30 | 30 | <section id="learner-info" class="learner-info entry fix"> |
31 | 31 | |
32 | 32 | <?php |
33 | - /** |
|
34 | - * This hook fire inside learner-profile.php inside directly before the content |
|
35 | - * |
|
36 | - * @since 1.9.0 |
|
37 | - * |
|
38 | - * @hooked Sensei_Templates::fire_frontend_messages_hook |
|
39 | - */ |
|
40 | - do_action( 'sensei_learner_profile_inside_content_before' ); |
|
41 | - ?> |
|
33 | + /** |
|
34 | + * This hook fire inside learner-profile.php inside directly before the content |
|
35 | + * |
|
36 | + * @since 1.9.0 |
|
37 | + * |
|
38 | + * @hooked Sensei_Templates::fire_frontend_messages_hook |
|
39 | + */ |
|
40 | + do_action( 'sensei_learner_profile_inside_content_before' ); |
|
41 | + ?> |
|
42 | 42 | |
43 | 43 | <?php $learner_user = get_user_by( 'slug', get_query_var('learner_profile') ); // get requested learner object ?> |
44 | 44 | |
@@ -46,17 +46,17 @@ discard block |
||
46 | 46 | |
47 | 47 | <?php |
48 | 48 | |
49 | - // show the user information |
|
50 | - Sensei_Learner_Profiles::user_info( $learner_user ); |
|
49 | + // show the user information |
|
50 | + Sensei_Learner_Profiles::user_info( $learner_user ); |
|
51 | 51 | |
52 | - ?> |
|
52 | + ?> |
|
53 | 53 | |
54 | 54 | <?php |
55 | 55 | |
56 | - // show the user courses |
|
57 | - Sensei()->course->load_user_courses_content( $learner_user ); |
|
56 | + // show the user courses |
|
57 | + Sensei()->course->load_user_courses_content( $learner_user ); |
|
58 | 58 | |
59 | - ?> |
|
59 | + ?> |
|
60 | 60 | |
61 | 61 | <?php }else{ ?> |
62 | 62 | |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | <?php } ?> |
70 | 70 | |
71 | 71 | <?php |
72 | - /** |
|
73 | - * This hook fire inside learner-profile.php inside directly after the content |
|
74 | - * |
|
75 | - * @since 1.9.0 |
|
76 | - */ |
|
77 | - do_action( 'sensei_learner_profile_inside_content_after' ); |
|
78 | - ?> |
|
72 | + /** |
|
73 | + * This hook fire inside learner-profile.php inside directly after the content |
|
74 | + * |
|
75 | + * @since 1.9.0 |
|
76 | + */ |
|
77 | + do_action( 'sensei_learner_profile_inside_content_after' ); |
|
78 | + ?> |
|
79 | 79 | |
80 | 80 | </section> |
81 | 81 | |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | |
84 | 84 | <?php |
85 | 85 | /** |
86 | - * This hook fire inside learner-profile.php after the content |
|
87 | - * |
|
88 | - * @since 1.9.0 |
|
89 | - */ |
|
86 | + * This hook fire inside learner-profile.php after the content |
|
87 | + * |
|
88 | + * @since 1.9.0 |
|
89 | + */ |
|
90 | 90 | do_action( 'sensei_learner_profile_content_after' ); |
91 | 91 | ?> |
92 | 92 |
@@ -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 | /** |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @hooked Sensei_Learner_Profiles::deprecate_sensei_learner_profile_content_hook - 10 |
23 | 23 | * @hooked Sensei_Templates::fire_sensei_complete_course_hook - 20 |
24 | 24 | */ |
25 | -do_action( 'sensei_learner_profile_content_before' ); |
|
25 | +do_action('sensei_learner_profile_content_before'); |
|
26 | 26 | ?> |
27 | 27 | |
28 | 28 | <article class="post"> |
@@ -37,32 +37,32 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @hooked Sensei_Templates::fire_frontend_messages_hook |
39 | 39 | */ |
40 | - do_action( 'sensei_learner_profile_inside_content_before' ); |
|
40 | + do_action('sensei_learner_profile_inside_content_before'); |
|
41 | 41 | ?> |
42 | 42 | |
43 | - <?php $learner_user = get_user_by( 'slug', get_query_var('learner_profile') ); // get requested learner object ?> |
|
43 | + <?php $learner_user = get_user_by('slug', get_query_var('learner_profile')); // get requested learner object ?> |
|
44 | 44 | |
45 | - <?php if( is_a( $learner_user, 'WP_User' ) ){ ?> |
|
45 | + <?php if (is_a($learner_user, 'WP_User')) { ?> |
|
46 | 46 | |
47 | 47 | <?php |
48 | 48 | |
49 | 49 | // show the user information |
50 | - Sensei_Learner_Profiles::user_info( $learner_user ); |
|
50 | + Sensei_Learner_Profiles::user_info($learner_user); |
|
51 | 51 | |
52 | 52 | ?> |
53 | 53 | |
54 | 54 | <?php |
55 | 55 | |
56 | 56 | // show the user courses |
57 | - Sensei()->course->load_user_courses_content( $learner_user ); |
|
57 | + Sensei()->course->load_user_courses_content($learner_user); |
|
58 | 58 | |
59 | 59 | ?> |
60 | 60 | |
61 | - <?php }else{ ?> |
|
61 | + <?php } else { ?> |
|
62 | 62 | |
63 | 63 | <p class="sensei-message"> |
64 | 64 | |
65 | - <?php _e( 'The user requested does not exist.', 'woothemes-sensei'); ?> |
|
65 | + <?php _e('The user requested does not exist.', 'woothemes-sensei'); ?> |
|
66 | 66 | |
67 | 67 | </p> |
68 | 68 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * |
75 | 75 | * @since 1.9.0 |
76 | 76 | */ |
77 | - do_action( 'sensei_learner_profile_inside_content_after' ); |
|
77 | + do_action('sensei_learner_profile_inside_content_after'); |
|
78 | 78 | ?> |
79 | 79 | |
80 | 80 | </section> |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * |
88 | 88 | * @since 1.9.0 |
89 | 89 | */ |
90 | -do_action( 'sensei_learner_profile_content_after' ); |
|
90 | +do_action('sensei_learner_profile_content_after'); |
|
91 | 91 | ?> |
92 | 92 | |
93 | 93 | <?php get_sensei_footer(); ?> |
94 | 94 | \ No newline at end of file |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | ?> |
60 | 60 | |
61 | - <?php }else{ ?> |
|
61 | + <?php } else{ ?> |
|
62 | 62 | |
63 | 63 | <p class="sensei-message"> |
64 | 64 |
@@ -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 Message Archive items |
5 | 5 | * |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @since 1.9.0 |
22 | 22 | */ |
23 | -do_action( 'sensei_loop_message_before' ); |
|
23 | +do_action('sensei_loop_message_before'); |
|
24 | 24 | ?> |
25 | 25 | |
26 | 26 | <div class="message-container" > |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @since 1.9.0 |
34 | 34 | */ |
35 | - do_action( 'sensei_loop_message_inside_before' ); |
|
35 | + do_action('sensei_loop_message_inside_before'); |
|
36 | 36 | ?> |
37 | 37 | |
38 | 38 | <?php |
39 | 39 | // loop through all messages |
40 | - while ( have_posts() ) { the_post(); |
|
40 | + while (have_posts()) { the_post(); |
|
41 | 41 | |
42 | - sensei_load_template_part('content','message'); |
|
42 | + sensei_load_template_part('content', 'message'); |
|
43 | 43 | |
44 | 44 | } |
45 | 45 | ?> |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @since 1.9.0 |
53 | 53 | */ |
54 | - do_action( 'sensei_loop_message_inside_after' ); |
|
54 | + do_action('sensei_loop_message_inside_after'); |
|
55 | 55 | ?> |
56 | 56 | |
57 | 57 | </div> |
@@ -63,5 +63,5 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @since 1.9.0 |
65 | 65 | */ |
66 | -do_action( 'sensei_loop_message_after' ); |
|
66 | +do_action('sensei_loop_message_after'); |
|
67 | 67 | ?> |
@@ -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,67 +1,67 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for outputting Message Archive items |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/loop-message.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
4 | + * The Template for outputting Message Archive items |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/loop-message.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 the message loop items in the loop-message.php template. It runs |
|
18 | - * only only for the message post type. This loop will not run if the current wp_query |
|
19 | - * has no posts. |
|
20 | - * |
|
21 | - * @since 1.9.0 |
|
22 | - */ |
|
17 | + * This runs before the the message loop items in the loop-message.php template. It runs |
|
18 | + * only only for the message post type. This loop will not run if the current wp_query |
|
19 | + * has no posts. |
|
20 | + * |
|
21 | + * @since 1.9.0 |
|
22 | + */ |
|
23 | 23 | do_action( 'sensei_loop_message_before' ); |
24 | 24 | ?> |
25 | 25 | |
26 | 26 | <div class="message-container" > |
27 | 27 | |
28 | 28 | <?php |
29 | - /** |
|
30 | - * This runs before the post type items in the loop.php template. It |
|
31 | - * runs within the message loop <ul> tag. |
|
32 | - * |
|
33 | - * @since 1.9.0 |
|
34 | - */ |
|
35 | - do_action( 'sensei_loop_message_inside_before' ); |
|
36 | - ?> |
|
29 | + /** |
|
30 | + * This runs before the post type items in the loop.php template. It |
|
31 | + * runs within the message loop <ul> tag. |
|
32 | + * |
|
33 | + * @since 1.9.0 |
|
34 | + */ |
|
35 | + do_action( 'sensei_loop_message_inside_before' ); |
|
36 | + ?> |
|
37 | 37 | |
38 | 38 | <?php |
39 | - // loop through all messages |
|
40 | - while ( have_posts() ) { the_post(); |
|
39 | + // loop through all messages |
|
40 | + while ( have_posts() ) { the_post(); |
|
41 | 41 | |
42 | - sensei_load_template_part('content','message'); |
|
42 | + sensei_load_template_part('content','message'); |
|
43 | 43 | |
44 | - } |
|
45 | - ?> |
|
44 | + } |
|
45 | + ?> |
|
46 | 46 | |
47 | 47 | <?php |
48 | - /** |
|
49 | - * This runs after the post type items in the loop.php template. It runs |
|
50 | - * only for the specified post type |
|
51 | - * |
|
52 | - * @since 1.9.0 |
|
53 | - */ |
|
54 | - do_action( 'sensei_loop_message_inside_after' ); |
|
55 | - ?> |
|
48 | + /** |
|
49 | + * This runs after the post type items in the loop.php template. It runs |
|
50 | + * only for the specified post type |
|
51 | + * |
|
52 | + * @since 1.9.0 |
|
53 | + */ |
|
54 | + do_action( 'sensei_loop_message_inside_after' ); |
|
55 | + ?> |
|
56 | 56 | |
57 | 57 | </div> |
58 | 58 | |
59 | 59 | <?php |
60 | 60 | /** |
61 | - * This runs after the post type items in the loop.php template. It runs |
|
62 | - * only for the specified post type |
|
63 | - * |
|
64 | - * @since 1.9.0 |
|
65 | - */ |
|
61 | + * This runs after the post type items in the loop.php template. It runs |
|
62 | + * only for the specified post type |
|
63 | + * |
|
64 | + * @since 1.9.0 |
|
65 | + */ |
|
66 | 66 | do_action( 'sensei_loop_message_after' ); |
67 | 67 | ?> |