index.php
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* View: Dashboard Section.
*
* Tailwind.config contains some safe list classes for this view.
*
* @since 4.9.0
* @version 4.9.0
*
* @var Section $section Section.
* @var Template $this Current instance of template engine rendering this template.
*
* @package LearnDash\Core
*/
use LearnDash\Core\Template\Dashboards\Sections\Section;
use LearnDash\Core\Template\Template;
if (
! $section->has_sections()
&& ! $section->has_widgets()
) {
return;
}
?>
<div class="ld-dashboard-section ld-col-span-full lg:ld-col-span-<?php echo esc_attr( (string) $section->get_size() ); ?>">
<?php $this->template( 'dashboard/section/header' ); ?>
<?php if ( $section->has_sections() ) : ?>
<div class="ld-dashboard-section__sections">
<?php foreach ( $section->get_sections() as $child_section ) : ?>
<?php $this->template( 'dashboard/section', [ 'section' => $child_section ] ); ?>
<?php endforeach; ?>
</div>
<?php elseif ( $section->has_widgets() ) : ?>
<?php $this->template( 'dashboard/section/widgets' ); ?>
<?php endif; ?>
</div>