@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @access public |
| 30 | 30 | * @since 1.0.2 |
| 31 | 31 | * @static |
| 32 | - * @return void |
|
| 32 | + * @return boolean |
|
| 33 | 33 | */ |
| 34 | 34 | public static function sensei_is_woocommerce_present () { |
| 35 | 35 | if ( class_exists( 'Woocommerce' ) ) { |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * @param string $customer_email |
| 350 | 350 | * @param int $user_id |
| 351 | 351 | * @param int $product_id |
| 352 | - * @return bool |
|
| 352 | + * @return boolean|null |
|
| 353 | 353 | */ |
| 354 | 354 | public static function sensei_customer_bought_product ( $customer_email, $user_id, $product_id ) { |
| 355 | 355 | |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | /** |
| 405 | 405 | * Save quiz answers submitted by users |
| 406 | 406 | * @param boolean $submitted User's quiz answers |
| 407 | - * @return boolean Whether the answers were saved or not |
|
| 407 | + * @return null|false Whether the answers were saved or not |
|
| 408 | 408 | */ |
| 409 | 409 | public static function sensei_save_quiz_answers( $submitted = false, $user_id = 0 ) { |
| 410 | 410 | if( intval( $user_id ) == 0 ) { |
@@ -467,6 +467,9 @@ discard block |
||
| 467 | 467 | |
| 468 | 468 | } // End sensei_save_quiz_answers() |
| 469 | 469 | |
| 470 | + /** |
|
| 471 | + * @return string |
|
| 472 | + */ |
|
| 470 | 473 | public static function upload_file( $file = array() ) { |
| 471 | 474 | |
| 472 | 475 | require_once( ABSPATH . 'wp-admin/includes/admin.php' ); |
@@ -731,8 +734,8 @@ discard block |
||
| 731 | 734 | /** |
| 732 | 735 | * Remove user from lesson, deleting all data from the corresponding quiz |
| 733 | 736 | * |
| 734 | - * @param type $lesson_id |
|
| 735 | - * @param type $user_id |
|
| 737 | + * @param integer $lesson_id |
|
| 738 | + * @param integer $user_id |
|
| 736 | 739 | * @return boolean |
| 737 | 740 | */ |
| 738 | 741 | public static function sensei_remove_user_from_lesson( $lesson_id = 0, $user_id = 0, $from_course = false ) { |
@@ -769,8 +772,8 @@ discard block |
||
| 769 | 772 | /** |
| 770 | 773 | * Remove a user from a course, deleting all activities across all lessons |
| 771 | 774 | * |
| 772 | - * @param type $course_id |
|
| 773 | - * @param type $user_id |
|
| 775 | + * @param integer $course_id |
|
| 776 | + * @param integer $user_id |
|
| 774 | 777 | * @return boolean |
| 775 | 778 | */ |
| 776 | 779 | public static function sensei_remove_user_from_course( $course_id = 0, $user_id = 0 ) { |
@@ -835,7 +838,7 @@ discard block |
||
| 835 | 838 | /** |
| 836 | 839 | * Returns the user_grade for a specific question and user, or sensei_user_answer entry |
| 837 | 840 | * |
| 838 | - * @param mixed $question |
|
| 841 | + * @param integer $question |
|
| 839 | 842 | * @param int $user_id |
| 840 | 843 | * @return string |
| 841 | 844 | */ |
@@ -863,7 +866,7 @@ discard block |
||
| 863 | 866 | * Returns the answer_notes for a specific question and user, or sensei_user_answer entry |
| 864 | 867 | * |
| 865 | 868 | * @deprecated since 1.7.5 use Sensei()->quiz->get_user_question_feedback instead |
| 866 | - * @param mixed $question |
|
| 869 | + * @param integer $question |
|
| 867 | 870 | * @param int $user_id |
| 868 | 871 | * @return string |
| 869 | 872 | */ |
@@ -975,7 +978,7 @@ discard block |
||
| 975 | 978 | * sort_array_by_key sorts array by key |
| 976 | 979 | * @since 1.3.0 |
| 977 | 980 | * @param $array by ref |
| 978 | - * @param $key string column name in array |
|
| 981 | + * @param string $key string column name in array |
|
| 979 | 982 | * @return void |
| 980 | 983 | */ |
| 981 | 984 | public static function sort_array_by_key( $array, $key ) { |
@@ -1022,7 +1025,7 @@ discard block |
||
| 1022 | 1025 | /** |
| 1023 | 1026 | * Get pass mark for course |
| 1024 | 1027 | * @param integer $course_id ID of course |
| 1025 | - * @return integer Pass mark for course |
|
| 1028 | + * @return double Pass mark for course |
|
| 1026 | 1029 | */ |
| 1027 | 1030 | public static function sensei_course_pass_grade( $course_id = 0 ) { |
| 1028 | 1031 | |
@@ -1063,7 +1066,7 @@ discard block |
||
| 1063 | 1066 | * Get user total grade for course |
| 1064 | 1067 | * @param integer $course_id ID of course |
| 1065 | 1068 | * @param integer $user_id ID of user |
| 1066 | - * @return integer User's total grade |
|
| 1069 | + * @return double User's total grade |
|
| 1067 | 1070 | */ |
| 1068 | 1071 | public static function sensei_course_user_grade( $course_id = 0, $user_id = 0 ) { |
| 1069 | 1072 | |
@@ -1355,9 +1358,9 @@ discard block |
||
| 1355 | 1358 | * Check if a user has started a course or not |
| 1356 | 1359 | * |
| 1357 | 1360 | * @since 1.7.0 |
| 1358 | - * @param type $course_id |
|
| 1359 | - * @param type $user_id |
|
| 1360 | - * @return mixed false or comment_ID |
|
| 1361 | + * @param integer $course_id |
|
| 1362 | + * @param integer $user_id |
|
| 1363 | + * @return false|string false or comment_ID |
|
| 1361 | 1364 | */ |
| 1362 | 1365 | public static function user_started_course( $course_id = 0, $user_id = 0 ) { |
| 1363 | 1366 | |
@@ -1384,7 +1387,7 @@ discard block |
||
| 1384 | 1387 | * @since 1.7.0 |
| 1385 | 1388 | * @param integer $course_id Course ID |
| 1386 | 1389 | * @param integer $user_id User ID |
| 1387 | - * @return int |
|
| 1390 | + * @return null|false |
|
| 1388 | 1391 | */ |
| 1389 | 1392 | public static function user_complete_course( $course_id = 0, $user_id = 0 ) { |
| 1390 | 1393 | global $wp_version; |
@@ -1491,7 +1494,7 @@ discard block |
||
| 1491 | 1494 | /** |
| 1492 | 1495 | * Check if a user has completed a course or not |
| 1493 | 1496 | * |
| 1494 | - * @param mixed $course course_id or sensei_course_status entry |
|
| 1497 | + * @param integer $course course_id or sensei_course_status entry |
|
| 1495 | 1498 | * @param int $user_id |
| 1496 | 1499 | * @return boolean |
| 1497 | 1500 | */ |
@@ -1530,9 +1533,9 @@ discard block |
||
| 1530 | 1533 | * Check if a user has started a lesson or not |
| 1531 | 1534 | * |
| 1532 | 1535 | * @since 1.7.0 |
| 1533 | - * @param type $lesson_id |
|
| 1534 | - * @param type $user_id |
|
| 1535 | - * @return mixed false or comment_ID |
|
| 1536 | + * @param integer $lesson_id |
|
| 1537 | + * @param integer $user_id |
|
| 1538 | + * @return string|false false or comment_ID |
|
| 1536 | 1539 | */ |
| 1537 | 1540 | public static function user_started_lesson( $lesson_id = 0, $user_id = 0 ) { |
| 1538 | 1541 | |
@@ -1553,7 +1556,7 @@ discard block |
||
| 1553 | 1556 | * Check if a user has completed a lesson or not |
| 1554 | 1557 | * |
| 1555 | 1558 | * @uses Sensei() |
| 1556 | - * @param mixed $lesson lesson_id or sensei_lesson_status entry |
|
| 1559 | + * @param integer $lesson lesson_id or sensei_lesson_status entry |
|
| 1557 | 1560 | * @param int $user_id |
| 1558 | 1561 | * @return boolean |
| 1559 | 1562 | */ |
@@ -1626,9 +1629,9 @@ discard block |
||
| 1626 | 1629 | * Returns the requested course status |
| 1627 | 1630 | * |
| 1628 | 1631 | * @since 1.7.0 |
| 1629 | - * @param type $course_id |
|
| 1630 | - * @param type $user_id |
|
| 1631 | - * @return object |
|
| 1632 | + * @param integer $course_id |
|
| 1633 | + * @param integer $user_id |
|
| 1634 | + * @return integer |
|
| 1632 | 1635 | */ |
| 1633 | 1636 | public static function user_course_status( $course_id = 0, $user_id = 0 ) { |
| 1634 | 1637 | |
@@ -1651,7 +1654,7 @@ discard block |
||
| 1651 | 1654 | * @since 1.7.0 |
| 1652 | 1655 | * @param int $lesson_id |
| 1653 | 1656 | * @param int $user_id |
| 1654 | - * @return object | bool |
|
| 1657 | + * @return integer | bool |
|
| 1655 | 1658 | */ |
| 1656 | 1659 | public static function user_lesson_status( $lesson_id = 0, $user_id = 0 ) { |
| 1657 | 1660 | |
@@ -1710,11 +1713,11 @@ discard block |
||
| 1710 | 1713 | * @since 1.7.0 |
| 1711 | 1714 | * |
| 1712 | 1715 | * @param int|string $user_id |
| 1713 | - * @param int|string $lesson_id |
|
| 1716 | + * @param integer $lesson_id |
|
| 1714 | 1717 | * @param string $status |
| 1715 | 1718 | * @param array $metadata |
| 1716 | 1719 | * |
| 1717 | - * @return mixed false or comment_ID |
|
| 1720 | + * @return null|false false or comment_ID |
|
| 1718 | 1721 | */ |
| 1719 | 1722 | public static function update_lesson_status( $user_id, $lesson_id, $status = 'in-progress', $metadata = array() ) { |
| 1720 | 1723 | $comment_id = false; |
@@ -1752,7 +1755,7 @@ discard block |
||
| 1752 | 1755 | * @param type $course_id |
| 1753 | 1756 | * @param type $status |
| 1754 | 1757 | * @param type $metadata |
| 1755 | - * @return mixed false or comment_ID |
|
| 1758 | + * @return null|false false or comment_ID |
|
| 1756 | 1759 | */ |
| 1757 | 1760 | public static function update_course_status( $user_id, $course_id, $status = 'in-progress', $metadata = array() ) { |
| 1758 | 1761 | $comment_id = false; |
@@ -1941,7 +1944,7 @@ discard block |
||
| 1941 | 1944 | * |
| 1942 | 1945 | * @since 1.7.4 |
| 1943 | 1946 | * |
| 1944 | - * @param $data_key |
|
| 1947 | + * @param string $data_key |
|
| 1945 | 1948 | * @param $post_id |
| 1946 | 1949 | * @param int $user_id |
| 1947 | 1950 | * |
@@ -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 | * Sensei Utilities Class |
@@ -181,8 +184,7 @@ discard block |
||
| 181 | 184 | // ...use a filter to switch the encoding back |
| 182 | 185 | add_filter( 'comments_clauses', array( __CLASS__, 'comment_multiple_status_filter' ) ); |
| 183 | 186 | } |
| 184 | - } |
|
| 185 | - else { |
|
| 187 | + } else { |
|
| 186 | 188 | $args['status'] = 'any'; // 'log' == 'sensei_user_answer' |
| 187 | 189 | } |
| 188 | 190 | |
@@ -307,8 +309,12 @@ discard block |
||
| 307 | 309 | } |
| 308 | 310 | |
| 309 | 311 | foreach( $activities as $activity ) { |
| 310 | - if( '' == $activity->comment_type ) continue; |
|
| 311 | - if( strpos( 'sensei_', $activity->comment_type ) != 0 ) continue; |
|
| 312 | + if( '' == $activity->comment_type ) { |
|
| 313 | + continue; |
|
| 314 | + } |
|
| 315 | + if( strpos( 'sensei_', $activity->comment_type ) != 0 ) { |
|
| 316 | + continue; |
|
| 317 | + } |
|
| 312 | 318 | $dataset_changes = wp_delete_comment( intval( $activity->comment_ID ), true ); |
| 313 | 319 | wp_cache_flush(); |
| 314 | 320 | } |
@@ -360,11 +366,13 @@ discard block |
||
| 360 | 366 | $emails[] = $user->user_email; |
| 361 | 367 | } |
| 362 | 368 | |
| 363 | - if ( is_email( $customer_email ) ) |
|
| 364 | - $emails[] = $customer_email; |
|
| 369 | + if ( is_email( $customer_email ) ) { |
|
| 370 | + $emails[] = $customer_email; |
|
| 371 | + } |
|
| 365 | 372 | |
| 366 | - if ( sizeof( $emails ) == 0 ) |
|
| 367 | - return false; |
|
| 373 | + if ( sizeof( $emails ) == 0 ) { |
|
| 374 | + return false; |
|
| 375 | + } |
|
| 368 | 376 | |
| 369 | 377 | return Sensei_WC::has_customer_bought_product( $user_id, $product_id ); |
| 370 | 378 | |
@@ -379,7 +387,9 @@ discard block |
||
| 379 | 387 | */ |
| 380 | 388 | public static function sensei_text_editor( $content = '', $editor_id = 'senseitexteditor', $input_name = '' ) { |
| 381 | 389 | |
| 382 | - if( ! $input_name ) $input_name = $editor_id; |
|
| 390 | + if( ! $input_name ) { |
|
| 391 | + $input_name = $editor_id; |
|
| 392 | + } |
|
| 383 | 393 | |
| 384 | 394 | $buttons = 'bold,italic,underline,strikethrough,blockquote,bullist,numlist,justifyleft,justifycenter,justifyright,undo,redo,pastetext'; |
| 385 | 395 | |
@@ -689,8 +699,7 @@ discard block |
||
| 689 | 699 | if ( $has_questions ) { |
| 690 | 700 | $status = 'passed'; // Force a pass |
| 691 | 701 | $metadata['grade'] = 0; |
| 692 | - } |
|
| 693 | - else { |
|
| 702 | + } else { |
|
| 694 | 703 | $status = 'complete'; |
| 695 | 704 | } |
| 696 | 705 | } |
@@ -738,7 +747,9 @@ discard block |
||
| 738 | 747 | public static function sensei_remove_user_from_lesson( $lesson_id = 0, $user_id = 0, $from_course = false ) { |
| 739 | 748 | |
| 740 | 749 | |
| 741 | - if( ! $lesson_id ) return false; |
|
| 750 | + if( ! $lesson_id ) { |
|
| 751 | + return false; |
|
| 752 | + } |
|
| 742 | 753 | |
| 743 | 754 | if( intval( $user_id ) == 0 ) { |
| 744 | 755 | $user_id = get_current_user_id(); |
@@ -776,7 +787,9 @@ discard block |
||
| 776 | 787 | public static function sensei_remove_user_from_course( $course_id = 0, $user_id = 0 ) { |
| 777 | 788 | |
| 778 | 789 | |
| 779 | - if( ! $course_id ) return false; |
|
| 790 | + if( ! $course_id ) { |
|
| 791 | + return false; |
|
| 792 | + } |
|
| 780 | 793 | |
| 781 | 794 | if( intval( $user_id ) == 0 ) { |
| 782 | 795 | $user_id = get_current_user_id(); |
@@ -844,8 +857,7 @@ discard block |
||
| 844 | 857 | if( $question ) { |
| 845 | 858 | if ( is_object( $question ) ) { |
| 846 | 859 | $user_answer_id = $question->comment_ID; |
| 847 | - } |
|
| 848 | - else { |
|
| 860 | + } else { |
|
| 849 | 861 | if( intval( $user_id ) == 0 ) { |
| 850 | 862 | $user_id = get_current_user_id(); |
| 851 | 863 | } |
@@ -872,8 +884,7 @@ discard block |
||
| 872 | 884 | if( $question ) { |
| 873 | 885 | if ( is_object( $question ) ) { |
| 874 | 886 | $user_answer_id = $question->comment_ID; |
| 875 | - } |
|
| 876 | - else { |
|
| 887 | + } else { |
|
| 877 | 888 | if( intval( $user_id ) == 0 ) { |
| 878 | 889 | $user_id = get_current_user_id(); |
| 879 | 890 | } |
@@ -938,8 +949,7 @@ discard block |
||
| 938 | 949 | if ( !empty($notes) ) { |
| 939 | 950 | $user_lesson_id = WooThemes_Sensei_Utils::sensei_get_activity_value( array( 'post_id' => $question_id, 'user_id' => $user_id, 'type' => 'sensei_user_answer', 'field' => 'comment_ID' ) ); |
| 940 | 951 | $activity_logged = update_comment_meta( $user_lesson_id, 'answer_note', $notes ); |
| 941 | - } |
|
| 942 | - else { |
|
| 952 | + } else { |
|
| 943 | 953 | $activity_logged = true; |
| 944 | 954 | } |
| 945 | 955 | } |
@@ -1451,8 +1461,7 @@ discard block |
||
| 1451 | 1461 | $lessons_completed++; |
| 1452 | 1462 | break; |
| 1453 | 1463 | } |
| 1454 | - } |
|
| 1455 | - else { |
|
| 1464 | + } else { |
|
| 1456 | 1465 | switch ( $lesson_status->comment_approved ) { |
| 1457 | 1466 | case 'complete': // Lesson has no quiz/questions |
| 1458 | 1467 | case 'graded': // Lesson has quiz, but it's not important what the grade was |
@@ -1500,11 +1509,9 @@ discard block |
||
| 1500 | 1509 | if( $course ) { |
| 1501 | 1510 | if ( is_object( $course ) && is_a( $course,'WP_Comment') ) { |
| 1502 | 1511 | $user_course_status = $course->comment_approved; |
| 1503 | - } |
|
| 1504 | - elseif ( !is_numeric( $course ) && ! is_a( $course,'WP_Post') ) { |
|
| 1512 | + } elseif ( !is_numeric( $course ) && ! is_a( $course,'WP_Post') ) { |
|
| 1505 | 1513 | $user_course_status = $course; |
| 1506 | - } |
|
| 1507 | - else { |
|
| 1514 | + } else { |
|
| 1508 | 1515 | if( ! $user_id ) { |
| 1509 | 1516 | $user_id = get_current_user_id(); |
| 1510 | 1517 | } |
@@ -1564,11 +1571,9 @@ discard block |
||
| 1564 | 1571 | if ( is_object( $lesson ) ) { |
| 1565 | 1572 | $user_lesson_status = $lesson->comment_approved; |
| 1566 | 1573 | $lesson_id = $lesson->comment_post_ID; |
| 1567 | - } |
|
| 1568 | - elseif ( ! is_numeric( $lesson ) ) { |
|
| 1574 | + } elseif ( ! is_numeric( $lesson ) ) { |
|
| 1569 | 1575 | $user_lesson_status = $lesson; |
| 1570 | - } |
|
| 1571 | - else { |
|
| 1576 | + } else { |
|
| 1572 | 1577 | if( ! $user_id ) { |
| 1573 | 1578 | $user_id = get_current_user_id(); |
| 1574 | 1579 | } |
@@ -1581,8 +1586,7 @@ discard block |
||
| 1581 | 1586 | |
| 1582 | 1587 | if ( $_user_lesson_status ) { |
| 1583 | 1588 | $user_lesson_status = $_user_lesson_status->comment_approved; |
| 1584 | - } |
|
| 1585 | - else { |
|
| 1589 | + } else { |
|
| 1586 | 1590 | return false; // No status means not complete |
| 1587 | 1591 | } |
| 1588 | 1592 | $lesson_id = $lesson; |
@@ -1683,7 +1687,9 @@ discard block |
||
| 1683 | 1687 | |
| 1684 | 1688 | public static function user_passed_quiz( $quiz_id = 0, $user_id = 0 ) { |
| 1685 | 1689 | |
| 1686 | - if( ! $quiz_id ) return false; |
|
| 1690 | + if( ! $quiz_id ) { |
|
| 1691 | + return false; |
|
| 1692 | + } |
|
| 1687 | 1693 | |
| 1688 | 1694 | if( ! $user_id ) { |
| 1689 | 1695 | $user_id = get_current_user_id(); |
@@ -1921,7 +1927,7 @@ discard block |
||
| 1921 | 1927 | $start_function = 'user_start_'.$post_type; |
| 1922 | 1928 | $sensei_user_activity_id = self::$start_function( $user_id, $post_id ); |
| 1923 | 1929 | |
| 1924 | - }else{ |
|
| 1930 | + } else{ |
|
| 1925 | 1931 | |
| 1926 | 1932 | $sensei_user_activity_id = $sensei_user_status->comment_ID; |
| 1927 | 1933 | |
@@ -2138,7 +2144,7 @@ discard block |
||
| 2138 | 2144 | |
| 2139 | 2145 | return round( $val, $precision, $mode ); |
| 2140 | 2146 | |
| 2141 | - }else{ |
|
| 2147 | + } else{ |
|
| 2142 | 2148 | |
| 2143 | 2149 | return round( $val, $precision ); |
| 2144 | 2150 | |
@@ -817,7 +817,7 @@ |
||
| 817 | 817 | * @param int $user_id |
| 818 | 818 | * @param int $product_id |
| 819 | 819 | * |
| 820 | - * @return bool |
|
| 820 | + * @return boolean|null |
|
| 821 | 821 | */ |
| 822 | 822 | public static function has_customer_bought_product ( $user_id, $product_id ){ |
| 823 | 823 | |
@@ -143,8 +143,8 @@ |
||
| 143 | 143 | * sensei_check_if_product_is_in_cart function. |
| 144 | 144 | * |
| 145 | 145 | * @deprecated since 1.9.0 |
| 146 | - * @param int $wc_post_id (default: 0) |
|
| 147 | - * @return void |
|
| 146 | + * @param int $wc_product_id (default: 0) |
|
| 147 | + * @return boolean |
|
| 148 | 148 | */ |
| 149 | 149 | function sensei_check_if_product_is_in_cart( $wc_product_id = 0 ) { |
| 150 | 150 | return Sensei_WC::is_product_in_cart( $wc_product_id ); |
@@ -181,7 +181,9 @@ discard block |
||
| 181 | 181 | * @return void |
| 182 | 182 | */ |
| 183 | 183 | function sensei_recent_comments_widget_filter( $widget_args = array() ) { |
| 184 | - if ( ! isset( $widget_args['post_type'] ) ) $widget_args['post_type'] = array( 'post', 'page' ); |
|
| 184 | + if ( ! isset( $widget_args['post_type'] ) ) { |
|
| 185 | + $widget_args['post_type'] = array( 'post', 'page' ); |
|
| 186 | + } |
|
| 185 | 187 | return $widget_args; |
| 186 | 188 | } // End sensei_recent_comments_widget_filter() |
| 187 | 189 | add_filter( 'widget_comments_args', 'sensei_recent_comments_widget_filter', 10, 1 ); |
@@ -196,8 +198,9 @@ discard block |
||
| 196 | 198 | function sensei_course_archive_filter( $query ) { |
| 197 | 199 | |
| 198 | 200 | |
| 199 | - if ( ! $query->is_main_query() ) |
|
| 200 | - return; |
|
| 201 | + if ( ! $query->is_main_query() ) { |
|
| 202 | + return; |
|
| 203 | + } |
|
| 201 | 204 | |
| 202 | 205 | // Apply Filter only if on frontend and when course archive is running |
| 203 | 206 | $course_page_id = intval( Sensei()->settings->settings[ 'course_page' ] ); |
@@ -412,7 +415,7 @@ discard block |
||
| 412 | 415 | |
| 413 | 416 | return false; |
| 414 | 417 | |
| 415 | - }else{ |
|
| 418 | + } else{ |
|
| 416 | 419 | |
| 417 | 420 | return true; |
| 418 | 421 | |
@@ -446,7 +449,7 @@ discard block |
||
| 446 | 449 | |
| 447 | 450 | $wp_query = $modules_query; |
| 448 | 451 | |
| 449 | - }else{ |
|
| 452 | + } else{ |
|
| 450 | 453 | |
| 451 | 454 | wp_reset_query(); |
| 452 | 455 | |
@@ -478,7 +481,7 @@ discard block |
||
| 478 | 481 | |
| 479 | 482 | return have_posts(); |
| 480 | 483 | |
| 481 | - }else{ |
|
| 484 | + } else{ |
|
| 482 | 485 | |
| 483 | 486 | // if the loop has not been initiated check the first module has lessons |
| 484 | 487 | if( -1 == $sensei_modules_loop[ 'current' ] ){ |
@@ -622,7 +625,7 @@ discard block |
||
| 622 | 625 | |
| 623 | 626 | return true; |
| 624 | 627 | |
| 625 | - }else{ |
|
| 628 | + } else{ |
|
| 626 | 629 | |
| 627 | 630 | return false; |
| 628 | 631 | |
@@ -865,7 +868,9 @@ discard block |
||
| 865 | 868 | */ |
| 866 | 869 | function get_sensei_header(){ |
| 867 | 870 | |
| 868 | - if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 871 | + if ( ! defined( 'ABSPATH' ) ) { |
|
| 872 | + exit; |
|
| 873 | + } |
|
| 869 | 874 | |
| 870 | 875 | get_header(); |
| 871 | 876 | |