FEATURE Handling general description
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9b267d9a50
commit
8f920ea6d1
|
|
@ -3,6 +3,7 @@
|
|||
$documents_statistics = get_field('documents_statistics') ?: array();
|
||||
$total_documents_count = 0;
|
||||
|
||||
$general_description = get_field('general_description');
|
||||
|
||||
foreach ($documents_statistics as $document_statistic) {
|
||||
$total_documents_count += intval($document_statistic['amount']);
|
||||
|
|
@ -14,7 +15,6 @@ foreach ($documents_statistics as $document_statistic) {
|
|||
$document_statistic['percentage'] = intval($document_statistic['amount']) / $total_documents_count * 100;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<section <?php echo get_block_wrapper_attributes(array(
|
||||
|
|
@ -66,6 +66,11 @@ foreach ($documents_statistics as $document_statistic) {
|
|||
<p class="total-documents-label">Dans nos collections</p>
|
||||
</div>
|
||||
|
||||
<?php if ($general_description) : ?>
|
||||
<p class="stat-item-description">
|
||||
<?php echo $general_description; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</li>
|
||||
<?php foreach ($documents_statistics as $index => $document_statistic) : ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user