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
363 364 365 366 367 368 369 370 371 372 373 374 375 | 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 ; } |