| @@ -76,8 +76,10 @@ | ||
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * Get type of items are supported in course curriculum (post types). |
| 79 | 79 | * Default: [lp_lesson, lp_quiz] |
| 80 | + * When all addon use hook 'learn-press/course/item-types-support', will deprecate this function | |
| 81 | + * @use CourseModel::item_types_support | |
| 80 | 82 | * |
| 81 | 83 | * @return mixed |
| 82 | 84 | * @since 3.0.0 |
| 83 | 85 | * @editor tungnx |
| @@ -82,8 +84,9 @@ | ||
| 82 | 84 | * @since 3.0.0 |
| 83 | 85 | * @editor tungnx |
| 84 | 86 | * @version 1.0.1 |
| 85 | 87 | * @return array |
| 88 | + * @deprecated | |
| 86 | 89 | */ |
| 87 | 90 | function learn_press_get_course_item_types( bool $return_only_value = true ): array { |
| 88 | 91 | return apply_filters( |
| 89 | 92 | 'learn-press/course-item-type', |
| @@ -129,9 +132,12 @@ | ||
| 129 | 132 | |
| 130 | 133 | return $wpdb->get_results( $query ); |
| 131 | 134 | } |
| 132 | 135 | |
| 133 | -function _learn_press_usort_terms_by_ID( $terms ) { | |
| 136 | +/** | |
| 137 | + * @deprecated 4.2.7.4 | |
| 138 | + */ | |
| 139 | +/*function _learn_press_usort_terms_by_ID( $terms ) { | |
| 134 | 140 | $version = get_bloginfo( 'version' ); |
| 135 | 141 | if ( version_compare( $version, '4.7', '>=' ) ) { |
| 136 | 142 | $terms = wp_list_sort( $terms, 'term_id' ); |
| 137 | 143 | } else { |
| @@ -138,11 +144,11 @@ | ||
| 138 | 144 | usort( $terms, '_usort_terms_by_ID' ); |
| 139 | 145 | } |
| 140 | 146 | |
| 141 | 147 | return $terms; |
| 142 | -} | |
| 148 | +}*/ | |
| 143 | 149 | |
| 144 | -function learn_press_course_post_type_link( $permalink, $post ) { | |
| 150 | +/*function learn_press_course_post_type_link( $permalink, $post ) { | |
| 145 | 151 | if ( $post->post_type !== 'lp_course' ) { |
| 146 | 152 | return $permalink; |
| 147 | 153 | } |
| 148 | 154 | |
| @@ -203,11 +209,11 @@ | ||
| 203 | 209 | |
| 204 | 210 | $permalink = str_replace( $find, $replace, $permalink ); |
| 205 | 211 | |
| 206 | 212 | return $permalink; |
| 207 | -} | |
| 213 | +}*/ | |
| 208 | 214 | |
| 209 | -add_filter( 'post_type_link', 'learn_press_course_post_type_link', 10, 2 ); | |
| 215 | +//add_filter( 'post_type_link', 'learn_press_course_post_type_link', 10, 2 ); | |
| 210 | 216 | |
| 211 | 217 | function learn_press_item_meta_format( $item, $nonce = '' ) { |
| 212 | 218 | if ( current_theme_supports( 'post-formats' ) ) { |
| 213 | 219 | $format = get_post_format( $item ); |
| @@ -228,15 +234,18 @@ | ||
| 228 | 234 | } |
| 229 | 235 | } |
| 230 | 236 | } |
| 231 | 237 | |
| 232 | -function learn_press_course_item_format_exclude( $format, $item ) { | |
| 238 | +/** | |
| 239 | + * @deprecated 4.2.7.4 | |
| 240 | + */ | |
| 241 | +/*function learn_press_course_item_format_exclude( $format, $item ) { | |
| 233 | 242 | if ( learn_press_get_post_type( $item ) != LP_LESSON_CPT || ( $format == 'standard' ) ) { |
| 234 | 243 | $format = false; |
| 235 | 244 | } |
| 236 | 245 | |
| 237 | 246 | return $format; |
| 238 | -} | |
| 247 | +}*/ | |
| 239 | 248 | |
| 240 | 249 | /** |
| 241 | 250 | * Get curriculum of a course |
| 242 | 251 | * |
| @@ -243,15 +252,15 @@ | ||
| 243 | 252 | * @param $course_id |
| 244 | 253 | * |
| 245 | 254 | * @return mixed |
| 246 | 255 | * @version 1.0 |
| 247 | - * | |
| 256 | + * @deprecated 4.2.7.4 | |
| 248 | 257 | */ |
| 249 | -function learn_press_get_course_curriculum( $course_id ) { | |
| 258 | +/*function learn_press_get_course_curriculum( $course_id ) { | |
| 250 | 259 | $course = learn_press_get_course( $course_id ); |
| 251 | 260 | |
| 252 | 261 | return $course->get_curriculum(); |
| 253 | -} | |
| 262 | +}*/ | |
| 254 | 263 | |
| 255 | 264 | /** |
| 256 | 265 | * Verify course access |
| 257 | 266 | * |
| @@ -261,9 +270,9 @@ | ||
| 261 | 270 | * @return boolean |
| 262 | 271 | * @deprecated 4.1.3 |
| 263 | 272 | * @editor tungnx |
| 264 | 273 | */ |
| 265 | -function learn_press_is_enrolled_course( $course_id = null, $user_id = null ) { | |
| 274 | +/*function learn_press_is_enrolled_course( $course_id = null, $user_id = null ) { | |
| 266 | 275 | _deprecated_function( __FUNCTION__, '4.1.3' ); |
| 267 | 276 | if ( $course = learn_press_get_course( $course_id ) && $user = learn_press_get_user( $user_id ) ) { |
| 268 | 277 | return $user->has_enrolled_course( $course_id ); |
| 269 | 278 | } |
| @@ -268,9 +277,9 @@ | ||
| 268 | 277 | return $user->has_enrolled_course( $course_id ); |
| 269 | 278 | } |
| 270 | 279 | |
| 271 | 280 | return false; |
| 272 | -} | |
| 281 | +}*/ | |
| 273 | 282 | |
| 274 | 283 | /** |
| 275 | 284 | * Detect if a course is free or not |
| 276 | 285 | * |
| @@ -276,16 +285,17 @@ | ||
| 276 | 285 | * |
| 277 | 286 | * @param null $course_id |
| 278 | 287 | * |
| 279 | 288 | * @return bool |
| 289 | + * @deprecated 4.2.7.4 | |
| 280 | 290 | */ |
| 281 | -function learn_press_is_free_course( $course_id = null ) { | |
| 291 | +/*function learn_press_is_free_course( $course_id = null ) { | |
| 282 | 292 | if ( ! $course_id ) { |
| 283 | 293 | $course_id = get_the_ID(); |
| 284 | 294 | } |
| 285 | 295 | |
| 286 | 296 | return learn_press_get_course( $course_id )->is_free(); |
| 287 | -} | |
| 297 | +}*/ | |
| 288 | 298 | |
| 289 | 299 | /** |
| 290 | 300 | * get current status of user's course |
| 291 | 301 | * |
| @@ -293,11 +303,11 @@ | ||
| 293 | 303 | * @param int $course_id |
| 294 | 304 | * |
| 295 | 305 | * @return string |
| 296 | 306 | * @author Tunn |
| 297 | - * | |
| 307 | + * @deprecated 4.2.7.4 | |
| 298 | 308 | */ |
| 299 | -function learn_press_get_user_course_status( $user_id = null, $course_id = null ) { | |
| 309 | +/*function learn_press_get_user_course_status( $user_id = null, $course_id = null ) { | |
| 300 | 310 | $course = learn_press_get_course( $course_id ); |
| 301 | 311 | $user = learn_press_get_user( $user_id ); |
| 302 | 312 | |
| 303 | 313 | if ( $course && $user ) { |
| @@ -304,9 +314,9 @@ | ||
| 304 | 314 | return $user->get_course_status( $course_id ); |
| 305 | 315 | } |
| 306 | 316 | |
| 307 | 317 | return false; |
| 308 | -} | |
| 318 | +}*/ | |
| 309 | 319 | |
| 310 | 320 | /** |
| 311 | 321 | * Wrap function can-view-item of user object. |
| 312 | 322 | * |
| @@ -318,14 +328,14 @@ | ||
| 318 | 328 | * @since 3.1.0 |
| 319 | 329 | * |
| 320 | 330 | */ |
| 321 | 331 | //function learn_press_can_view_item( $item_id, $course_id = 0, $user_id = 0 ) { |
| 322 | -// if ( ! $user_id ) { | |
| 323 | -// $user_id = get_current_user_id(); | |
| 324 | -// } | |
| 325 | -// $user = learn_press_get_user( $user_id ); | |
| 332 | +// if ( ! $user_id ) { | |
| 333 | +// $user_id = get_current_user_id(); | |
| 334 | +// } | |
| 335 | +// $user = learn_press_get_user( $user_id ); | |
| 326 | 336 | // |
| 327 | -// return $user->can_view_item( $item_id, $course_id ); | |
| 337 | +// return $user->can_view_item( $item_id, $course_id ); | |
| 328 | 338 | //} |
| 329 | 339 | |
| 330 | 340 | /** |
| 331 | 341 | * Get course setting is enroll required or public |
| @@ -333,17 +343,17 @@ | ||
| 333 | 343 | * @param int $course_id |
| 334 | 344 | * |
| 335 | 345 | * @return boolean |
| 336 | 346 | * @since 0.9.5 |
| 337 | - * | |
| 347 | + * @deprecated 4.2.7.4 | |
| 338 | 348 | */ |
| 339 | -function learn_press_course_enroll_required( $course_id = null ) { | |
| 349 | +/*function learn_press_course_enroll_required( $course_id = null ) { | |
| 340 | 350 | $course_id = learn_press_get_course_id( $course_id ); |
| 341 | 351 | |
| 342 | 352 | $required = ( 'yes' == get_post_meta( $course_id, '_lpr_course_enrolled_require', true ) ); |
| 343 | 353 | |
| 344 | 354 | return apply_filters( 'learn_press_course_enroll_required', $required, $course_id ); |
| 345 | -} | |
| 355 | +}*/ | |
| 346 | 356 | |
| 347 | 357 | function learn_press_get_all_courses( $args = array() ) { |
| 348 | 358 | $term = ''; |
| 349 | 359 | $exclude = ''; |
| @@ -361,9 +371,12 @@ | ||
| 361 | 371 | |
| 362 | 372 | return apply_filters( 'learn_press_get_courses', $posts, $args ); |
| 363 | 373 | } |
| 364 | 374 | |
| 365 | -function learn_press_search_post_excerpt( $where = '' ) { | |
| 375 | +/** | |
| 376 | + * @deprecated 4.2.7.4 | |
| 377 | + */ | |
| 378 | +/*function learn_press_search_post_excerpt( $where = '' ) { | |
| 366 | 379 | global $wp_the_query, $wpdb; |
| 367 | 380 | |
| 368 | 381 | if ( empty( $wp_the_query->query_vars['s'] ) ) { |
| 369 | 382 | return $where; |
| @@ -375,9 +388,9 @@ | ||
| 375 | 388 | $where |
| 376 | 389 | ); |
| 377 | 390 | |
| 378 | 391 | return $where; |
| 379 | -} | |
| 392 | +}*/ | |
| 380 | 393 | |
| 381 | 394 | // add_filter( 'posts_where', 'learn_press_search_post_excerpt' ); |
| 382 | 395 | |
| 383 | 396 | function learn_press_get_course_user( $course_id = null ) { |
| @@ -390,19 +403,17 @@ | ||
| 390 | 403 | |
| 391 | 404 | /** |
| 392 | 405 | * Get item types support in course curriculum. |
| 393 | 406 | * |
| 394 | - * @param bool $keys | |
| 395 | - * | |
| 396 | - * @return mixed|null | |
| 407 | + * @return array | |
| 397 | 408 | */ |
| 398 | -function learn_press_course_get_support_item_types( $keys = false ) { | |
| 399 | - $types = array(); | |
| 400 | - if ( ! empty( $GLOBALS['learn_press_course_support_item_types'] ) ) { | |
| 401 | - $types = $GLOBALS['learn_press_course_support_item_types']; | |
| 402 | - } | |
| 409 | +function learn_press_course_get_support_item_types() { | |
| 410 | + $types = [ | |
| 411 | + LP_LESSON_CPT => __( 'Lesson', 'learnpress' ), | |
| 412 | + LP_QUIZ_CPT => __( 'Quiz', 'learnpress' ), | |
| 413 | + ]; | |
| 403 | 414 | |
| 404 | - return apply_filters( 'learn-press/course-support-items', $keys ? array_keys( $types ) : $types, $keys ); | |
| 415 | + return apply_filters( 'learn-press/course-support-items', $types, false ); | |
| 405 | 416 | } |
| 406 | 417 | |
| 407 | 418 | /** |
| 408 | 419 | * Register new type of course item |
| @@ -408,10 +419,11 @@ | ||
| 408 | 419 | * Register new type of course item |
| 409 | 420 | * |
| 410 | 421 | * @param string $post_type - Usually is post type |
| 411 | 422 | * @param string $label - Name show for user |
| 423 | + * @deprecated 4.2.7.4 | |
| 412 | 424 | */ |
| 413 | -function learn_press_course_add_support_item_type( $post_type, $label = '' ) { | |
| 425 | +/*function learn_press_course_add_support_item_type( $post_type, $label = '' ) { | |
| 414 | 426 | if ( empty( $GLOBALS['learn_press_course_support_item_types'] ) ) { |
| 415 | 427 | $GLOBALS['learn_press_course_support_item_types'] = array(); |
| 416 | 428 | } |
| 417 | 429 | if ( func_num_args() == 1 && is_array( func_get_arg( 0 ) ) ) { |
| @@ -420,9 +432,9 @@ | ||
| 420 | 432 | } |
| 421 | 433 | } elseif ( func_num_args() == 2 ) { |
| 422 | 434 | $GLOBALS['learn_press_course_support_item_types'][ func_get_arg( 0 ) ] = func_get_arg( 1 ); |
| 423 | 435 | } |
| 424 | -} | |
| 436 | +}*/ | |
| 425 | 437 | |
| 426 | 438 | /** |
| 427 | 439 | * Check if course is support an item's type. |
| 428 | 440 | * |
| @@ -444,14 +456,17 @@ | ||
| 444 | 456 | |
| 445 | 457 | return $support; |
| 446 | 458 | } |
| 447 | 459 | |
| 448 | -learn_press_course_add_support_item_type( | |
| 460 | +/** | |
| 461 | + * @deprecated 4.2.7.4 | |
| 462 | + */ | |
| 463 | +/*learn_press_course_add_support_item_type( | |
| 449 | 464 | array( |
| 450 | 465 | 'lp_lesson' => __( 'Lesson', 'learnpress' ), |
| 451 | 466 | 'lp_quiz' => __( 'Quiz', 'learnpress' ), |
| 452 | 467 | ) |
| 453 | -); | |
| 468 | +);*/ | |
| 454 | 469 | |
| 455 | 470 | function learn_press_add_course_item_feature( $type, $feature ) { |
| 456 | 471 | $features = array(); |
| 457 | 472 | if ( ! empty( $GLOBALS['learn_press_course_item_features'] ) ) { |
| @@ -504,9 +519,9 @@ | ||
| 504 | 519 | * @param int $item_id |
| 505 | 520 | * |
| 506 | 521 | * @return string |
| 507 | 522 | * @since 3.0.0 |
| 508 | - * | |
| 523 | + * Addon Assignment 4.1.1 still use | |
| 509 | 524 | */ |
| 510 | 525 | function learn_press_get_course_item_permalink( int $course_id = 0, int $item_id = 0 ): string { |
| 511 | 526 | $course = learn_press_get_course( $course_id ); |
| 512 | 527 | if ( $course ) { |
| @@ -515,25 +530,20 @@ | ||
| 515 | 530 | |
| 516 | 531 | return ''; |
| 517 | 532 | } |
| 518 | 533 | |
| 519 | - | |
| 534 | +/** | |
| 535 | + * @deprecated 4.2.2 | |
| 536 | + */ | |
| 520 | 537 | function learn_press_get_the_course() { |
| 521 | - static $course; | |
| 522 | - if ( ! $course ) { | |
| 523 | - $course_id = get_the_ID(); | |
| 524 | - if ( learn_press_get_post_type( $course ) == LP_COURSE_CPT ) { | |
| 525 | - $course = learn_press_get_course( $course_id ); | |
| 526 | - } | |
| 527 | - } | |
| 528 | - if ( ! $course ) { | |
| 529 | - return new LP_Course( 0 ); | |
| 530 | - } | |
| 531 | - | |
| 532 | - return $course; | |
| 538 | + _deprecated_function( __FUNCTION__, '4.2.2', 'learn_press_get_course' ); | |
| 539 | + return learn_press_get_course(); | |
| 533 | 540 | } |
| 534 | 541 | |
| 535 | -function learn_press_get_user_question_answer( $args = '' ) { | |
| 542 | +/** | |
| 543 | + * @deprecated 4.2.7.4 | |
| 544 | + */ | |
| 545 | +/*function learn_press_get_user_question_answer( $args = '' ) { | |
| 536 | 546 | $args = wp_parse_args( |
| 537 | 547 | $args, |
| 538 | 548 | array( |
| 539 | 549 | 'question_id' => 0, |
| @@ -560,19 +570,25 @@ | ||
| 560 | 570 | } |
| 561 | 571 | } |
| 562 | 572 | |
| 563 | 573 | return $answered; |
| 564 | -} | |
| 574 | +}*/ | |
| 565 | 575 | |
| 566 | -function need_to_updating() { | |
| 576 | +/** | |
| 577 | + * @deprecated 4.2.7.4 | |
| 578 | + */ | |
| 579 | +/*function need_to_updating() { | |
| 567 | 580 | ob_start(); |
| 568 | 581 | learn_press_display_message( 'This function need to updating' ); |
| 569 | 582 | |
| 570 | 583 | return ob_get_clean(); |
| 571 | -} | |
| 584 | +}*/ | |
| 572 | 585 | |
| 573 | -/* filter section item single course */ | |
| 574 | -function learn_press_get_course_sections() { | |
| 586 | +/** | |
| 587 | + * filter section item single course | |
| 588 | + * @deprecated 4.2.7.4 | |
| 589 | + */ | |
| 590 | +/*function learn_press_get_course_sections() { | |
| 575 | 591 | return apply_filters( |
| 576 | 592 | 'learn_press_get_course_sections', |
| 577 | 593 | array( |
| 578 | 594 | 'lp_lesson', |
| @@ -578,23 +594,29 @@ | ||
| 578 | 594 | 'lp_lesson', |
| 579 | 595 | 'lp_quiz', |
| 580 | 596 | ) |
| 581 | 597 | ); |
| 582 | -} | |
| 598 | +}*/ | |
| 583 | 599 | |
| 584 | -function lean_press_get_course_sections() { | |
| 600 | +/** | |
| 601 | + * @deprecated 4.2.7.4 | |
| 602 | + */ | |
| 603 | +/*function lean_press_get_course_sections() { | |
| 585 | 604 | _deprecated_function( __FUNCTION__, '2.1', 'learn_press_get_course_sections' ); |
| 586 | 605 | |
| 587 | 606 | return learn_press_get_course_sections(); |
| 588 | -} | |
| 607 | +}*/ | |
| 589 | 608 | |
| 590 | -if ( ! function_exists( 'learn_press_get_course_item_url' ) ) { | |
| 609 | +/** | |
| 610 | + * @deprecated 4.2.7.4 | |
| 611 | + */ | |
| 612 | +/*if ( ! function_exists( 'learn_press_get_course_item_url' ) ) { | |
| 591 | 613 | function learn_press_get_course_item_url( $course_id = null, $item_id = null ) { |
| 592 | 614 | $course = learn_press_get_course( $course_id ); |
| 593 | 615 | |
| 594 | 616 | return $course ? $course->get_item_link( $item_id ) : false; |
| 595 | 617 | } |
| 596 | -} | |
| 618 | +}*/ | |
| 597 | 619 | |
| 598 | 620 | /** |
| 599 | 621 | * Add filter to WP comment form of lesson or quiz to output ID of current course. |
| 600 | 622 | * |
| @@ -714,33 +736,8 @@ | ||
| 714 | 736 | return $return; |
| 715 | 737 | } |
| 716 | 738 | }*/ |
| 717 | 739 | |
| 718 | -if ( ! function_exists( 'learn_press_edit_item_link' ) ) { | |
| 719 | - /** | |
| 720 | - * Displaying course items navigation | |
| 721 | - * | |
| 722 | - * @param null $item_id | |
| 723 | - * @param null $course_id | |
| 724 | - * @param bool $content_only | |
| 725 | - */ | |
| 726 | - function learn_press_edit_item_link( $item_id = null, $course_id = null, $content_only = false ) { | |
| 727 | - $user = learn_press_get_current_user(); | |
| 728 | - if ( $user->can_edit_item( $item_id, $course_id ) ) : ?> | |
| 729 | - <p class="edit-course-item-link"> | |
| 730 | - <a href="<?php echo get_edit_post_link( $item_id ); ?>"> | |
| 731 | - <?php | |
| 732 | - _e( | |
| 733 | - 'Edit this item', | |
| 734 | - 'learnpress' | |
| 735 | - ); | |
| 736 | - ?> | |
| 737 | - </a> | |
| 738 | - </p> | |
| 739 | - <?php | |
| 740 | - endif; | |
| 741 | - } | |
| 742 | -} | |
| 743 | 740 | /** |
| 744 | 741 | * Get course id of an item by id |
| 745 | 742 | * |
| 746 | 743 | * @deprecated 4.1.6.9 |
| @@ -863,18 +860,17 @@ | ||
| 863 | 860 | * @since 3.0.0 |
| 864 | 861 | * |
| 865 | 862 | */ |
| 866 | 863 | function learn_press_get_preview_url( $post_id ) { |
| 867 | - return | |
| 868 | - esc_url_raw( | |
| 869 | - add_query_arg( | |
| 870 | - array( | |
| 871 | - 'lp-preview' => $post_id, | |
| 872 | - '_wpnonce' => wp_create_nonce( 'lp-preview' ), | |
| 873 | - ), | |
| 874 | - trailingslashit( get_home_url() ) | |
| 875 | - ) | |
| 876 | - ); | |
| 864 | + return esc_url_raw( | |
| 865 | + add_query_arg( | |
| 866 | + array( | |
| 867 | + 'lp-preview' => $post_id, | |
| 868 | + '_wpnonce' => wp_create_nonce( 'lp-preview' ), | |
| 869 | + ), | |
| 870 | + trailingslashit( get_home_url() ) | |
| 871 | + ) | |
| 872 | + ); | |
| 877 | 873 | } |
| 878 | 874 | |
| 879 | 875 | if ( ! function_exists( 'learn_press_course_item_type_link' ) ) { |
| 880 | 876 | /** |
| @@ -962,9 +958,12 @@ | ||
| 962 | 958 | |
| 963 | 959 | return $html; |
| 964 | 960 | } |
| 965 | 961 | |
| 966 | -function learn_press_get_course_results_tooltip( $course_id ) { | |
| 962 | +/** | |
| 963 | + * @deprecated 4.2.7.4 | |
| 964 | + */ | |
| 965 | +/*function learn_press_get_course_results_tooltip( $course_id ) { | |
| 967 | 966 | $metabox = LP_Course_Post_Type::assessment_meta_box(); |
| 968 | 967 | $options = $metabox['fields'][0]['options']; |
| 969 | 968 | $cr = get_post_meta( $course_id, '_lp_course_result', true ); |
| 970 | 969 | $tooltip = ! empty( $options[ $cr ] ) ? $options[ $cr ] : false; |
| @@ -974,9 +973,9 @@ | ||
| 974 | 973 | } |
| 975 | 974 | } |
| 976 | 975 | |
| 977 | 976 | return $tooltip; |
| 978 | -} | |
| 977 | +}*/ | |
| 979 | 978 | |
| 980 | 979 | function learn_press_course_passing_condition( $value, $format, $course_id ) { |
| 981 | 980 | $course = learn_press_get_course( $course_id ); |
| 982 | 981 | $quiz_id = $course->get_final_quiz(); |
| @@ -995,13 +994,16 @@ | ||
| 995 | 994 | } |
| 996 | 995 | |
| 997 | 996 | add_filter( 'learn-press/course-passing-condition', 'learn_press_course_passing_condition', 10, 3 ); |
| 998 | 997 | |
| 998 | +/** | |
| 999 | + * @deprecated 4.2.7.4 | |
| 1000 | + */ | |
| 999 | 1001 | function learn_press_remove_query_var_enrolled_course( $redirect ) { |
| 1000 | 1002 | return esc_url_raw( remove_query_arg( 'enroll-course', $redirect ) ); |
| 1001 | 1003 | } |
| 1002 | 1004 | |
| 1003 | -add_filter( 'learn-press/enroll-course-redirect', 'learn_press_remove_query_var_enrolled_course' ); | |
| 1005 | +//add_filter( 'learn-press/enroll-course-redirect', 'learn_press_remove_query_var_enrolled_course' ); | |
| 1004 | 1006 | |
| 1005 | 1007 | /** |
| 1006 | 1008 | * Mark the user to know if they have just logged in |
| 1007 | 1009 | * for some purpose. |