| Server IP : 216.238.66.20 / Your IP : 216.73.216.199 Web Server : nginx/1.30.4 System : Linux woropds 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/sweetheart.mx/htdocs/wp-content/plugins/backwpup/components/navigation/ |
Upload File : |
<?php
use BackWPup\Utils\BackWPupHelpers;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* @var int $page_num Optional. The page number.
* @var string $arrow Optional. The arrow to display. Values: "left", "right". Replaces $page_num if set.
* @var bool $active Optional .If true, the button is active. Default: false.
* @var bool $dots Optional. If true, the button displays dots. Default: false.
* @var bool $disabled Optional. If true, the button is disabled. Default: false.
*/
# Page num
$page_num = isset($page_num) ? $page_num : "";
# Status & state
$disabled = $disabled ?? false;
$active = $active ?? false;
$dots = $dots ?? false;
# Arrow
$arrows = [
"left" => "arrow-left",
"right" => "arrow-right",
];
$arrow = isset($arrow) && array_key_exists($arrow, $arrows) ? $arrows[$arrow] : null;
# Classes
$base_styles = "flex items-center justify-center size-8 rounded border";
$contextual_styles = $active ? "bg-secondary-base border-secondary-base" : "border-grey-200 enabled:hover:bg-secondary-lighter enabled:hover:border-secondary-base disabled:text-grey-500";
?>
<button <?php if ($disabled || $dots) : ?>disabled<?php endif; ?> class="<?php echo esc_attr( BackWPupHelpers::clsx( $base_styles, $contextual_styles ) ); ?>" data-page="<?php echo esc_attr( $page_num ); ?>">
<?php if (!$arrow) {
echo esc_html( $page_num );
} ?>
<?php $arrow !== null && BackWPupHelpers::component("icon", ["name" => $arrow, "size" => "medium"]); ?>
<?php echo $dots ? "…" : ""; ?>
</button>