HEX
Server: Apache
System: Linux webm004.cluster121.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: grainesdfo (155059)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/grainesdfo/www/wp-content/plugins/backwpup/components/containers/accordion.php
<?php
use BackWPup\Utils\BackWPupHelpers;
/**
 * @var string  $title          Title of the accordion. Default: "".
 * @var bool    $open           Optional. True to open the accordion. Default: false. 
 * @var string  $children       Children component to display. Must fit a /part/ template. Default: null.
 * @var array   $children_data  Optional. Data to pass to the children component. Default: [].
 * @var bool    $children_return Optional. True to return the children component. Default: false.
 */

# Defaults
$title = $title ?? "";
$open = $open ?? false;
$children = $children ?? null;
$children_data = $children_data ?? [];
$children_return = $children_return ?? false;

?>
<details <?php if ($open) : ?>open<?php endif; ?> class="group/accordion flex items-center justify-between flex-col">
  <summary class="cursor-pointer flex items-center gap-4 justify-between">
    <h2 class="text-xl text-primary-darker font-semibold font-title"><?php echo $title; ?></h2>
    <span class="transition-transform rotate-180 group-open/accordion:rotate-0">
      <?php BackWPupHelpers::component("icon", ["name" => "toggle", "size" => "medium"]); ?>
    </span>
  </summary>

  <div class="mt-4">
    <?php isset($children) && BackWPupHelpers::children($children, $children_return, $children_data); ?>
  </div>
</details>