dozent_switch_field( string $name = '', string $label = '', string $old_value = '' )
Parameters
- $name
-
(string) (Optional)
Default value: ''
- $label
-
(string) (Optional)
Default value: ''
- $old_value
-
(string) (Optional)
Default value: ''
Return
(string)
Source
File: includes/form-functions.php
function dozent_switch_field($name = '', $label = '', $old_value = '') { $field_html = "<div class='switch-button-wrapper d-flex pt-2'> <label class='dozent-switch mr-2'> <input type='checkbox' value='1' id='{$name}' name='{$name}' " . checked(1, $old_value, false) . " /> <span class='dozent-switch-slider dozent-round'></span> </label> <label for='{$name}' style='margin-left: 35px;' >{$label}</label> </div>"; ?> <?php return $field_html; }