| 1 |
<?php |
| 2 |
|
| 3 |
use LearnPress\Helpers\Template; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class LP_Course_Template |
| 7 |
* |
| 8 |
* Groups templates related course and items |
| 9 |
* |
| 10 |
* @since 3.x.x |
| 11 |
*/ |
| 12 |
class LP_Template_General extends LP_Abstract_Template { |
| 13 |
|
| 14 |
/*public function filter_block_content_template( $located, $template_name, $args, $template_path, $default_path ) { |
| 15 |
if ( $template_name == 'global/block-content.php' ) { |
| 16 |
$can_view_item = false; |
| 17 |
|
| 18 |
if ( ! is_user_logged_in() ) { |
| 19 |
$can_view_item = 'not-logged-in'; |
| 20 |
} elseif ( ! learn_press_current_user_enrolled_course() ) { |
| 21 |
$can_view_item = 'not-enrolled'; |
| 22 |
} |
| 23 |
learn_press_get_template( 'single-course/content-protected.php', array( 'can_view_item' => $can_view_item ) ); |
| 24 |
|
| 25 |
return false; |
| 26 |
} |
| 27 |
|
| 28 |
return $located; |
| 29 |
|
| 30 |
}*/ |
| 31 |
|
| 32 |
public function term_conditions_template() { |
| 33 |
$page_id = learn_press_get_page_id( 'term_conditions' ); |
| 34 |
if ( $page_id ) { |
| 35 |
$page_link = get_page_link( $page_id ); |
| 36 |
learn_press_get_template( 'checkout/term-conditions.php', array( 'page_link' => $page_link ) ); |
| 37 |
} |
| 38 |
} |
| 39 |
|
| 40 |
public function breadcrumb( $args = array() ) { |
| 41 |
echo Template::html_breadcrumb(); |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Get header for course page |
| 46 |
*/ |
| 47 |
public function template_header() { |
| 48 |
get_header( 'course' ); |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* Get header for course page |
| 53 |
*/ |
| 54 |
public function template_footer() { |
| 55 |
get_footer( 'course' ); |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
return new LP_Template_General(); |
| 60 |
|