@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public static function has_language_pack_available( $locale = null ) { |
93 | 93 | |
94 | - if ( is_null( $locale ) ) { |
|
94 | + if ( is_null( $locale ) ) { |
|
95 | 95 | |
96 | 96 | $locale = get_locale(); |
97 | 97 | |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | |
110 | 110 | } |
111 | 111 | |
112 | - if( isset( $_GET['translation_updated'] ) && 5 == $_GET['translation_updated'] ){ |
|
112 | + if( isset( $_GET['translation_updated'] ) && 5 == $_GET['translation_updated'] ){ |
|
113 | 113 | |
114 | - return false; |
|
114 | + return false; |
|
115 | 115 | |
116 | - } |
|
116 | + } |
|
117 | 117 | |
118 | 118 | $version = get_option( 'woothemes_sensei_language_pack_version', array( '0', $locale ) ); |
119 | 119 |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Template for displaying all Quiz Questions. |
|
4 | - * |
|
5 | - * Override this template by copying it to yourtheme/sensei/single-quiz.php |
|
6 | - * |
|
7 | - * @author Automattic |
|
8 | - * @package Sensei |
|
9 | - * @category Templates |
|
10 | - * @version 1.9.0 |
|
11 | - */ |
|
3 | + * The Template for displaying all Quiz Questions. |
|
4 | + * |
|
5 | + * Override this template by copying it to yourtheme/sensei/single-quiz.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(); ?> |
@@ -17,19 +17,19 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php |
19 | 19 | |
20 | - /** |
|
21 | - * Hook inside the single quiz post above the content |
|
22 | - * |
|
23 | - * @since 1.9.0 |
|
24 | - * |
|
25 | - * @hooked Sensei_Quiz::the_title - 20 |
|
26 | - * @hooked Sensei_Quiz::the_user_status_message - 40 |
|
27 | - * @param integer $quiz_id |
|
28 | - * |
|
29 | - */ |
|
30 | - do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() ); |
|
20 | + /** |
|
21 | + * Hook inside the single quiz post above the content |
|
22 | + * |
|
23 | + * @since 1.9.0 |
|
24 | + * |
|
25 | + * @hooked Sensei_Quiz::the_title - 20 |
|
26 | + * @hooked Sensei_Quiz::the_user_status_message - 40 |
|
27 | + * @param integer $quiz_id |
|
28 | + * |
|
29 | + */ |
|
30 | + do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() ); |
|
31 | 31 | |
32 | - ?> |
|
32 | + ?> |
|
33 | 33 | |
34 | 34 | <section class="entry quiz-questions"> |
35 | 35 | |
@@ -39,16 +39,16 @@ discard block |
||
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - /** |
|
43 | - * Action inside before the question content on single-quiz page |
|
44 | - * |
|
45 | - * @hooked WooThemes_Sensei_Quiz::the_user_status_message - 10 |
|
46 | - * |
|
47 | - * @param string $the_quiz_id |
|
48 | - */ |
|
49 | - do_action( 'sensei_single_quiz_questions_before', get_the_id() ); |
|
42 | + /** |
|
43 | + * Action inside before the question content on single-quiz page |
|
44 | + * |
|
45 | + * @hooked WooThemes_Sensei_Quiz::the_user_status_message - 10 |
|
46 | + * |
|
47 | + * @param string $the_quiz_id |
|
48 | + */ |
|
49 | + do_action( 'sensei_single_quiz_questions_before', get_the_id() ); |
|
50 | 50 | |
51 | - ?> |
|
51 | + ?> |
|
52 | 52 | |
53 | 53 | |
54 | 54 | |
@@ -60,35 +60,35 @@ discard block |
||
60 | 60 | |
61 | 61 | <?php |
62 | 62 | |
63 | - /** |
|
64 | - * Action inside before the question content on single-quiz page |
|
65 | - * |
|
66 | - * @hooked WooThemes_Sensei_Question::the_question_title - 10 |
|
67 | - * @hooked WooThemes_Sensei_Question::the_question_description - 20 |
|
68 | - * @hooked WooThemes_Sensei_Question::the_question_media - 30 |
|
69 | - * @hooked WooThemes_Sensei_Question::the_question_hidden_field - 40 |
|
70 | - * |
|
71 | - * @since 1.9.0 |
|
72 | - * @param string $the_question_id |
|
73 | - */ |
|
74 | - do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() ); |
|
75 | - |
|
76 | - ?> |
|
63 | + /** |
|
64 | + * Action inside before the question content on single-quiz page |
|
65 | + * |
|
66 | + * @hooked WooThemes_Sensei_Question::the_question_title - 10 |
|
67 | + * @hooked WooThemes_Sensei_Question::the_question_description - 20 |
|
68 | + * @hooked WooThemes_Sensei_Question::the_question_media - 30 |
|
69 | + * @hooked WooThemes_Sensei_Question::the_question_hidden_field - 40 |
|
70 | + * |
|
71 | + * @since 1.9.0 |
|
72 | + * @param string $the_question_id |
|
73 | + */ |
|
74 | + do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() ); |
|
75 | + |
|
76 | + ?> |
|
77 | 77 | |
78 | 78 | <?php sensei_the_question_content(); ?> |
79 | 79 | |
80 | 80 | <?php |
81 | 81 | |
82 | - /** |
|
83 | - * Action inside before the question content on single-quiz page |
|
84 | - * |
|
85 | - * @hooked WooThemes_Sensei_Question::answer_feedback_notes |
|
86 | - * |
|
87 | - * @param string $the_question_id |
|
88 | - */ |
|
89 | - do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() ); |
|
82 | + /** |
|
83 | + * Action inside before the question content on single-quiz page |
|
84 | + * |
|
85 | + * @hooked WooThemes_Sensei_Question::answer_feedback_notes |
|
86 | + * |
|
87 | + * @param string $the_question_id |
|
88 | + */ |
|
89 | + do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() ); |
|
90 | 90 | |
91 | - ?> |
|
91 | + ?> |
|
92 | 92 | |
93 | 93 | </li> |
94 | 94 | |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | |
99 | 99 | <?php |
100 | 100 | |
101 | - /** |
|
102 | - * Action inside before the question content on single-quiz page |
|
103 | - * |
|
104 | - * @param string $the_quiz_id |
|
105 | - */ |
|
106 | - do_action( 'sensei_single_quiz_questions_after', get_the_id() ); |
|
101 | + /** |
|
102 | + * Action inside before the question content on single-quiz page |
|
103 | + * |
|
104 | + * @param string $the_quiz_id |
|
105 | + */ |
|
106 | + do_action( 'sensei_single_quiz_questions_after', get_the_id() ); |
|
107 | 107 | |
108 | - ?> |
|
108 | + ?> |
|
109 | 109 | |
110 | 110 | </form> |
111 | 111 | <?php else: ?> |
@@ -116,25 +116,25 @@ discard block |
||
116 | 116 | |
117 | 117 | |
118 | 118 | <?php |
119 | - $quiz_lesson = Sensei()->quiz->data->quiz_lesson; |
|
120 | - do_action( 'sensei_quiz_back_link', $quiz_lesson ); |
|
121 | - ?> |
|
119 | + $quiz_lesson = Sensei()->quiz->data->quiz_lesson; |
|
120 | + do_action( 'sensei_quiz_back_link', $quiz_lesson ); |
|
121 | + ?> |
|
122 | 122 | |
123 | 123 | </section> |
124 | 124 | |
125 | 125 | <?php |
126 | 126 | |
127 | - /** |
|
128 | - * Hook inside the single quiz post above the content |
|
129 | - * |
|
130 | - * @since 1.9.0 |
|
131 | - * |
|
132 | - * @param integer $quiz_id |
|
133 | - * |
|
134 | - */ |
|
135 | - do_action( 'sensei_single_quiz_content_inside_after', get_the_ID() ); |
|
136 | - |
|
137 | - ?> |
|
127 | + /** |
|
128 | + * Hook inside the single quiz post above the content |
|
129 | + * |
|
130 | + * @since 1.9.0 |
|
131 | + * |
|
132 | + * @param integer $quiz_id |
|
133 | + * |
|
134 | + */ |
|
135 | + do_action( 'sensei_single_quiz_content_inside_after', get_the_ID() ); |
|
136 | + |
|
137 | + ?> |
|
138 | 138 | |
139 | 139 | </article><!-- .quiz --> |
140 | 140 |
@@ -1,51 +1,51 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * Content-course.php template file |
|
5 | - * |
|
6 | - * responsible for content on archive like pages. Only shows the course excerpt. |
|
7 | - * |
|
8 | - * For single course content please see single-course.php |
|
9 | - * |
|
10 | - * @author Automattic |
|
11 | - * @package Sensei |
|
12 | - * @category Templates |
|
13 | - * @version 1.9.0 |
|
14 | - */ |
|
4 | + * Content-course.php template file |
|
5 | + * |
|
6 | + * responsible for content on archive like pages. Only shows the course excerpt. |
|
7 | + * |
|
8 | + * For single course content please see single-course.php |
|
9 | + * |
|
10 | + * @author Automattic |
|
11 | + * @package Sensei |
|
12 | + * @category Templates |
|
13 | + * @version 1.9.0 |
|
14 | + */ |
|
15 | 15 | ?> |
16 | 16 | |
17 | 17 | <li <?php post_class( WooThemes_Sensei_Course::get_course_loop_content_class() ); ?> > |
18 | 18 | |
19 | 19 | <?php |
20 | - /** |
|
21 | - * This action runs before the sensei course content. It runs inside the sensei |
|
22 | - * content-course.php template. |
|
23 | - * |
|
24 | - * @since 1.9 |
|
25 | - * |
|
26 | - * @param integer $course_id |
|
27 | - */ |
|
28 | - do_action( 'sensei_course_content_before', get_the_ID() ); |
|
29 | - ?> |
|
20 | + /** |
|
21 | + * This action runs before the sensei course content. It runs inside the sensei |
|
22 | + * content-course.php template. |
|
23 | + * |
|
24 | + * @since 1.9 |
|
25 | + * |
|
26 | + * @param integer $course_id |
|
27 | + */ |
|
28 | + do_action( 'sensei_course_content_before', get_the_ID() ); |
|
29 | + ?> |
|
30 | 30 | |
31 | 31 | <section class="course-content"> |
32 | 32 | |
33 | 33 | <section class="entry"> |
34 | 34 | |
35 | 35 | <?php |
36 | - /** |
|
37 | - * Fires just before the course content in the content-course.php file. |
|
38 | - * |
|
39 | - * @since 1.9 |
|
40 | - * |
|
41 | - * @param integer $course_id |
|
42 | - * |
|
43 | - * @hooked Sensei_Templates::the_title - 5 |
|
44 | - * @hooked Sensei()->course->course_image - 10 |
|
45 | - * @hooked Sensei()->course->the_course_meta - 20 |
|
46 | - */ |
|
47 | - do_action('sensei_course_content_inside_before', get_the_ID() ); |
|
48 | - ?> |
|
36 | + /** |
|
37 | + * Fires just before the course content in the content-course.php file. |
|
38 | + * |
|
39 | + * @since 1.9 |
|
40 | + * |
|
41 | + * @param integer $course_id |
|
42 | + * |
|
43 | + * @hooked Sensei_Templates::the_title - 5 |
|
44 | + * @hooked Sensei()->course->course_image - 10 |
|
45 | + * @hooked Sensei()->course->the_course_meta - 20 |
|
46 | + */ |
|
47 | + do_action('sensei_course_content_inside_before', get_the_ID() ); |
|
48 | + ?> |
|
49 | 49 | |
50 | 50 | <p class="course-excerpt"> |
51 | 51 | |
@@ -54,34 +54,34 @@ discard block |
||
54 | 54 | </p> |
55 | 55 | |
56 | 56 | <?php |
57 | - /** |
|
58 | - * Fires just after the course content in the content-course.php file. |
|
59 | - * |
|
60 | - * @since 1.9 |
|
61 | - * |
|
62 | - * @param integer $course_id |
|
63 | - * |
|
64 | - * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
65 | - */ |
|
66 | - do_action('sensei_course_content_inside_after', get_the_ID() ); |
|
67 | - ?> |
|
57 | + /** |
|
58 | + * Fires just after the course content in the content-course.php file. |
|
59 | + * |
|
60 | + * @since 1.9 |
|
61 | + * |
|
62 | + * @param integer $course_id |
|
63 | + * |
|
64 | + * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
65 | + */ |
|
66 | + do_action('sensei_course_content_inside_after', get_the_ID() ); |
|
67 | + ?> |
|
68 | 68 | |
69 | 69 | </section> <!-- section .entry --> |
70 | 70 | |
71 | 71 | </section> <!-- section .course-content --> |
72 | 72 | |
73 | 73 | <?php |
74 | - /** |
|
75 | - * Fires after the course block in the content-course.php file. |
|
76 | - * |
|
77 | - * @since 1.9 |
|
78 | - * |
|
79 | - * @param integer $course_id |
|
80 | - * |
|
81 | - * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
82 | - */ |
|
83 | - do_action('sensei_course_content_after', get_the_ID() ); |
|
84 | - ?> |
|
74 | + /** |
|
75 | + * Fires after the course block in the content-course.php file. |
|
76 | + * |
|
77 | + * @since 1.9 |
|
78 | + * |
|
79 | + * @param integer $course_id |
|
80 | + * |
|
81 | + * @hooked Sensei()->course->the_course_free_lesson_preview - 20 |
|
82 | + */ |
|
83 | + do_action('sensei_course_content_after', get_the_ID() ); |
|
84 | + ?> |
|
85 | 85 | |
86 | 86 | |
87 | 87 | </li> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'course', 'post' ) ) ) ); ?> --> |
88 | 88 | \ No newline at end of file |
@@ -19,62 +19,62 @@ |
||
19 | 19 | |
20 | 20 | <?php |
21 | 21 | |
22 | - /** |
|
23 | - * Hook inside the single lesson above the content |
|
24 | - * |
|
25 | - * @since 1.9.0 |
|
26 | - * |
|
27 | - * @param integer $lesson_id |
|
28 | - * |
|
29 | - * @hooked deprecated_lesson_image_hook - 10 |
|
30 | - * @hooked deprecate_sensei_lesson_single_title - 15 |
|
31 | - * @hooked Sensei_Lesson::lesson_image() - 17 |
|
32 | - * @hooked deprecate_lesson_single_main_content_hook - 20 |
|
33 | - */ |
|
34 | - do_action( 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
35 | - |
|
36 | - ?> |
|
22 | + /** |
|
23 | + * Hook inside the single lesson above the content |
|
24 | + * |
|
25 | + * @since 1.9.0 |
|
26 | + * |
|
27 | + * @param integer $lesson_id |
|
28 | + * |
|
29 | + * @hooked deprecated_lesson_image_hook - 10 |
|
30 | + * @hooked deprecate_sensei_lesson_single_title - 15 |
|
31 | + * @hooked Sensei_Lesson::lesson_image() - 17 |
|
32 | + * @hooked deprecate_lesson_single_main_content_hook - 20 |
|
33 | + */ |
|
34 | + do_action( 'sensei_single_lesson_content_inside_before', get_the_ID() ); |
|
35 | + |
|
36 | + ?> |
|
37 | 37 | |
38 | 38 | <section class="entry fix"> |
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - if ( sensei_can_user_view_lesson() ) { |
|
42 | + if ( sensei_can_user_view_lesson() ) { |
|
43 | 43 | |
44 | - if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) { |
|
44 | + if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) { |
|
45 | 45 | |
46 | - do_action( 'sensei_lesson_video', $post->ID ); |
|
46 | + do_action( 'sensei_lesson_video', $post->ID ); |
|
47 | 47 | |
48 | - } |
|
48 | + } |
|
49 | 49 | |
50 | - the_content(); |
|
50 | + the_content(); |
|
51 | 51 | |
52 | - } else { |
|
53 | - ?> |
|
52 | + } else { |
|
53 | + ?> |
|
54 | 54 | |
55 | 55 | <p> <?php the_excerpt(); ?> </p> |
56 | 56 | |
57 | 57 | <?php |
58 | - } |
|
58 | + } |
|
59 | 59 | |
60 | - ?> |
|
60 | + ?> |
|
61 | 61 | |
62 | 62 | </section> |
63 | 63 | |
64 | 64 | <?php |
65 | 65 | |
66 | - /** |
|
67 | - * Hook inside the single lesson template after the content |
|
68 | - * |
|
69 | - * @since 1.9.0 |
|
70 | - * |
|
71 | - * @param integer $lesson_id |
|
72 | - * |
|
73 | - * @hooked Sensei()->frontend->sensei_breadcrumb - 30 |
|
74 | - */ |
|
75 | - do_action( 'sensei_single_lesson_content_inside_after', get_the_ID() ); |
|
76 | - |
|
77 | - ?> |
|
66 | + /** |
|
67 | + * Hook inside the single lesson template after the content |
|
68 | + * |
|
69 | + * @since 1.9.0 |
|
70 | + * |
|
71 | + * @param integer $lesson_id |
|
72 | + * |
|
73 | + * @hooked Sensei()->frontend->sensei_breadcrumb - 30 |
|
74 | + */ |
|
75 | + do_action( 'sensei_single_lesson_content_inside_after', get_the_ID() ); |
|
76 | + |
|
77 | + ?> |
|
78 | 78 | |
79 | 79 | </article><!-- .post --> |
80 | 80 |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * Content-lesson.php template file |
|
5 | - * |
|
6 | - * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
7 | - * |
|
8 | - * For single lesson content please see single-lesson.php |
|
9 | - * |
|
10 | - * @author Automattic |
|
11 | - * @package Sensei |
|
12 | - * @category Templates |
|
13 | - * @version 1.9.0 |
|
14 | - */ |
|
4 | + * Content-lesson.php template file |
|
5 | + * |
|
6 | + * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
7 | + * |
|
8 | + * For single lesson content please see single-lesson.php |
|
9 | + * |
|
10 | + * @author Automattic |
|
11 | + * @package Sensei |
|
12 | + * @category Templates |
|
13 | + * @version 1.9.0 |
|
14 | + */ |
|
15 | 15 | ?> |
16 | 16 | |
17 | 17 | <article <?php post_class( get_the_ID() ); ?> > |
@@ -19,32 +19,32 @@ discard block |
||
19 | 19 | <section class="lesson-content"> |
20 | 20 | |
21 | 21 | <?php |
22 | - /** |
|
23 | - * sensei_content_lesson_before |
|
24 | - * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
25 | - * content.php template. This applies to the specific post type that you've targeted. |
|
26 | - * |
|
27 | - * @since 1.9.0 |
|
28 | - * @param string $lesson_id |
|
29 | - */ |
|
30 | - do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
31 | - ?> |
|
22 | + /** |
|
23 | + * sensei_content_lesson_before |
|
24 | + * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
25 | + * content.php template. This applies to the specific post type that you've targeted. |
|
26 | + * |
|
27 | + * @since 1.9.0 |
|
28 | + * @param string $lesson_id |
|
29 | + */ |
|
30 | + do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
31 | + ?> |
|
32 | 32 | |
33 | 33 | <section class="entry"> |
34 | 34 | |
35 | 35 | <?php |
36 | - /** |
|
37 | - * Fires just before the post content in the content-lesson.php file. |
|
38 | - * |
|
39 | - * @since 1.9.0 |
|
40 | - * |
|
41 | - * @hooked Sensei()->modules->module_archive_description - 11 |
|
42 | - * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
43 | - * |
|
44 | - * @param string $lesson_id |
|
45 | - */ |
|
46 | - do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
47 | - ?> |
|
36 | + /** |
|
37 | + * Fires just before the post content in the content-lesson.php file. |
|
38 | + * |
|
39 | + * @since 1.9.0 |
|
40 | + * |
|
41 | + * @hooked Sensei()->modules->module_archive_description - 11 |
|
42 | + * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
43 | + * |
|
44 | + * @param string $lesson_id |
|
45 | + */ |
|
46 | + do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
47 | + ?> |
|
48 | 48 | |
49 | 49 | <p class="lesson-excerpt"> |
50 | 50 | |
@@ -53,28 +53,28 @@ discard block |
||
53 | 53 | </p> |
54 | 54 | |
55 | 55 | <?php |
56 | - /** |
|
57 | - * Fires just after the post content in the lesson-content.php file. |
|
58 | - * |
|
59 | - * @since 1.9.0 |
|
60 | - * |
|
61 | - * @param string $lesson_id |
|
62 | - */ |
|
63 | - do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
64 | - ?> |
|
56 | + /** |
|
57 | + * Fires just after the post content in the lesson-content.php file. |
|
58 | + * |
|
59 | + * @since 1.9.0 |
|
60 | + * |
|
61 | + * @param string $lesson_id |
|
62 | + */ |
|
63 | + do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
64 | + ?> |
|
65 | 65 | |
66 | 66 | </section> <!-- section .entry --> |
67 | 67 | |
68 | 68 | <?php |
69 | - /** |
|
70 | - * This action runs after the sensei lesson content. It runs inside the sensei |
|
71 | - * lesson-content.php template. |
|
72 | - * |
|
73 | - * @since 1.9.0 |
|
74 | - * @param string $lesson_id |
|
75 | - */ |
|
76 | - do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
77 | - ?> |
|
69 | + /** |
|
70 | + * This action runs after the sensei lesson content. It runs inside the sensei |
|
71 | + * lesson-content.php template. |
|
72 | + * |
|
73 | + * @since 1.9.0 |
|
74 | + * @param string $lesson_id |
|
75 | + */ |
|
76 | + do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
77 | + ?> |
|
78 | 78 | |
79 | 79 | </section> <!-- article .lesson-content --> |
80 | 80 |
@@ -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,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Template for displaying all single messages. |
|
4 | - * |
|
5 | - * Override this template by copying it to yourtheme/sensei/single-message.php |
|
6 | - * |
|
7 | - * @author Automattic |
|
8 | - * @package Sensei |
|
9 | - * @category Templates |
|
10 | - * @version 1.9.0 |
|
11 | - */ |
|
3 | + * The Template for displaying all single messages. |
|
4 | + * |
|
5 | + * Override this template by copying it to yourtheme/sensei/single-message.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(); ?> |
@@ -16,18 +16,18 @@ discard block |
||
16 | 16 | <article <?php post_class(); ?> > |
17 | 17 | |
18 | 18 | <?php |
19 | - /** |
|
20 | - * Action inside the single message template before the content |
|
21 | - * |
|
22 | - * @since 1.9.0 |
|
23 | - * |
|
24 | - * @param integer $message_id |
|
25 | - * |
|
26 | - * @hooked WooThemes_Sensei_Messages::the_title - 20 |
|
27 | - * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40 |
|
28 | - */ |
|
29 | - do_action( 'sensei_single_message_content_inside_before', get_the_ID()); |
|
30 | - ?> |
|
19 | + /** |
|
20 | + * Action inside the single message template before the content |
|
21 | + * |
|
22 | + * @since 1.9.0 |
|
23 | + * |
|
24 | + * @param integer $message_id |
|
25 | + * |
|
26 | + * @hooked WooThemes_Sensei_Messages::the_title - 20 |
|
27 | + * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40 |
|
28 | + */ |
|
29 | + do_action( 'sensei_single_message_content_inside_before', get_the_ID()); |
|
30 | + ?> |
|
31 | 31 | |
32 | 32 | <section class="entry"> |
33 | 33 | |
@@ -37,15 +37,15 @@ discard block |
||
37 | 37 | |
38 | 38 | <?php |
39 | 39 | |
40 | - /** |
|
41 | - * action inside the single message template after the content |
|
42 | - * @since 1.9.0 |
|
43 | - * |
|
44 | - * @param integer $message_id |
|
45 | - */ |
|
46 | - do_action( 'sensei_single_message_content_inside_after', get_the_ID()); |
|
40 | + /** |
|
41 | + * action inside the single message template after the content |
|
42 | + * @since 1.9.0 |
|
43 | + * |
|
44 | + * @param integer $message_id |
|
45 | + */ |
|
46 | + do_action( 'sensei_single_message_content_inside_after', get_the_ID()); |
|
47 | 47 | |
48 | - ?> |
|
48 | + ?> |
|
49 | 49 | </article><!-- .post --> |
50 | 50 | |
51 | 51 | <?php get_sensei_footer(); ?> |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function widget( $args, $instance ) { |
55 | 55 | |
56 | - $before_widget = $args[ 'before_widget' ]; |
|
57 | - $before_title = $args[ 'before_title' ]; |
|
58 | - $after_title = $args[ 'after_title' ]; |
|
59 | - $after_widget = $args[ 'after_widget' ]; |
|
56 | + $before_widget = $args[ 'before_widget' ]; |
|
57 | + $before_title = $args[ 'before_title' ]; |
|
58 | + $after_title = $args[ 'after_title' ]; |
|
59 | + $after_widget = $args[ 'after_widget' ]; |
|
60 | 60 | |
61 | 61 | if ( in_array( $instance['component'], array_keys( $this->woo_widget_componentslist ) ) && ( 'activecourses' == $instance['component'] || 'completedcourses' == $instance['component'] ) && !is_user_logged_in() ) { |
62 | 62 | // No Output |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param array $instance The settings for this instance. |
118 | 118 | * @return void |
119 | 119 | */ |
120 | - public function form( $instance ) { |
|
120 | + public function form( $instance ) { |
|
121 | 121 | |
122 | 122 | /* Set up some default widget settings. */ |
123 | 123 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | $post_args = array( 'post_type' => 'lesson', |
173 | 173 | 'posts_per_page' => intval( $instance[ 'limit' ] ), |
174 | 174 | 'orderby' => 'menu_order date', |
175 | - 'order' => 'DESC', |
|
176 | - 'post_status' => 'publish', |
|
175 | + 'order' => 'DESC', |
|
176 | + 'post_status' => 'publish', |
|
177 | 177 | 'suppress_filters' => 0 |
178 | 178 | ); |
179 | 179 | $posts_array = get_posts( $post_args ); |
@@ -181,14 +181,14 @@ discard block |
||
181 | 181 | if ( count( $posts_array ) > 0 ) { ?> |
182 | 182 | <ul> |
183 | 183 | <?php foreach ($posts_array as $post_item){ |
184 | - $post_id = absint( $post_item->ID ); |
|
185 | - $post_title = $post_item->post_title; |
|
186 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
187 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
188 | - $author_display_name = $user_info->display_name; |
|
189 | - $author_id = $post_item->post_author; |
|
190 | - $lesson_course_id = get_post_meta( $post_id, '_lesson_course', true ); |
|
191 | - ?> |
|
184 | + $post_id = absint( $post_item->ID ); |
|
185 | + $post_title = $post_item->post_title; |
|
186 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
187 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
188 | + $author_display_name = $user_info->display_name; |
|
189 | + $author_id = $post_item->post_author; |
|
190 | + $lesson_course_id = get_post_meta( $post_id, '_lesson_course', true ); |
|
191 | + ?> |
|
192 | 192 | <li class="fix"> |
193 | 193 | <?php do_action( 'sensei_lesson_image', $post_id, '100', '100', false, true ); ?> |
194 | 194 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function widget( $args, $instance ) { |
52 | 52 | |
53 | - $before_widget = $args[ 'before_widget' ]; |
|
54 | - $before_title = $args[ 'before_title' ]; |
|
55 | - $after_title = $args[ 'after_title' ]; |
|
56 | - $after_widget = $args[ 'after_widget' ]; |
|
53 | + $before_widget = $args[ 'before_widget' ]; |
|
54 | + $before_title = $args[ 'before_title' ]; |
|
55 | + $after_title = $args[ 'after_title' ]; |
|
56 | + $after_widget = $args[ 'after_widget' ]; |
|
57 | 57 | |
58 | 58 | /* Our variables from the widget settings. */ |
59 | 59 | $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base ); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @param array $instance The settings for this instance. |
111 | 111 | * @return void |
112 | 112 | */ |
113 | - public function form( $instance ) { |
|
113 | + public function form( $instance ) { |
|
114 | 114 | |
115 | 115 | /* Set up some default widget settings. */ |
116 | 116 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | $post_args = array( 'post_type' => 'course', |
158 | 158 | 'posts_per_page' => intval( $instance[ 'limit' ] ), |
159 | 159 | 'orderby' => 'menu_order date', |
160 | - 'order' => 'ASC', |
|
161 | - 'post_status' => 'publish', |
|
160 | + 'order' => 'ASC', |
|
161 | + 'post_status' => 'publish', |
|
162 | 162 | 'suppress_filters' => 0, |
163 | 163 | ); |
164 | 164 | |
@@ -175,13 +175,13 @@ discard block |
||
175 | 175 | if ( count( $posts_array ) > 0 ) { ?> |
176 | 176 | <ul> |
177 | 177 | <?php foreach ($posts_array as $post_item){ |
178 | - $post_id = absint( $post_item->ID ); |
|
179 | - $post_title = $post_item->post_title; |
|
180 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
181 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
182 | - $author_display_name = $user_info->display_name; |
|
183 | - $author_id = $post_item->post_author; |
|
184 | - ?> |
|
178 | + $post_id = absint( $post_item->ID ); |
|
179 | + $post_title = $post_item->post_title; |
|
180 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
181 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
182 | + $author_display_name = $user_info->display_name; |
|
183 | + $author_id = $post_item->post_author; |
|
184 | + ?> |
|
185 | 185 | <li class="fix"> |
186 | 186 | <?php do_action( 'sensei_course_image', $post_id ); ?> |
187 | 187 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |