HEX
Server: LiteSpeed
System: Linux da4 4.18.0-553.74.1.lve.el8.x86_64 #1 SMP Tue Sep 9 14:25:24 UTC 2025 x86_64
User: wwwprimemarka (2294)
PHP: 5.6.40
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wwwprimemarka/public_html/wp-content/themes/Zephyr/framework/vendor/usof/fields/switch.php
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );

/**
 * Theme Options Field: Switch
 *
 * On-off switcher
 *
 * @var $field_id string Field ID
 * @var $field array Field options
 *
 * @param $field ['title'] string Field title
 * @param $field ['description'] string Field title
 * @param $field ['options'] array Array of two key => title pairs
 * @param $field ['text'] array Additional text to show right near the switcher
 *
 * @var $value string Current value
 */

if ( ! isset( $field['options'] ) OR empty( $field['options'] ) ) {
	$field['options'] = array(
		TRUE => 'On',
		FALSE => 'Off',
	);
}
$field_keys = array_keys( $field['options'] );
if ( count( $field_keys ) < 2 ) {
	return;
}

$output = '<div class="usof-form-row-control"><div class="usof-switcher">';
$output .= '<input type="hidden" name="' . $field_id . '" value="' . $field_keys[1] . '" />';
$output .= '<input type="checkbox" id="usof_' . $field_id . '" name="' . $field_id . '"' . checked( $value, $field_keys[0], FALSE ) . ' value="' . $field_keys[0] . '">';
$output .= '<label for="usof_' . $field_id . '"><span class="usof-switcher-box">';
$output .= '</span><span class="usof-switcher-button"></span>';
if ( isset( $field['text'] ) AND ! empty( $field['text'] ) ) {
	$output .= '<span class="usof-switcher-text">' . $field['text'] . '</span>';
}
$output .= '</label></div>';
$output .= '</div>';

echo $output;