@@ -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> |
@@ -49,31 +49,31 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function widget( $args, $instance ) { |
51 | 51 | |
52 | - $before_widget = $args[ 'before_widget' ]; |
|
53 | - $before_title = $args[ 'before_title' ]; |
|
54 | - $after_title = $args[ 'after_title' ]; |
|
55 | - $after_widget = $args[ 'after_widget' ]; |
|
52 | + $before_widget = $args[ 'before_widget' ]; |
|
53 | + $before_title = $args[ 'before_title' ]; |
|
54 | + $after_title = $args[ 'after_title' ]; |
|
55 | + $after_widget = $args[ 'after_widget' ]; |
|
56 | 56 | |
57 | - /* Our variables from the widget settings. */ |
|
58 | - $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base ); |
|
57 | + /* Our variables from the widget settings. */ |
|
58 | + $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base ); |
|
59 | 59 | |
60 | - /* Before widget (defined by themes). */ |
|
61 | - echo $before_widget; |
|
60 | + /* Before widget (defined by themes). */ |
|
61 | + echo $before_widget; |
|
62 | 62 | |
63 | - /* Display the widget title if one was input (before and after defined by themes). */ |
|
64 | - if ( $title ) { echo $before_title . $title . $after_title; } |
|
63 | + /* Display the widget title if one was input (before and after defined by themes). */ |
|
64 | + if ( $title ) { echo $before_title . $title . $after_title; } |
|
65 | 65 | |
66 | - /* Widget content. */ |
|
67 | - // Add actions for plugins/themes to hook onto. |
|
68 | - do_action( $this->woo_widget_cssclass . '_top' ); |
|
66 | + /* Widget content. */ |
|
67 | + // Add actions for plugins/themes to hook onto. |
|
68 | + do_action( $this->woo_widget_cssclass . '_top' ); |
|
69 | 69 | |
70 | - $this->load_component( $instance ); |
|
70 | + $this->load_component( $instance ); |
|
71 | 71 | |
72 | - // Add actions for plugins/themes to hook onto. |
|
73 | - do_action( $this->woo_widget_cssclass . '_bottom' ); |
|
72 | + // Add actions for plugins/themes to hook onto. |
|
73 | + do_action( $this->woo_widget_cssclass . '_bottom' ); |
|
74 | 74 | |
75 | - /* After widget (defined by themes). */ |
|
76 | - echo $after_widget; |
|
75 | + /* After widget (defined by themes). */ |
|
76 | + echo $after_widget; |
|
77 | 77 | |
78 | 78 | } // End widget() |
79 | 79 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @param array $instance The settings for this instance. |
108 | 108 | * @return void |
109 | 109 | */ |
110 | - public function form( $instance ) { |
|
110 | + public function form( $instance ) { |
|
111 | 111 | |
112 | 112 | /* Set up some default widget settings. */ |
113 | 113 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | * @since 1.4.0 |
11 | 11 | */ |
12 | 12 | class Sensei_Learner_Profiles { |
13 | - /** |
|
14 | - * @var string |
|
15 | - */ |
|
16 | - private $profile_url_base; |
|
13 | + /** |
|
14 | + * @var string |
|
15 | + */ |
|
16 | + private $profile_url_base; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Constructor. |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function setup_permastruct() { |
44 | 44 | |
45 | - if( isset( Sensei()->settings->settings[ 'learner_profile_enable' ] ) |
|
46 | - && Sensei()->settings->settings[ 'learner_profile_enable' ] ) { |
|
45 | + if( isset( Sensei()->settings->settings[ 'learner_profile_enable' ] ) |
|
46 | + && Sensei()->settings->settings[ 'learner_profile_enable' ] ) { |
|
47 | 47 | |
48 | 48 | add_rewrite_rule( '^' . $this->profile_url_base . '/([^/]*)/?', 'index.php?learner_profile=$matches[1]', 'top' ); |
49 | 49 | add_rewrite_tag( '%learner_profile%', '([^&]+)' ); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | if( isset( $wp_query->query_vars['learner_profile'] ) ) { |
63 | 63 | $learner_user = get_user_by( 'login', $wp_query->query_vars['learner_profile'] ); |
64 | 64 | |
65 | - $name = Sensei_Learner::get_full_name( $learner_user->ID ); |
|
65 | + $name = Sensei_Learner::get_full_name( $learner_user->ID ); |
|
66 | 66 | |
67 | 67 | $title = apply_filters( 'sensei_learner_profile_courses_heading', sprintf( __( 'Courses %s is taking', 'woothemes-sensei' ), $name ) ) . ' ' . $sep . ' '; |
68 | 68 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | if( isset( $wp_query->query_vars['learner_profile'] ) ) { |
112 | 112 | |
113 | - Sensei_Templates::get_template( 'learner-profile/learner-info.php' ); |
|
113 | + Sensei_Templates::get_template( 'learner-profile/learner-info.php' ); |
|
114 | 114 | |
115 | 115 | } |
116 | 116 | } |
@@ -140,43 +140,43 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public static function user_info( $user ) { |
142 | 142 | |
143 | - /** |
|
144 | - * This hooke fires inside the Sensei_Learner_Profiles::user_info function. |
|
145 | - * just before the htmls is generated. |
|
146 | - * @since 1.0.0 |
|
147 | - */ |
|
148 | - do_action( 'sensei_learner_profile_info', $user ); |
|
149 | - |
|
150 | - /** |
|
151 | - * This filter runs inside the Sensei_Learner_Profiles::user_info function. |
|
152 | - * Here you can change the user avatar. |
|
153 | - * |
|
154 | - * @since 1.0.0 |
|
155 | - * |
|
156 | - * @param false|string `<img>` $user_avatar |
|
157 | - */ |
|
143 | + /** |
|
144 | + * This hooke fires inside the Sensei_Learner_Profiles::user_info function. |
|
145 | + * just before the htmls is generated. |
|
146 | + * @since 1.0.0 |
|
147 | + */ |
|
148 | + do_action( 'sensei_learner_profile_info', $user ); |
|
149 | + |
|
150 | + /** |
|
151 | + * This filter runs inside the Sensei_Learner_Profiles::user_info function. |
|
152 | + * Here you can change the user avatar. |
|
153 | + * |
|
154 | + * @since 1.0.0 |
|
155 | + * |
|
156 | + * @param false|string `<img>` $user_avatar |
|
157 | + */ |
|
158 | 158 | $learner_avatar = apply_filters( 'sensei_learner_profile_info_avatar', get_avatar( $user->ID, 120 ), $user->ID ); |
159 | 159 | |
160 | - /** |
|
161 | - * This filter runs inside the Sensei_Learner_Profiles::user_info function. |
|
162 | - * Here you can change the learner profile user display name. |
|
163 | - * @since 1.0.0 |
|
164 | - * |
|
165 | - * @param string $user_display_name |
|
166 | - * @param string $user_id |
|
167 | - */ |
|
160 | + /** |
|
161 | + * This filter runs inside the Sensei_Learner_Profiles::user_info function. |
|
162 | + * Here you can change the learner profile user display name. |
|
163 | + * @since 1.0.0 |
|
164 | + * |
|
165 | + * @param string $user_display_name |
|
166 | + * @param string $user_id |
|
167 | + */ |
|
168 | 168 | $learner_name = apply_filters( 'sensei_learner_profile_info_name', $user->display_name, $user->ID ); |
169 | 169 | |
170 | - /** |
|
171 | - * This filter runs inside the Sensei_Learner_Profiles::user_info function. |
|
172 | - * With this filter can change the users description on the learner user info |
|
173 | - * output. |
|
174 | - * |
|
175 | - * @since 1.0.0 |
|
176 | - * |
|
177 | - * @param string $user_description |
|
178 | - * @param string $user_id |
|
179 | - */ |
|
170 | + /** |
|
171 | + * This filter runs inside the Sensei_Learner_Profiles::user_info function. |
|
172 | + * With this filter can change the users description on the learner user info |
|
173 | + * output. |
|
174 | + * |
|
175 | + * @since 1.0.0 |
|
176 | + * |
|
177 | + * @param string $user_description |
|
178 | + * @param string $user_id |
|
179 | + */ |
|
180 | 180 | $learner_bio = apply_filters( 'sensei_learner_profile_info_bio', $user->description, $user->ID ); |
181 | 181 | ?> |
182 | 182 | |
@@ -210,16 +210,16 @@ discard block |
||
210 | 210 | return $classes; |
211 | 211 | } |
212 | 212 | |
213 | - /** |
|
214 | - * Deprecate the deprecate_sensei_learner_profile_content hook |
|
215 | - * |
|
216 | - * @since 1.9.0 |
|
217 | - */ |
|
218 | - public static function deprecate_sensei_learner_profile_content_hook(){ |
|
213 | + /** |
|
214 | + * Deprecate the deprecate_sensei_learner_profile_content hook |
|
215 | + * |
|
216 | + * @since 1.9.0 |
|
217 | + */ |
|
218 | + public static function deprecate_sensei_learner_profile_content_hook(){ |
|
219 | 219 | |
220 | - sensei_do_deprecated_action( 'sensei_learner_profile_content', '1.9.0', 'sensei_learner_profile_content_before' ); |
|
220 | + sensei_do_deprecated_action( 'sensei_learner_profile_content', '1.9.0', 'sensei_learner_profile_content_before' ); |
|
221 | 221 | |
222 | - } |
|
222 | + } |
|
223 | 223 | |
224 | 224 | |
225 | 225 | } // End Class |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | class Sensei_Grading_Main extends WooThemes_Sensei_List_Table { |
12 | 12 | |
13 | - public $user_id; |
|
13 | + public $user_id; |
|
14 | 14 | public $course_id; |
15 | 15 | public $lesson_id; |
16 | 16 | public $view; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $grade = __( 'N/A', 'woothemes-sensei' ); |
250 | 250 | } |
251 | 251 | |
252 | - $title = Sensei_Learner::get_full_name( $item->user_id ); |
|
252 | + $title = Sensei_Learner::get_full_name( $item->user_id ); |
|
253 | 253 | |
254 | 254 | // QuizID to be deprecated |
255 | 255 | $quiz_id = get_post_meta( $item->comment_post_ID, '_lesson_quiz', true ); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | */ |
300 | 300 | public function no_items() { |
301 | 301 | |
302 | - _e( 'No submissions found.', 'woothemes-sensei' ); |
|
302 | + _e( 'No submissions found.', 'woothemes-sensei' ); |
|
303 | 303 | |
304 | 304 | } // End no_items() |
305 | 305 |
@@ -230,9 +230,9 @@ discard block |
||
230 | 230 | } |
231 | 231 | |
232 | 232 | // Output users data |
233 | - $user_name = Sensei_Learner::get_full_name( $item->user_id ); |
|
233 | + $user_name = Sensei_Learner::get_full_name( $item->user_id ); |
|
234 | 234 | |
235 | - if ( !$this->csv_output ) { |
|
235 | + if ( !$this->csv_output ) { |
|
236 | 236 | $url = add_query_arg( array( 'page' => $this->page_slug, 'user_id' => $item->user_id, 'course_id' => $this->course_id ), admin_url( 'admin.php' ) ); |
237 | 237 | |
238 | 238 | $user_name = '<strong><a class="row-title" href="' . esc_url( $url ) . '">' . $user_name . '</a></strong>'; |
@@ -339,9 +339,9 @@ discard block |
||
339 | 339 | */ |
340 | 340 | public function search_button( $text = '' ) { |
341 | 341 | |
342 | - $text = __( 'Search Learners', 'woothemes-sensei' ); |
|
342 | + $text = __( 'Search Learners', 'woothemes-sensei' ); |
|
343 | 343 | |
344 | - return $text; |
|
344 | + return $text; |
|
345 | 345 | |
346 | 346 | } |
347 | 347 | } // End Class |
@@ -13,46 +13,46 @@ |
||
13 | 13 | */ |
14 | 14 | class Sensei_Student{ |
15 | 15 | |
16 | - /** |
|
17 | - * Get the students full name |
|
18 | - * |
|
19 | - * This function replaces Sensei_Learner_Managment->get_learner_full_name |
|
20 | - * @since 1.9.0 |
|
21 | - * |
|
22 | - * @param $user_id |
|
23 | - * @return bool|mixed|void |
|
24 | - */ |
|
25 | - public static function get_full_name( $user_id ){ |
|
16 | + /** |
|
17 | + * Get the students full name |
|
18 | + * |
|
19 | + * This function replaces Sensei_Learner_Managment->get_learner_full_name |
|
20 | + * @since 1.9.0 |
|
21 | + * |
|
22 | + * @param $user_id |
|
23 | + * @return bool|mixed|void |
|
24 | + */ |
|
25 | + public static function get_full_name( $user_id ){ |
|
26 | 26 | |
27 | - $full_name = ''; |
|
27 | + $full_name = ''; |
|
28 | 28 | |
29 | - if( empty( $user_id ) || ! ( 0 < intval( $user_id ) ) |
|
30 | - || !( get_userdata( $user_id ) ) ){ |
|
31 | - return false; |
|
32 | - } |
|
29 | + if( empty( $user_id ) || ! ( 0 < intval( $user_id ) ) |
|
30 | + || !( get_userdata( $user_id ) ) ){ |
|
31 | + return false; |
|
32 | + } |
|
33 | 33 | |
34 | - // get the user details |
|
35 | - $user = get_user_by( 'id', $user_id ); |
|
34 | + // get the user details |
|
35 | + $user = get_user_by( 'id', $user_id ); |
|
36 | 36 | |
37 | - if( ! empty( $user->first_name ) && ! empty( $user->last_name ) ){ |
|
37 | + if( ! empty( $user->first_name ) && ! empty( $user->last_name ) ){ |
|
38 | 38 | |
39 | - $full_name = trim( $user->first_name ) . ' ' . trim( $user->last_name ); |
|
39 | + $full_name = trim( $user->first_name ) . ' ' . trim( $user->last_name ); |
|
40 | 40 | |
41 | - }else{ |
|
41 | + }else{ |
|
42 | 42 | |
43 | - $full_name = $user->display_name; |
|
43 | + $full_name = $user->display_name; |
|
44 | 44 | |
45 | - } |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * Filter the user full name from the get_learner_full_name function. |
|
49 | - * |
|
50 | - * @since 1.8.0 |
|
51 | - * @param $full_name |
|
52 | - * @param $user_id |
|
53 | - */ |
|
54 | - return apply_filters( 'sensei_learner_full_name' , $full_name , $user_id ); |
|
47 | + /** |
|
48 | + * Filter the user full name from the get_learner_full_name function. |
|
49 | + * |
|
50 | + * @since 1.8.0 |
|
51 | + * @param $full_name |
|
52 | + * @param $user_id |
|
53 | + */ |
|
54 | + return apply_filters( 'sensei_learner_full_name' , $full_name , $user_id ); |
|
55 | 55 | |
56 | - }// end get_full_name |
|
56 | + }// end get_full_name |
|
57 | 57 | |
58 | 58 | } |
59 | 59 | \ No newline at end of file |
@@ -627,7 +627,7 @@ |
||
627 | 627 | $course = get_post( $this->course_id ); |
628 | 628 | $report = sanitize_title( $course->post_title ) . '-' . $this->view . 's-overview'; |
629 | 629 | if ( $this->user_id ) { |
630 | - $user_name = Sensei_Learner::get_full_name( $this->user_id ); |
|
630 | + $user_name = Sensei_Learner::get_full_name( $this->user_id ); |
|
631 | 631 | $report = sanitize_title( $user_name ) . '-' . $report; |
632 | 632 | } |
633 | 633 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
3 | - exit; // Exit if accessed directly |
|
3 | + exit; // Exit if accessed directly |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /** |
@@ -17,45 +17,45 @@ discard block |
||
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Hook in tabs. |
20 | - * @since 1.8.0 |
|
20 | + * @since 1.8.0 |
|
21 | 21 | */ |
22 | 22 | public function __construct() { |
23 | 23 | |
24 | - add_action( 'admin_menu', array( $this, 'admin_menus') ); |
|
24 | + add_action( 'admin_menu', array( $this, 'admin_menus') ); |
|
25 | 25 | add_action( 'admin_head', array( $this, 'admin_head' ) ); |
26 | 26 | |
27 | 27 | } |
28 | 28 | |
29 | - /** |
|
30 | - * Sends user to the welcome page on first activation. |
|
31 | - * |
|
32 | - * Hooked into activated_plugin |
|
33 | - * @since 1.8.0 |
|
34 | - */ |
|
35 | - public static function redirect( $plugin ) { |
|
29 | + /** |
|
30 | + * Sends user to the welcome page on first activation. |
|
31 | + * |
|
32 | + * Hooked into activated_plugin |
|
33 | + * @since 1.8.0 |
|
34 | + */ |
|
35 | + public static function redirect( $plugin ) { |
|
36 | 36 | |
37 | - // Bail if activating from network, or bulk, or within an iFrame |
|
38 | - if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) ) { |
|
37 | + // Bail if activating from network, or bulk, or within an iFrame |
|
38 | + if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) ) { |
|
39 | 39 | |
40 | - return; |
|
40 | + return; |
|
41 | 41 | |
42 | - } |
|
43 | - // don't run for upgrades and for pages already on the welcome screen |
|
44 | - if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) |
|
45 | - || ( ! empty( $_GET['page'] ) && $_GET['page'] === 'sensei-welcome' ) ) { |
|
42 | + } |
|
43 | + // don't run for upgrades and for pages already on the welcome screen |
|
44 | + if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) |
|
45 | + || ( ! empty( $_GET['page'] ) && $_GET['page'] === 'sensei-welcome' ) ) { |
|
46 | 46 | |
47 | - return; |
|
47 | + return; |
|
48 | 48 | |
49 | - } |
|
49 | + } |
|
50 | 50 | |
51 | - wp_redirect( admin_url( 'index.php?page=sensei-welcome' ) ); |
|
52 | - exit; |
|
53 | - } |
|
51 | + wp_redirect( admin_url( 'index.php?page=sensei-welcome' ) ); |
|
52 | + exit; |
|
53 | + } |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Add admin menus/screens. |
57 | - * |
|
58 | - * @since 1.8.0 |
|
57 | + * |
|
58 | + * @since 1.8.0 |
|
59 | 59 | */ |
60 | 60 | public function admin_menus() { |
61 | 61 | |
@@ -65,17 +65,17 @@ discard block |
||
65 | 65 | |
66 | 66 | $welcome_page_name = __( 'Sensei Activation', 'woothemes-sensei' ); |
67 | 67 | $welcome_page_title = __( 'Welcome to Sensei', 'woothemes-sensei' ); |
68 | - add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'sensei-welcome', array( $this, 'welcome_screen' ) ); |
|
68 | + add_dashboard_page( $welcome_page_title, $welcome_page_name, 'manage_options', 'sensei-welcome', array( $this, 'welcome_screen' ) ); |
|
69 | 69 | |
70 | 70 | } |
71 | 71 | |
72 | - /** |
|
73 | - * Output the Welcome screen. |
|
74 | - * |
|
75 | - * @since 1.8.0 |
|
76 | - */ |
|
77 | - public function welcome_screen() { |
|
78 | - ?> |
|
72 | + /** |
|
73 | + * Output the Welcome screen. |
|
74 | + * |
|
75 | + * @since 1.8.0 |
|
76 | + */ |
|
77 | + public function welcome_screen() { |
|
78 | + ?> |
|
79 | 79 | <div class="wrap about-wrap"> |
80 | 80 | |
81 | 81 | <?php $this->intro(); ?> |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | </div> |
129 | 129 | </div> |
130 | 130 | <?php |
131 | - } |
|
131 | + } |
|
132 | 132 | |
133 | 133 | /** |
134 | 134 | * Add styles just for this page, and remove dashboard page links. |
135 | 135 | */ |
136 | 136 | public function admin_head() { |
137 | - // remove the menu page so it is not visible in the admin side bar |
|
137 | + // remove the menu page so it is not visible in the admin side bar |
|
138 | 138 | remove_submenu_page( 'index.php', 'sensei-welcome' ); |
139 | 139 | ?> |
140 | 140 | <style type="text/css"> |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | |
259 | 259 | // Random tweet - must be kept to 102 chars to "fit" |
260 | 260 | $tweets = array( |
261 | - 'I\'ve just installed Sensei - A premium Learning Management plugin for #WordPress.' |
|
261 | + 'I\'ve just installed Sensei - A premium Learning Management plugin for #WordPress.' |
|
262 | 262 | ); |
263 | 263 | shuffle( $tweets ); |
264 | 264 | ?> |
@@ -280,11 +280,11 @@ discard block |
||
280 | 280 | |
281 | 281 | <div class="sensei-badge"> |
282 | 282 | <?php |
283 | - _e('Sensei by WooThemes','woothemes-sensei'); |
|
284 | - echo '<br />'; |
|
283 | + _e('Sensei by WooThemes','woothemes-sensei'); |
|
284 | + echo '<br />'; |
|
285 | 285 | |
286 | - printf( __( 'Version %s', 'woothemes-sensei' ), Sensei()->version ); |
|
287 | - ?> |
|
286 | + printf( __( 'Version %s', 'woothemes-sensei' ), Sensei()->version ); |
|
287 | + ?> |
|
288 | 288 | </div> |
289 | 289 | |
290 | 290 | <p class="sensei-actions"> |
@@ -205,13 +205,13 @@ discard block |
||
205 | 205 | |
206 | 206 | /** |
207 | 207 | * Generates content for a single row of the table in the user management |
208 | - * screen. |
|
209 | - * |
|
208 | + * screen. |
|
209 | + * |
|
210 | 210 | * @since 1.7.0 |
211 | - * |
|
211 | + * |
|
212 | 212 | * @param object $item The current item |
213 | - * |
|
214 | - * @return void |
|
213 | + * |
|
214 | + * @return void |
|
215 | 215 | */ |
216 | 216 | protected function get_row_data( $item ) { |
217 | 217 | global $wp_version; |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | switch ( $this->view ) { |
220 | 220 | case 'learners' : |
221 | 221 | |
222 | - // in this case the item passed in is actually the users activity on course of lesson |
|
223 | - $user_activity = $item; |
|
222 | + // in this case the item passed in is actually the users activity on course of lesson |
|
223 | + $user_activity = $item; |
|
224 | 224 | $post_id = false; |
225 | 225 | |
226 | 226 | if( $this->lesson_id ) { |
@@ -239,30 +239,30 @@ discard block |
||
239 | 239 | |
240 | 240 | if( 'complete' == $user_activity->comment_approved || 'graded' == $user_activity->comment_approved || 'passed' == $user_activity->comment_approved ) { |
241 | 241 | |
242 | - $status_html = '<span class="graded">' .__( 'Completed', 'woothemes-sensei' ) . '</span>'; |
|
242 | + $status_html = '<span class="graded">' .__( 'Completed', 'woothemes-sensei' ) . '</span>'; |
|
243 | 243 | |
244 | 244 | } else { |
245 | 245 | |
246 | - $status_html = '<span class="in-progress">' . __( 'In Progress', 'woothemes-sensei' ) . '</span>'; |
|
246 | + $status_html = '<span class="in-progress">' . __( 'In Progress', 'woothemes-sensei' ) . '</span>'; |
|
247 | 247 | |
248 | 248 | } |
249 | 249 | |
250 | - $title = Sensei_Learner::get_full_name( $user_activity->user_id ); |
|
250 | + $title = Sensei_Learner::get_full_name( $user_activity->user_id ); |
|
251 | 251 | $a_title = sprintf( __( 'Edit “%s”' ), $title ); |
252 | 252 | |
253 | - /** |
|
254 | - * sensei_learners_main_column_data filter |
|
255 | - * |
|
256 | - * This filter runs on the learner management screen for a specific course. |
|
257 | - * It provides the learner row column details. |
|
258 | - * |
|
259 | - * @param array $columns{ |
|
260 | - * type string $title |
|
261 | - * type string $date_started |
|
262 | - * type string $course_status (completed, started etc) |
|
263 | - * type html $action_buttons |
|
264 | - * } |
|
265 | - */ |
|
253 | + /** |
|
254 | + * sensei_learners_main_column_data filter |
|
255 | + * |
|
256 | + * This filter runs on the learner management screen for a specific course. |
|
257 | + * It provides the learner row column details. |
|
258 | + * |
|
259 | + * @param array $columns{ |
|
260 | + * type string $title |
|
261 | + * type string $date_started |
|
262 | + * type string $course_status (completed, started etc) |
|
263 | + * type html $action_buttons |
|
264 | + * } |
|
265 | + */ |
|
266 | 266 | $column_data = apply_filters( 'sensei_learners_main_column_data', array( |
267 | 267 | 'title' => '<strong><a class="row-title" href="' . admin_url( 'user-edit.php?user_id=' . $user_activity->user_id ) . '" title="' . esc_attr( $a_title ) . '">' . $title . '</a></strong>', |
268 | 268 | 'date_started' => get_comment_meta( $user_activity->comment_ID, 'start', true), |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | |
293 | 293 | case 'courses' : |
294 | 294 | default: |
295 | - $course_learners = Sensei_Utils::sensei_check_for_activity( apply_filters( 'sensei_learners_course_learners', array( 'post_id' => $item->ID, 'type' => 'sensei_course_status', 'status' => 'any' ) ) ); |
|
295 | + $course_learners = Sensei_Utils::sensei_check_for_activity( apply_filters( 'sensei_learners_course_learners', array( 'post_id' => $item->ID, 'type' => 'sensei_course_status', 'status' => 'any' ) ) ); |
|
296 | 296 | $title = get_the_title( $item ); |
297 | 297 | $a_title = sprintf( __( 'Edit “%s”' ), $title ); |
298 | 298 |