| @@ -80,26 +80,8 @@ | ||
| 80 | 80 | $lp_course_item = $course_item; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | - * Check if current course item is viewing is a $type | |
| 85 | - * | |
| 86 | - * @param string $type | |
| 87 | - * | |
| 88 | - * @return bool | |
| 89 | - * @deprecated 4.1.7.3 | |
| 90 | - */ | |
| 91 | - /*public static function is_course_item_type( $type ) { | |
| 92 | - $item = self::course_item(); | |
| 93 | - | |
| 94 | - if ( $item ) { | |
| 95 | - return $type === get_post_type( $item->get_id() ); | |
| 96 | - } | |
| 97 | - | |
| 98 | - return false; | |
| 99 | - }*/ | |
| 100 | - | |
| 101 | - /** | |
| 102 | 84 | * @param bool $get_only_id |
| 103 | 85 | * Todo: new call not use $get_only_id, only call LP_Global::courses() |
| 104 | 86 | * Recommend use learn_press_get_course() |
| 105 | 87 | * |
| @@ -200,9 +182,14 @@ | ||
| 200 | 182 | |
| 201 | 183 | return LP_Profile::instance(); |
| 202 | 184 | } |
| 203 | 185 | |
| 186 | + /** | |
| 187 | + * @deprecated 4.2.6.2 | |
| 188 | + */ | |
| 204 | 189 | public static function init() { |
| 190 | + _deprecated_function( __METHOD__, '4.2.6.2' ); | |
| 191 | + return; | |
| 205 | 192 | global $profile; |
| 206 | 193 | self::$_profile = $profile = LP_Profile::instance( get_current_user_id() ); |
| 207 | 194 | } |
| 208 | 195 | |