@@ -192,7 +192,6 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @access public |
| 194 | 194 | * @param mixed $slug |
| 195 | - * @param mixed $option |
|
| 196 | 195 | * @param string $page_title (default: '') |
| 197 | 196 | * @param string $page_content (default: '') |
| 198 | 197 | * @param int $post_parent (default: 0) |
@@ -1037,6 +1036,9 @@ discard block |
||
| 1037 | 1036 | ?></div><?php |
| 1038 | 1037 | } |
| 1039 | 1038 | |
| 1039 | + /** |
|
| 1040 | + * @return string |
|
| 1041 | + */ |
|
| 1040 | 1042 | public function get_course_order() { |
| 1041 | 1043 | return get_option( 'sensei_course_order', '' ); |
| 1042 | 1044 | } |
@@ -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 | * Handles all admin views, assets and navigation. |
@@ -732,7 +735,9 @@ discard block |
||
| 732 | 735 | $types = array( 'course', 'lesson', 'question' ); |
| 733 | 736 | |
| 734 | 737 | foreach( $types as $type ) { |
| 735 | - if( ! post_type_exists( $type ) ) continue; |
|
| 738 | + if( ! post_type_exists( $type ) ) { |
|
| 739 | + continue; |
|
| 740 | + } |
|
| 736 | 741 | |
| 737 | 742 | $num_posts = wp_count_posts( $type ); |
| 738 | 743 | |
@@ -800,7 +805,9 @@ discard block |
||
| 800 | 805 | |
| 801 | 806 | $html = ''; |
| 802 | 807 | |
| 803 | - if( 0 == count( $settings ) ) return $html; |
|
| 808 | + if( 0 == count( $settings ) ) { |
|
| 809 | + return $html; |
|
| 810 | + } |
|
| 804 | 811 | |
| 805 | 812 | $html .= '<div class="sensei-options-panel">' . "\n"; |
| 806 | 813 | |
@@ -882,11 +889,11 @@ discard block |
||
| 882 | 889 | //backwards compatibility |
| 883 | 890 | if( empty( $data ) || 'on' == $data ){ |
| 884 | 891 | $checked_value = 'on'; |
| 885 | - }elseif( 'yes' == $data ) { |
|
| 892 | + } elseif( 'yes' == $data ) { |
|
| 886 | 893 | |
| 887 | 894 | $checked_value = 'yes'; |
| 888 | 895 | |
| 889 | - }elseif( 'auto' == $data ) { |
|
| 896 | + } elseif( 'auto' == $data ) { |
|
| 890 | 897 | |
| 891 | 898 | $checked_value = 'auto'; |
| 892 | 899 | |
@@ -60,8 +60,8 @@ |
||
| 60 | 60 | /** |
| 61 | 61 | * @since 1.9.0 |
| 62 | 62 | * |
| 63 | - * @param $setting |
|
| 64 | - * @param $new_value |
|
| 63 | + * @param string $setting |
|
| 64 | + * @param integer $new_value |
|
| 65 | 65 | */ |
| 66 | 66 | public function set( $setting, $new_value ){ |
| 67 | 67 | |