Completed
Push — master ( 4fba21...48ea7a )
by Dwain
07:35
created
includes/hooks/template.php 1 patch
Spacing   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
  *
19 19
  ***************************/
20 20
 //This hook allow us to change the template WordPress loads for a given page/post_type @since 1.9.0
21
-add_filter( 'template_include', array ( 'Sensei_Templates', 'template_loader' ), 10, 1 );
21
+add_filter('template_include', array('Sensei_Templates', 'template_loader'), 10, 1);
22 22
 
23 23
 //This hook adds the sensei pagination to the pagination hook
24
-add_action( 'sensei_pagination', array( 'Sensei_Frontend', 'load_content_pagination' ), 30 );
24
+add_action('sensei_pagination', array('Sensei_Frontend', 'load_content_pagination'), 30);
25 25
 
26 26
 
27 27
 /***************************
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
  *
33 33
  ***************************/
34 34
 // deprecate the archive content hook @since 1.9.0
35
-add_action( 'sensei_archive_before_course_loop', array ( 'Sensei_Templates', 'deprecated_archive_course_content_hook' ), 10, 1 );
35
+add_action('sensei_archive_before_course_loop', array('Sensei_Templates', 'deprecated_archive_course_content_hook'), 10, 1);
36 36
 
37 37
 // Course archive title hook @since 1.9.0
38
-add_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 );
38
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0);
39 39
 
40 40
 // add the course image above the content
41
-add_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,10, 1 );
41
+add_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 10, 1);
42 42
 
43 43
 // add course content title to the courses on the archive page
44
-add_action('sensei_course_content_inside_before', array( 'Sensei_Templates', 'the_title' ) ,5, 1 );
44
+add_action('sensei_course_content_inside_before', array('Sensei_Templates', 'the_title'), 5, 1);
45 45
 
46 46
 /***************************
47 47
  *
@@ -53,33 +53,33 @@  discard block
 block discarded – undo
53 53
 // @1.9.0
54 54
 // add deprecated action hooks for backwards compatibility sake
55 55
 // hooks on single course page: sensei_course_image , sensei_course_single_title, sensei_course_single_meta
56
-add_action('sensei_single_course_content_inside_before', array( 'Sensei_Templates', 'deprecated_single_course_inside_before_hooks' ), 80);
56
+add_action('sensei_single_course_content_inside_before', array('Sensei_Templates', 'deprecated_single_course_inside_before_hooks'), 80);
57 57
 
58 58
 // @1.9.0
59 59
 // hook the single course title on the single course page
60
-add_action( 'sensei_single_course_content_inside_before',array( 'Sensei_Course', 'the_title'), 10 );
60
+add_action('sensei_single_course_content_inside_before', array('Sensei_Course', 'the_title'), 10);
61 61
 
62 62
 // @1.9.0
63 63
 // hook the single course title on the single course page
64
-add_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 20 );
64
+add_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 20);
65 65
 
66 66
 
67 67
 // @1.9.0
68 68
 //Add legacy hooks deprecated in 1.9.0
69
-add_action( 'sensei_single_course_content_inside_before', array( 'Sensei_Templates','deprecate_course_single_meta_hooks'), 10 );
69
+add_action('sensei_single_course_content_inside_before', array('Sensei_Templates', 'deprecate_course_single_meta_hooks'), 10);
70 70
 
71 71
 // @1.9.0
72 72
 // Filter the content and replace it with the excerpt if the user doesn't have full access
73
-add_filter( 'the_content', array('Sensei_Course', 'single_course_content' ) );
73
+add_filter('the_content', array('Sensei_Course', 'single_course_content'));
74 74
 
75 75
 // @1.9.0
76 76
 // Deprecate lessons specific single course hooks
77
-add_action( 'sensei_single_course_content_inside_after', array( 'Sensei_Templates','deprecate_sensei_course_single_lessons_hook' ) );
77
+add_action('sensei_single_course_content_inside_after', array('Sensei_Templates', 'deprecate_sensei_course_single_lessons_hook'));
78 78
 
79 79
 // @1.9.0
80 80
 // Deprecate single main content hooks
81
-add_action( 'sensei_single_course_content_inside_after', array( 'Sensei_Templates', 'deprecated_single_main_content_hook') );
82
-add_action( 'sensei_single_message_content_inside_after', array( 'Sensei_Templates', 'deprecated_single_main_content_hook') );
81
+add_action('sensei_single_course_content_inside_after', array('Sensei_Templates', 'deprecated_single_main_content_hook'));
82
+add_action('sensei_single_message_content_inside_after', array('Sensei_Templates', 'deprecated_single_main_content_hook'));
83 83
 
84 84
 /**
85 85
  * Deprecate all the post type single titile hooks in favor of before content and after content hooks
@@ -87,62 +87,62 @@  discard block
 block discarded – undo
87 87
  * @deprecate 1.9.0
88 88
  * @1.9.0
89 89
  */
90
-add_action('sensei_single_message_content_inside_before', array( 'Sensei_Templates', 'deprecate_all_post_type_single_title_hooks' ) );
90
+add_action('sensei_single_message_content_inside_before', array('Sensei_Templates', 'deprecate_all_post_type_single_title_hooks'));
91 91
 
92 92
 /**
93 93
  * Deprecate hooks into the single course modules
94 94
  * @deprecated since 1.9.0
95 95
  */
96
-add_action('sensei_single_course_modules_before', array('Sensei_Templates','deprecate_module_before_hook' ) );
97
-add_action('sensei_single_course_modules_after', array('Sensei_Templates','deprecate_module_after_hook' ) );
96
+add_action('sensei_single_course_modules_before', array('Sensei_Templates', 'deprecate_module_before_hook'));
97
+add_action('sensei_single_course_modules_after', array('Sensei_Templates', 'deprecate_module_after_hook'));
98 98
 
99 99
 // @since 1.9.0
100 100
 // add the single course lessons title
101
-add_action( 'sensei_single_course_content_inside_after' , array( 'Sensei_Course','the_course_lessons_title'), 9 );
101
+add_action('sensei_single_course_content_inside_after', array('Sensei_Course', 'the_course_lessons_title'), 9);
102 102
 
103 103
 // @since 1.9.0
104 104
 // hooks in the course lessons query and remove it at the end
105 105
 // also loading the course lessons template in the middle
106
-add_action( 'sensei_single_course_lessons_before', array('Sensei_Course','load_single_course_lessons_query' ) );
107
-add_action( 'sensei_single_course_content_inside_after', 'course_single_lessons', 10 );
108
-add_action( 'sensei_single_course_lessons_after', array( 'Sensei_Utils','restore_wp_query' ));
106
+add_action('sensei_single_course_lessons_before', array('Sensei_Course', 'load_single_course_lessons_query'));
107
+add_action('sensei_single_course_content_inside_after', 'course_single_lessons', 10);
108
+add_action('sensei_single_course_lessons_after', array('Sensei_Utils', 'restore_wp_query'));
109 109
 
110 110
 // @since 1.9.0
111 111
 // add post classes to the lessons on the single course page
112
-add_filter( 'post_class', array( 'Sensei_Lesson', 'single_course_lessons_classes' ) );
112
+add_filter('post_class', array('Sensei_Lesson', 'single_course_lessons_classes'));
113 113
 
114 114
 // @since 1.9.0
115 115
 // lesson meta information on the single course page
116
-add_action( 'sensei_single_course_inside_before_lesson', array('Sensei_Lesson','the_lesson_meta') , 5);
116
+add_action('sensei_single_course_inside_before_lesson', array('Sensei_Lesson', 'the_lesson_meta'), 5);
117 117
 
118 118
 //@since 1.9.0
119 119
 // lesson image
120
-add_action( 'sensei_single_course_inside_before_lesson', array('Sensei_Lesson','the_lesson_thumbnail') , 8);
120
+add_action('sensei_single_course_inside_before_lesson', array('Sensei_Lesson', 'the_lesson_thumbnail'), 8);
121 121
 
122 122
 //@since 1.9.0
123 123
 // lesson custom excerpts
124
-add_filter( 'get_the_excerpt', array( 'Sensei_Lesson', 'alter_the_lesson_excerpt' ) );
124
+add_filter('get_the_excerpt', array('Sensei_Lesson', 'alter_the_lesson_excerpt'));
125 125
 
126 126
 // @since 1.9.0
127 127
 // run a deprecated hook for backwards compatibility sake
128
-add_action( 'sensei_single_course_modules_before', array( 'Sensei_Core_Modules', 'deprecate_sensei_single_course_modules_content'  ) );
128
+add_action('sensei_single_course_modules_before', array('Sensei_Core_Modules', 'deprecate_sensei_single_course_modules_content'));
129 129
 
130 130
 // @since 1.9.0
131 131
 // hook in the module loop intialization functionality
132
-add_action( 'sensei_single_course_modules_before', array( 'Sensei_Core_Modules', 'setup_single_course_module_loop' ) );
132
+add_action('sensei_single_course_modules_before', array('Sensei_Core_Modules', 'setup_single_course_module_loop'));
133 133
 
134 134
 // @since 1.9.0
135 135
 // hook in the module loop destructor functionality
136
-add_action( 'sensei_single_course_modules_after', array( 'Sensei_Core_Modules', 'teardown_single_course_module_loop' ) );
136
+add_action('sensei_single_course_modules_after', array('Sensei_Core_Modules', 'teardown_single_course_module_loop'));
137 137
 
138 138
 // @since 1.9.0
139 139
 // hook in the possible full content override to show instead of excerpt
140
-add_filter('get_the_excerpt', array( 'Sensei_Course', 'full_content_excerpt_override' ) );
140
+add_filter('get_the_excerpt', array('Sensei_Course', 'full_content_excerpt_override'));
141 141
 
142 142
 //@since 1.9.0
143 143
 //Course meta
144
-add_action( 'sensei_single_course_content_inside_before', array( 'Sensei_Course', 'the_course_enrolment_actions' ), 30 );
145
-add_action( 'sensei_single_course_content_inside_before', array( 'Sensei_Course' , 'the_course_video' ), 40 );
144
+add_action('sensei_single_course_content_inside_before', array('Sensei_Course', 'the_course_enrolment_actions'), 30);
145
+add_action('sensei_single_course_content_inside_before', array('Sensei_Course', 'the_course_video'), 40);
146 146
 
147 147
 /***************************
148 148
  *
@@ -153,54 +153,54 @@  discard block
 block discarded – undo
153 153
  ***************************/
154 154
 //@since 1.9.0
155 155
 // deprecate hooks no longer needed
156
-add_action( 'sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'deprecate_quiz_sensei_single_main_content_hook' ) );
157
-add_action( 'sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'deprecate_quiz_sensei_quiz_single_title_hook' ) );
156
+add_action('sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'deprecate_quiz_sensei_single_main_content_hook'));
157
+add_action('sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'deprecate_quiz_sensei_quiz_single_title_hook'));
158 158
 
159 159
 //@since 1.9.0
160 160
 // Single quiz title
161
-add_filter( 'the_title', array( 'Sensei_Quiz' , 'single_quiz_title' ), 20 , 2 ); // append Quiz
162
-add_action( 'sensei_single_quiz_content_inside_before', array( 'Sensei_Quiz', 'the_title' ), 20 ); //output single quiz
161
+add_filter('the_title', array('Sensei_Quiz', 'single_quiz_title'), 20, 2); // append Quiz
162
+add_action('sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'the_title'), 20); //output single quiz
163 163
 
164 164
 // since 1.9.0
165 165
 // initialize the quiz questions loop
166
-add_action( 'sensei_single_quiz_content_inside_before', array( 'Sensei_Quiz', 'start_quiz_questions_loop') );
166
+add_action('sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'start_quiz_questions_loop'));
167 167
 
168 168
 // since 1.9.0
169 169
 // hook in the quiz user message
170
-add_action( 'sensei_single_quiz_content_inside_before', array( 'Sensei_Quiz', 'the_user_status_message' ), 40 );
170
+add_action('sensei_single_quiz_content_inside_before', array('Sensei_Quiz', 'the_user_status_message'), 40);
171 171
 
172 172
 //@since 1.9.0
173 173
 // hook in the question title, description and quesiton media
174
-add_action( 'sensei_quiz_question_inside_before', array( 'Sensei_Question','the_question_title' ), 10 );
175
-add_action( 'sensei_quiz_question_inside_before', array( 'Sensei_Question','the_question_description' ), 20 );
176
-add_action( 'sensei_quiz_question_inside_before', array( 'Sensei_Question','the_question_media' ), 30 );
177
-add_action( 'sensei_quiz_question_inside_before', array( 'Sensei_Question','the_question_hidden_fields' ), 40 );
174
+add_action('sensei_quiz_question_inside_before', array('Sensei_Question', 'the_question_title'), 10);
175
+add_action('sensei_quiz_question_inside_before', array('Sensei_Question', 'the_question_description'), 20);
176
+add_action('sensei_quiz_question_inside_before', array('Sensei_Question', 'the_question_media'), 30);
177
+add_action('sensei_quiz_question_inside_before', array('Sensei_Question', 'the_question_hidden_fields'), 40);
178 178
 
179 179
 //@since 1.9.0
180 180
 // hook in incorrect / correct message above questions if the quiz has been graded
181
-add_action( 'sensei_quiz_question_inside_before', array( 'Sensei_Question', 'the_answer_result_indication' ), 50 );
181
+add_action('sensei_quiz_question_inside_before', array('Sensei_Question', 'the_answer_result_indication'), 50);
182 182
 
183 183
 //@since 1.9.0
184 184
 // add answer grading feedback at the bottom of the question
185
-add_action( 'sensei_quiz_question_inside_after', array( 'Sensei_Question', 'answer_feedback_notes' ) );
185
+add_action('sensei_quiz_question_inside_after', array('Sensei_Question', 'answer_feedback_notes'));
186 186
 
187 187
 //@since 1.9.0
188 188
 // add extra question data for different quesiton types when get_question_template_data_is_called.
189
-add_filter( 'sensei_get_question_template_data', array( 'Sensei_Question','multiple_choice_load_question_data'), 10, 3);
190
-add_filter( 'sensei_get_question_template_data', array( 'Sensei_Question','gap_fill_load_question_data'), 10, 3);
191
-add_filter( 'sensei_get_question_template_data', array( 'Sensei_Question','file_upload_load_question_data'), 10, 3);
189
+add_filter('sensei_get_question_template_data', array('Sensei_Question', 'multiple_choice_load_question_data'), 10, 3);
190
+add_filter('sensei_get_question_template_data', array('Sensei_Question', 'gap_fill_load_question_data'), 10, 3);
191
+add_filter('sensei_get_question_template_data', array('Sensei_Question', 'file_upload_load_question_data'), 10, 3);
192 192
 
193 193
 //@since 1.9.0
194 194
 // deprecate the quiz button action
195
-add_action( 'sensei_single_quiz_questions_after', array( 'Sensei_Quiz', 'action_buttons' ), 10, 0 );
195
+add_action('sensei_single_quiz_questions_after', array('Sensei_Quiz', 'action_buttons'), 10, 0);
196 196
 
197 197
 //@since 1.9.0
198 198
 // deprecate the sensei_complete_quiz hook
199
-add_action( 'sensei_single_quiz_content_inside_before', array( 'Sensei_Templates', 'deprecate_sensei_complete_quiz_action' ));
199
+add_action('sensei_single_quiz_content_inside_before', array('Sensei_Templates', 'deprecate_sensei_complete_quiz_action'));
200 200
 
201 201
 //@since 1.9.0
202 202
 // deprecate the sensei_quiz_question_type hook
203
-add_action( 'sensei_quiz_question_inside_after', array( 'Sensei_Templates', 'deprecate_sensei_quiz_question_type_action' ));
203
+add_action('sensei_quiz_question_inside_after', array('Sensei_Templates', 'deprecate_sensei_quiz_question_type_action'));
204 204
 
205 205
 /***************************
206 206
  *
@@ -211,63 +211,63 @@  discard block
 block discarded – undo
211 211
  ***************************/
212 212
 //@since 1.9.0
213 213
 // deprecate the main content hook on the single lesson page
214
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Templates', 'deprecate_lesson_single_main_content_hook' ), 20);
214
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Templates', 'deprecate_lesson_single_main_content_hook'), 20);
215 215
 
216 216
 //@since 1.9.0
217 217
 // hook in the lesson image on the single lesson
218
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Lesson', 'the_lesson_image' ), 17 );
218
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Lesson', 'the_lesson_image'), 17);
219 219
 
220 220
 //@since 1.9.0
221 221
 // hook in the lesson image on the single lesson deprecated hook function
222
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Templates','deprecate_lesson_image_hook' ), 10 );
222
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Templates', 'deprecate_lesson_image_hook'), 10);
223 223
 
224 224
 //@since 1.9.0
225 225
 // hook in the lesson single title deprecated function
226
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Templates', 'deprecate_sensei_lesson_single_title' ), 15 );
226
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Templates', 'deprecate_sensei_lesson_single_title'), 15);
227 227
 
228 228
 // @since 1.9.0
229 229
 // hook in the sensei lesson user notices
230
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Lesson', 'user_not_taking_course_message' ), 15 );
230
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Lesson', 'user_not_taking_course_message'), 15);
231 231
 
232 232
 // @since 1.9.0
233 233
 // attach the lesson title
234
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Lesson', 'the_title' ), 15 );
234
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Lesson', 'the_title'), 15);
235 235
 
236 236
 //@since 1.9.0
237 237
 // hook in the lesson image on the single lesson
238
-add_action( 'sensei_single_lesson_content_inside_before', array( 'Sensei_Lesson', 'user_lesson_quiz_status_message' ), 20 );
238
+add_action('sensei_single_lesson_content_inside_before', array('Sensei_Lesson', 'user_lesson_quiz_status_message'), 20);
239 239
 
240 240
 // @since 1.9.0
241 241
 // add the single lesson meta
242
-add_action( 'sensei_single_lesson_content_inside_after', 'sensei_the_single_lesson_meta', 10 );
242
+add_action('sensei_single_lesson_content_inside_after', 'sensei_the_single_lesson_meta', 10);
243 243
 
244 244
 // @since 1.9.0
245 245
 // deprecate the sensei_lesson_single_meta hook
246
-add_action( 'sensei_single_lesson_content_inside_after', array( 'Sensei_Templates', 'deprecate_sensei_lesson_single_meta_hook' ), 15 );
246
+add_action('sensei_single_lesson_content_inside_after', array('Sensei_Templates', 'deprecate_sensei_lesson_single_meta_hook'), 15);
247 247
 
248 248
 // @since 1.9.0
249 249
 // deprecate the sensei_lesson_course_signup hook
250
-add_action( 'sensei_single_lesson_content_inside_after', array( 'Sensei_Templates','deprecate_sensei_lesson_course_signup_hook' ), 20 );
250
+add_action('sensei_single_lesson_content_inside_after', array('Sensei_Templates', 'deprecate_sensei_lesson_course_signup_hook'), 20);
251 251
 
252 252
 // @since 1.9.0
253 253
 // hook in the lesson prerequisite completion message
254
-add_action( 'sensei_single_lesson_content_inside_after', array( 'Sensei_Lesson', 'prerequisite_complete_message' ), 20 );
254
+add_action('sensei_single_lesson_content_inside_after', array('Sensei_Lesson', 'prerequisite_complete_message'), 20);
255 255
 
256 256
 // @since 1.9.0
257 257
 // hook the single lesson course_signup_link
258
-add_action( 'sensei_single_lesson_content_inside_after', array( 'Sensei_Lesson', 'course_signup_link' ), 30 );
258
+add_action('sensei_single_lesson_content_inside_after', array('Sensei_Lesson', 'course_signup_link'), 30);
259 259
 
260 260
 // @since 1.9.0
261 261
 // hook the deprecate breadcrumbs and comments hooks
262
-add_action( 'sensei_after_main_content', array( 'Sensei_Templates', 'deprecate_single_lesson_breadcrumbs_and_comments_hooks'), 5 );
262
+add_action('sensei_after_main_content', array('Sensei_Templates', 'deprecate_single_lesson_breadcrumbs_and_comments_hooks'), 5);
263 263
 
264 264
 // @since 1.9.0
265 265
 // Add the quiz specific buttons and notices to the lesson
266
-add_action( 'sensei_single_lesson_content_inside_after', array('Sensei_Lesson', 'footer_quiz_call_to_action' ));
266
+add_action('sensei_single_lesson_content_inside_after', array('Sensei_Lesson', 'footer_quiz_call_to_action'));
267 267
 
268 268
 // @since 1.9.0
269 269
 // hook in the comments on the single lessons page
270
-add_action( 'sensei_pagination', array( 'Sensei_Lesson', 'output_comments' ), 90 );
270
+add_action('sensei_pagination', array('Sensei_Lesson', 'output_comments'), 90);
271 271
 
272 272
 /**********************
273 273
  *
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
  *
278 278
  ************************/
279 279
 
280
-add_action( 'sensei_single_message_content_inside_before', array( 'Sensei_Messages', 'the_title' ), 20 );
280
+add_action('sensei_single_message_content_inside_before', array('Sensei_Messages', 'the_title'), 20);
281 281
 
282
-add_action( 'sensei_single_message_content_inside_before', array( 'Sensei_Messages', 'the_message_sent_by_title' ), 40 );
282
+add_action('sensei_single_message_content_inside_before', array('Sensei_Messages', 'the_message_sent_by_title'), 40);
283 283
 
284 284
 /*************************
285 285
  *
@@ -291,19 +291,19 @@  discard block
 block discarded – undo
291 291
 
292 292
 // deprecate the sensei_lesson_archive_header hook
293 293
 // @deprecated since 1.9.0
294
-add_action( 'sensei_loop_lesson_inside_before', array( 'Sensei_Lesson', 'deprecate_sensei_lesson_archive_header_hook' ), 20 );
294
+add_action('sensei_loop_lesson_inside_before', array('Sensei_Lesson', 'deprecate_sensei_lesson_archive_header_hook'), 20);
295 295
 
296 296
 // @1.9.0
297 297
 //The archive title header on the lesson archive loop
298
-add_action( 'sensei_loop_lesson_inside_before', array( Sensei()->lesson, 'the_archive_header' ), 20 );
298
+add_action('sensei_loop_lesson_inside_before', array(Sensei()->lesson, 'the_archive_header'), 20);
299 299
 
300 300
 // @since 1.9.0
301 301
 //Output the lesson header on the content-lesson.php which runs inside the lessons loop
302
-add_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 20 );
302
+add_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 20);
303 303
 
304 304
 // @since 1.9.0
305 305
 // output only part of the lesson on the archive
306
-add_filter('the_content', array( 'Sensei_Lesson','limit_archive_content' ) );
306
+add_filter('the_content', array('Sensei_Lesson', 'limit_archive_content'));
307 307
 
308 308
 /**************************
309 309
  *
@@ -314,15 +314,15 @@  discard block
 block discarded – undo
314 314
  **************************/
315 315
 // @since 1.9.0
316 316
 // deprecate the learner profile content hook as the markup code is added in the template directly.
317
-add_action('sensei_learner_profile_content_before', array( 'Sensei_Learner_Profiles', 'deprecate_sensei_learner_profile_content_hook' ) );
317
+add_action('sensei_learner_profile_content_before', array('Sensei_Learner_Profiles', 'deprecate_sensei_learner_profile_content_hook'));
318 318
 
319 319
 // @since 1.9.0
320 320
 // do the sensei complete course action on the learner profiles page.
321
-add_action('sensei_learner_profile_content_before', array( 'Sensei_Templates', 'fire_sensei_complete_course_hook' ) );
321
+add_action('sensei_learner_profile_content_before', array('Sensei_Templates', 'fire_sensei_complete_course_hook'));
322 322
 
323 323
 // @since 1.9.0
324 324
 // fire the frontend messages hook before the profile content
325
-add_action('sensei_learner_profile_inside_content_before', array( 'Sensei_Templates', 'fire_frontend_messages_hook' ) );
325
+add_action('sensei_learner_profile_inside_content_before', array('Sensei_Templates', 'fire_frontend_messages_hook'));
326 326
 
327 327
 
328 328
 /**********************************
@@ -335,26 +335,26 @@  discard block
 block discarded – undo
335 335
 
336 336
 // @since 1.9.0
337 337
 // fire the deprecated hook function within the course-result.php file
338
-add_action( 'sensei_course_results_content_before', array('Sensei_Course_Results','deprecate_sensei_course_results_content_hook') );
338
+add_action('sensei_course_results_content_before', array('Sensei_Course_Results', 'deprecate_sensei_course_results_content_hook'));
339 339
 
340 340
 // @since 1.9.0
341 341
 // fire the sensei message hooke inside the course-result.php file
342
-add_action( 'sensei_course_results_content_inside_before', array('Sensei_Course_Results','fire_sensei_message_hook') );
342
+add_action('sensei_course_results_content_inside_before', array('Sensei_Course_Results', 'fire_sensei_message_hook'));
343 343
 
344 344
 // @since 1.9.0
345 345
 // load the course information on the course results page
346
-add_action( 'sensei_course_results_content_inside_before_lessons', array( Sensei()->course_results,'course_info') );
346
+add_action('sensei_course_results_content_inside_before_lessons', array(Sensei()->course_results, 'course_info'));
347 347
 
348 348
 // @since 1.9.0
349
-add_action( 'sensei_course_results_content_inside_before', array( Sensei()->course,'course_image') );
349
+add_action('sensei_course_results_content_inside_before', array(Sensei()->course, 'course_image'));
350 350
 
351 351
 // @since 1.9.0
352 352
 // deprecate the course results top hook in favour of a new hook
353
-add_action( 'sensei_course_results_content_inside_before', array( 'Sensei_Course_Results', 'deprecate_course_results_top_hook') );
353
+add_action('sensei_course_results_content_inside_before', array('Sensei_Course_Results', 'deprecate_course_results_top_hook'));
354 354
 
355 355
 // @since 1.9.0
356 356
 // Fire the course image hook within the course results page
357
-add_action( 'sensei_course_results_content_inside_before', array( 'Sensei_Course_Results', 'fire_course_image_hook') );
357
+add_action('sensei_course_results_content_inside_before', array('Sensei_Course_Results', 'fire_course_image_hook'));
358 358
 
359 359
 
360 360
 /**********************************
@@ -366,19 +366,19 @@  discard block
 block discarded – undo
366 366
  ********************************/
367 367
 // @since 1.9.0
368 368
 // fire the sensei complete course action on the my courses template
369
-add_action( 'sensei_my_courses_before', array( 'Sensei_Templates', 'fire_sensei_complete_course_hook' ) );
369
+add_action('sensei_my_courses_before', array('Sensei_Templates', 'fire_sensei_complete_course_hook'));
370 370
 
371 371
 // @since 1.9.0
372 372
 // fire the sensei frontend messages hook before the my-courses content
373
-add_action('sensei_my_courses_content_inside_before', array( 'Sensei_Templates', 'fire_frontend_messages_hook' ) );
373
+add_action('sensei_my_courses_content_inside_before', array('Sensei_Templates', 'fire_frontend_messages_hook'));
374 374
 
375 375
 // @since 1.9.0
376 376
 // deprecate the sensei_before_user_course_content hook
377
-add_action('sensei_my_courses_content_inside_before', array( 'Sensei_Templates', 'deprecate_sensei_before_user_course_content_hook' ) );
377
+add_action('sensei_my_courses_content_inside_before', array('Sensei_Templates', 'deprecate_sensei_before_user_course_content_hook'));
378 378
 
379 379
 // @since 1.9.0
380 380
 // deprecate the sensei_after_user_course_content hook
381
-add_action('sensei_my_courses_content_inside_after', array( 'Sensei_Templates', 'deprecate_sensei_after_user_course_content_hook' ) );
381
+add_action('sensei_my_courses_content_inside_after', array('Sensei_Templates', 'deprecate_sensei_after_user_course_content_hook'));
382 382
 
383 383
 /**********************************
384 384
  *
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 // @since 1.9.0
391 391
 // deprecate the sensei_login_form hok which was use to load the login form.
392 392
 // This now loads independent of the my-courses template which helps keep templates free from logic
393
-add_action( 'sensei_login_form_before', array( 'Sensei_Templates', 'deprecate_sensei_login_form_hook' ) );
393
+add_action('sensei_login_form_before', array('Sensei_Templates', 'deprecate_sensei_login_form_hook'));
394 394
 
395 395
 /**********************************
396 396
  *
@@ -401,16 +401,16 @@  discard block
 block discarded – undo
401 401
  ********************************/
402 402
 // @since 1.9.0
403 403
 // Deprecate the archive messages hooks no longer supported
404
-add_action( 'sensei_archive_before_message_loop', array( 'Sensei_Templates', 'deprecated_archive_message_hooks' ) );
404
+add_action('sensei_archive_before_message_loop', array('Sensei_Templates', 'deprecated_archive_message_hooks'));
405 405
 
406 406
 // @since 1.9.0
407 407
 // Deprecate the archive messages hooks no longer supported
408
-add_action( 'sensei_archive_before_message_loop', array( 'Sensei_Messages', 'the_archive_header' ) );
408
+add_action('sensei_archive_before_message_loop', array('Sensei_Messages', 'the_archive_header'));
409 409
 
410 410
 // @since 1.9.0
411 411
 // output the message title and the message sensei
412
-add_action( 'sensei_content_message_before', array( 'Sensei_Messages', 'the_message_title' ), 10, 1 );
413
-add_action( 'sensei_content_message_before', array( 'Sensei_Messages', 'the_message_sender' ), 20 , 1 );
412
+add_action('sensei_content_message_before', array('Sensei_Messages', 'the_message_title'), 10, 1);
413
+add_action('sensei_content_message_before', array('Sensei_Messages', 'the_message_sender'), 20, 1);
414 414
 
415 415
 /**********************************
416 416
  *
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
  *
420 420
  *
421 421
  **********************************/
422
-add_action( 'sensei_loop_course_before', array( 'Sensei_Course', 'course_category_title' ), 70 , 1 );
422
+add_action('sensei_loop_course_before', array('Sensei_Course', 'course_category_title'), 70, 1);
423 423
 
424 424
 /**********************************
425 425
  *
@@ -430,9 +430,9 @@  discard block
 block discarded – undo
430 430
  **********************************/
431 431
 //@since 1.9.0
432 432
 //add a title to the teacher archive page when viewn siteurl/author/{teacher-username}
433
-add_action( 'sensei_teacher_archive_course_loop_before', array( 'Sensei_Teacher', 'archive_title' ) );
433
+add_action('sensei_teacher_archive_course_loop_before', array('Sensei_Teacher', 'archive_title'));
434 434
 
435 435
 //@since 1.9.0
436 436
 // remove course meta from the teacher page until it can be refactored to allow only removing the
437 437
 // teacher name and not all lessons
438
-add_action( 'sensei_teacher_archive_course_loop_before', array( 'Sensei_Teacher', 'remove_course_meta_on_teacher_archive' ) );
438
+add_action('sensei_teacher_archive_course_loop_before', array('Sensei_Teacher', 'remove_course_meta_on_teacher_archive'));
Please login to merge, or discard this patch.