| 1 |
<?php |
| 2 |
/** |
| 3 |
* Admin View: Themes page. |
| 4 |
* |
| 5 |
* @package LearnPress/Admin/Views |
| 6 |
* @since 4.4.7 |
| 7 |
* @version 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
use LearnPress\Helpers\Template; |
| 11 |
use LearnPress\TemplateHooks\Admin\AdminTemplate; |
| 12 |
use LearnPress\TemplateHooks\Admin\AdminThemesDataTemplate; |
| 13 |
use LearnPress\TemplateHooks\TemplateAJAX; |
| 14 |
|
| 15 |
defined( 'ABSPATH' ) || exit; |
| 16 |
|
| 17 |
$section = apply_filters( |
| 18 |
'learn-press/admin/themes/page-section', |
| 19 |
array( |
| 20 |
'wrapper' => '<div class="lp-themes-page">', |
| 21 |
'title' => sprintf( |
| 22 |
'<h1 class="lp-be-page-title">%s</h1>', |
| 23 |
esc_html__( 'Recommended Themes for LearnPress', 'learnpress' ) |
| 24 |
), |
| 25 |
'subtitle' => sprintf( |
| 26 |
'<p class="lp-be-page-subtitle">%s</p>', |
| 27 |
esc_html__( |
| 28 |
'Discover high-performance Premium & Education themes optimized 100% for LearnPress LMS.', |
| 29 |
'learnpress' |
| 30 |
) |
| 31 |
), |
| 32 |
'themes' => TemplateAJAX::load_content_via_ajax( |
| 33 |
array( |
| 34 |
'id_url' => 'data-themes', |
| 35 |
), |
| 36 |
array( |
| 37 |
'class' => AdminThemesDataTemplate::class, |
| 38 |
'method' => 'html_data_online', |
| 39 |
) |
| 40 |
), |
| 41 |
'wrapper_end' => '</div>', |
| 42 |
) |
| 43 |
); |
| 44 |
|
| 45 |
echo AdminTemplate::html_on_wp_admin_screen( |
| 46 |
array( |
| 47 |
'content' => Template::combine_components( $section ), |
| 48 |
'title' => '', |
| 49 |
'id' => 'learn-press-themes', |
| 50 |
'hide_notices_wp' => true, |
| 51 |
) |
| 52 |
); |
| 53 |
|