| 1 |
<?php |
| 2 |
/** |
| 3 |
* Template hooks Archive Package. |
| 4 |
* |
| 5 |
* @since 1.0.0 |
| 6 |
* @version 1.0.0 |
| 7 |
*/ |
| 8 |
namespace LearnPress\TemplateHooks\Profile; |
| 9 |
|
| 10 |
use LearnPress\Helpers\Template; |
| 11 |
|
| 12 |
class ProfileStudentStatisticsTemplate { |
| 13 |
public static function instance() { |
| 14 |
static $instance = null; |
| 15 |
|
| 16 |
if ( is_null( $instance ) ) { |
| 17 |
$instance = new self(); |
| 18 |
} |
| 19 |
|
| 20 |
return $instance; |
| 21 |
} |
| 22 |
|
| 23 |
protected function __construct() { |
| 24 |
add_action( 'learn-press/profile/layout/student-statistics', [ $this, 'sections' ], 2 ); |
| 25 |
} |
| 26 |
|
| 27 |
public function sections( $data ) { |
| 28 |
$template_path = apply_filters( |
| 29 |
'learn-press/profile/layout/student-statistics/item-count', |
| 30 |
LP_PLUGIN_PATH . 'templates/profile/tabs/statistics/item-count.php' |
| 31 |
); |
| 32 |
Template::instance()->get_template( |
| 33 |
$template_path, |
| 34 |
compact( 'data' ) |
| 35 |
); |
| 36 |
} |
| 37 |
} |
| 38 |
|