GRAYBYTE WORDPRESS FILE MANAGER3597

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/backwpup/components/form/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/trustyourlawyer.com/wp-content/plugins/backwpup/components/form//checkbox.php
<?php
use BackWPup\Utils\BackWPupHelpers;
/**
 * @var string  $name           Unique name of the field to handle value when form is submitted to PHP.  
 * @var string  $label          The label for the toggle. Default: null 
 * @var bool    $checked        Optional. True to check the toggle. Default: false.    
 * @var string  $tooltip        Optional. The tooltip content. Default: "".
 * @var string  $tooltip_pos    Optional. The tooltip position. Default: "center".
 * @var bool    $multiline      Optional. If true, aligns checkbox on top. Default: false.
 * @var string  $style          Optional. Style for the checkbox. Values: "default", "light". Default: "default".
 * @var string  $trigger        Optional. For JS. The CSS classname for jQuery. Default: null.
 * @var string $value           Optional. The value of the checkbox. Default: null.
 * @var string $identifier Optional. The field identifier. Default: null.
 * @var bool $disabled Optional. True to disable the checkbox. Default: false.
 * @var array $data            Optional. The data to be used in the component. Default: [].
 */

# Name
if (!isset($name)) {
  throw new Exception("Attribute 'name' is required on Checkbox field");
}
# Disabled
$disabled = $disabled ?? false;
$disabledAttr = (true === $disabled) ? ' disabled="disabled"' : null;
# ID
$id = isset($identifier) ? " id='".esc_attr($identifier)."'" : null;

# Label
$label = $label ?? "";
$value = $value ?? $label;

# Checked
$checked_attr = isset($checked) && $checked ? "checked" : "";

# Multiline
$items_align = isset($multiline) && $multiline ? "items-start" : "items-center";

# Data attributes
$data_attributes = '';
if (isset($data) && !empty($data)) {
  foreach ($data as $key => $value) {
    $data_attributes .= ' data-' . esc_attr($key) . '="' . esc_attr($value) . '"';
  }
}


# JS actions
$trigger = isset($trigger) ? "js-backwpup-$trigger" : "";

# Style
$style = $style ?? "default";
$checkbox_style = BackWPupHelpers::clsx(
  "relative shrink-0 h-6 w-6 rounded-sm border peer-checked/checkbox:border-secondary-base after:hidden peer-checked/checkbox:after:block after:absolute after:h-4 after:w-4 after:m-[3px] after:rounded-[1px] after:bg-secondary-base",
  ($style === "light" ? "border-grey-500" : false),
  ($style === "default" ? "border-primary-darker " : false)
);

# Tooltip position
$tooltip_pos = $tooltip_pos ?? "top";

$input_style = BackWPupHelpers::clsx(
  "peer/checkbox sr-only",
  (isset($checked) && $checked ? "checked" : false),
  $trigger
);

?>
<label class="<?php echo BackWPupHelpers::clsx("cursor-pointer flex", $items_align, "gap-2 text-base leading-5 font-title"); ?>">
  <input value="<?php echo $value; ?>" <?php echo $id; ?><?php echo $disabledAttr; ?> type="checkbox" name="<?php echo $name; ?>" class="<?php echo $input_style; ?>" <?php echo $checked_attr; ?> <?php echo $data_attributes; ?>>
  <div class="<?php echo $checkbox_style; ?>"></div>
  <?php echo $label; ?>
  <?php isset($tooltip) && BackWPupHelpers::component("tooltip", ["content" => $tooltip, "icon_size" => "small", "position" => $tooltip_pos]); ?>
</label>

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:37
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:37
giriqfky / giriqfky
0644
add.php
1.545 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
button.php
4.9 KB
April 29 2025 17:34:12
giriqfky / giriqfky
0644
checkbox.php
3.04 KB
April 07 2025 18:31:08
giriqfky / giriqfky
0644
hidden.php
0.487 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
search.php
1.178 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
select.php
2.93 KB
April 29 2025 17:34:12
giriqfky / giriqfky
0644
text.php
2.684 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644
toggle.php
1.724 KB
February 04 2025 14:50:44
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF