| 1 |
<?php |
| 2 |
/** |
| 3 |
* Themify Compatibility Code |
| 4 |
* |
| 5 |
* @package Themify |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Sensei LMS |
| 10 |
* @link https://woocommerce.com/products/sensei/ |
| 11 |
*/ |
| 12 |
class Themify_Compat_sensei { |
| 13 |
|
| 14 |
static function init() { |
| 15 |
global $woothemes_sensei; |
| 16 |
|
| 17 |
add_theme_support( 'sensei' ); |
| 18 |
remove_action('sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); |
| 19 |
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); |
| 20 |
add_action( 'sensei_before_main_content', array( __CLASS__, 'sensei_before_main_content' ), 1 ); |
| 21 |
add_action( 'sensei_after_main_content', array( __CLASS__, 'sensei_after_main_content' ), 100 ); |
| 22 |
} |
| 23 |
|
| 24 |
public static function sensei_before_main_content() { |
| 25 |
?> |
| 26 |
<!-- layout --> |
| 27 |
<div id="layout" class="pagewidth tf_box tf_clearfix"> |
| 28 |
<?php themify_content_before(); // Hook ?> |
| 29 |
<!-- content --> |
| 30 |
<main id="content" class="tf_box tf_clearfix"> |
| 31 |
<?php themify_content_start(); // Hook |
| 32 |
} |
| 33 |
|
| 34 |
public static function sensei_after_main_content() { |
| 35 |
themify_content_end(); // Hook |
| 36 |
?> |
| 37 |
</main> |
| 38 |
<!-- /#content --> |
| 39 |
<?php |
| 40 |
themify_content_after(); // Hook |
| 41 |
themify_get_sidebar(); |
| 42 |
?> |
| 43 |
</div><!-- /#layout --> |
| 44 |
<?php |
| 45 |
} |
| 46 |
} |