# floating-button/5.1.1/admin/fields/checkbox.php

Floating Button – Easily Create Sticky, Fixed &amp; Floating Buttons, version 5.1.1. 20 lines.

- Page: https://pluginprobe.com/plugins/floating-button/5.1.1/code/admin/fields/checkbox.php
- Raw: https://pluginprobe.com/plugins/floating-button/5.1.1/raw/admin/fields/checkbox.php
- Modified: 2021-11-08T13:54:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/floating-button/5.1.1/code/admin/fields/checkbox.php#L10-L20`.

```php
<?php
/**
 * Template for field checkbox
 *
 * @package     Wow_Plugin
 * @copyright   Copyright (c) 2018, Dmytro Lobov
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       1.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$select = ! empty( $val ) ? ' checked="checked"' : '';
$id     = ( $id === null ) ? '' : ' id="' . esc_attr( $id ) . '"';

?>
<input type="checkbox" <?php echo wp_kses_post( $id . $select . $class ); ?>>
<input type="hidden" name="<?php echo esc_attr( $name ); ?>" value="">
```
