@@ -31,9 +31,12 @@ |
||
| 31 | 31 | |
| 32 | 32 | <?php sensei_load_template('loop-message.php'); ?> |
| 33 | 33 | |
| 34 | - <?php else: ?> |
|
| 34 | + <?php else { |
|
| 35 | + : ?> |
|
| 35 | 36 | |
| 36 | - <p> <?php _e('You do not have any messages.','woothemes-sensei'); ?> </p> |
|
| 37 | + <p> <?php _e('You do not have any messages.','woothemes-sensei'); |
|
| 38 | +} |
|
| 39 | +?> </p> |
|
| 37 | 40 | |
| 38 | 41 | <?php endif; // End If Statement ?> |
| 39 | 42 | |
@@ -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 | * |
@@ -28,7 +28,10 @@ |
||
| 28 | 28 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 29 | 29 | */ |
| 30 | 30 | |
| 31 | - if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 31 | + if ( ! defined( 'ABSPATH' ) ) { |
|
| 32 | + exit; |
|
| 33 | + } |
|
| 34 | + // Exit if accessed directly |
|
| 32 | 35 | |
| 33 | 36 | require_once( 'includes/class-sensei-autoloader.php' ); |
| 34 | 37 | require_once( 'includes/lib/woo-functions.php' ); |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | /** |
| 4 | 7 | * |
| 5 | 8 | * Renders the [sensei_courses] shortcode |
@@ -77,7 +80,7 @@ discard block |
||
| 77 | 80 | |
| 78 | 81 | $this->order = 'ASC'; |
| 79 | 82 | |
| 80 | - }else{ |
|
| 83 | + } else{ |
|
| 81 | 84 | |
| 82 | 85 | // for everything else use the value passed or the default DESC |
| 83 | 86 | $this->order = isset( $attributes['order'] ) ? $attributes['order'] : 'DESC'; |
@@ -139,7 +142,7 @@ discard block |
||
| 139 | 142 | $teacher_query_by = 'author__in'; |
| 140 | 143 | $this->teacher = $teachers; |
| 141 | 144 | |
| 142 | - }else{ |
|
| 145 | + } else{ |
|
| 143 | 146 | // when users passed in a single teacher value |
| 144 | 147 | $teacher_query_by = is_numeric( $this->teacher )? 'author':'author_name'; |
| 145 | 148 | |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | /** |
| 4 | 7 | * This class is loaded int WP by the shortcode loader class. |
| 5 | 8 | * |
@@ -75,7 +78,7 @@ discard block |
||
| 75 | 78 | |
| 76 | 79 | $this->order = 'ASC'; |
| 77 | 80 | |
| 78 | - }else{ |
|
| 81 | + } else{ |
|
| 79 | 82 | |
| 80 | 83 | // for everything else use the value passed or the default DESC |
| 81 | 84 | $this->order = isset( $attributes['order'] ) ? $attributes['order'] : 'ASC'; |
@@ -121,11 +124,11 @@ discard block |
||
| 121 | 124 | $included_courses = $completed_ids; |
| 122 | 125 | |
| 123 | 126 | |
| 124 | - }elseif( 'active'==$this->status ){ |
|
| 127 | + } elseif( 'active'==$this->status ){ |
|
| 125 | 128 | |
| 126 | 129 | $included_courses = $active_ids; |
| 127 | 130 | |
| 128 | - }else{ // all courses |
|
| 131 | + } else{ // all courses |
|
| 129 | 132 | |
| 130 | 133 | if( empty( $completed_ids ) ){ |
| 131 | 134 | |
@@ -142,7 +145,7 @@ discard block |
||
| 142 | 145 | |
| 143 | 146 | $included_courses = array('-1000'); // don't show any courses |
| 144 | 147 | |
| 145 | - }else{ |
|
| 148 | + } else{ |
|
| 146 | 149 | $included_courses = Sensei_Utils::array_zip_merge( $active_ids, $completed_ids ); |
| 147 | 150 | } |
| 148 | 151 | |
@@ -1,5 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // security check |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// security check |
|
| 3 | 6 | /** |
| 4 | 7 | * Sensei Shortcode Loader Class |
| 5 | 8 | * |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | /** |
| 4 | 7 | * |
| 5 | 8 | * Renders the [sensei_teachers] shortcode. Will show a list of teachers |
@@ -149,7 +152,7 @@ discard block |
||
| 149 | 152 | // exclude this user as it is already in the list |
| 150 | 153 | unset( $users[ $index ] ); |
| 151 | 154 | |
| 152 | - }else{ |
|
| 155 | + } else{ |
|
| 153 | 156 | |
| 154 | 157 | // add teh user to the list of users |
| 155 | 158 | $array_unique_users_ids[] = $user->ID; |
@@ -239,9 +242,7 @@ discard block |
||
| 239 | 242 | |
| 240 | 243 | $user_public_name = $user->first_name . ' ' . $user->last_name; |
| 241 | 244 | |
| 242 | - } |
|
| 243 | - |
|
| 244 | - else { |
|
| 245 | + } else { |
|
| 245 | 246 | |
| 246 | 247 | $user_public_name = $user->display_name; |
| 247 | 248 | |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | |
| 167 | 167 | Sensei_Templates::get_template( 'user/my-courses.php' ); |
| 168 | 168 | |
| 169 | - }else{ |
|
| 169 | + } else{ |
|
| 170 | 170 | |
| 171 | 171 | Sensei()->frontend->sensei_login_form(); |
| 172 | 172 | |
@@ -1,6 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 3 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 4 | + exit; |
|
| 5 | +} |
|
| 4 | 6 | |
| 5 | 7 | /** |
| 6 | 8 | * Sensei Modules Class |
@@ -401,8 +403,9 @@ discard block |
||
| 401 | 403 | $term = urldecode(stripslashes($_GET['term'])); |
| 402 | 404 | |
| 403 | 405 | // Return nothing if term is empty |
| 404 | - if (empty($term)) |
|
| 405 | - die(); |
|
| 406 | + if (empty($term)) { |
|
| 407 | + die(); |
|
| 408 | + } |
|
| 406 | 409 | |
| 407 | 410 | // Set a default if none is given |
| 408 | 411 | $default = isset($_GET['default']) ? $_GET['default'] : __('No course', 'woothemes-sensei'); |
@@ -789,7 +792,9 @@ discard block |
||
| 789 | 792 | ); |
| 790 | 793 | $lessons = get_posts($args); |
| 791 | 794 | |
| 792 | - if (is_wp_error($lessons) || 0 >= count($lessons)) return 0; |
|
| 795 | + if (is_wp_error($lessons) || 0 >= count($lessons)) { |
|
| 796 | + return 0; |
|
| 797 | + } |
|
| 793 | 798 | |
| 794 | 799 | $completed = false; |
| 795 | 800 | $lesson_count = 0; |
@@ -1378,7 +1383,7 @@ discard block |
||
| 1378 | 1383 | |
| 1379 | 1384 | return $lesson_query->posts; |
| 1380 | 1385 | |
| 1381 | - }else{ |
|
| 1386 | + } else{ |
|
| 1382 | 1387 | |
| 1383 | 1388 | return array(); |
| 1384 | 1389 | |