# float-menu/3.5.3./admin/partials/fields/select.php

Float menu – awesome floating side menu, version 3.5.3.. 32 lines.

- Page: https://pluginprobe.com/plugins/float-menu/3.5.3./code/admin/partials/fields/select.php
- Raw: https://pluginprobe.com/plugins/float-menu/3.5.3./raw/admin/partials/fields/select.php
- Modified: 2021-07-28T10:31:32+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/float-menu/3.5.3./code/admin/partials/fields/select.php#L10-L20`.

```php
<?php
/**
 * Template for field select
 *
 * @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;
}

$disabled = isset( $arg['disabled'] ) ? ' disabled' : '';
$readonly = isset( $arg['readonly'] ) ? ' readonly' : '';
$id       = ( $id === null ) ? '' : ' id="' . $id . '"';
?>
<select name="<?php echo esc_attr( $name ); ?>'"<?php echo wp_kses_post( $func . $class . $disabled . $readonly . $id ); ?>>
	<?php
	foreach ( $options as $key => $value ) {
		if ( strrpos( $key, '_start' ) != false ) {
			echo '<optgroup label="' . esc_attr( $value ) . '">';
		} elseif ( strrpos( $key, '_end' ) != false ) {
			echo '</optgroup>';
		} else {
			echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key, $val, false ) . '>' . esc_attr( $value ) . '</option>';
		}
	} ?>
</select>
<?php echo '<' . esc_attr( $separator ) . '/>'; ?>

```
