PluginProbe
Bubble Menu – Floating Button Menu with Sticky Navigation / 3.1
Bubble Menu – Floating Button Menu with Sticky Navigation v3.1
trunk 1.3 2.0 2.2 2.2.1 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.1 4.1.1
bubble-menu / admin / fields / select.php

select.php in Bubble Menu – Floating Button Menu with Sticky Navigation 3.1, at admin/fields/select.php

36 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for field select
4 *
5 * @package Wow_Plugin
6 * @copyright Copyright (c) 2018, Dmytro Lobov
7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8 * @since 1.0
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 $disabled = isset( $arg['disabled'] ) ? ' disabled' : '';
16 $readonly = isset( $arg['readonly'] ) ? ' readonly' : '';
17 $id = ( $id === null ) ? '' : ' id="' . $id . '"';
18 ?>
19
20 <div class="control">
21 <div class="select is-fullwidth">
22 <select name="<?php echo esc_attr( $name ); ?>'"<?php echo wp_kses_post( $class . $disabled . $readonly . $id ); ?>>
23 <?php
24 foreach ( $options as $key => $value ) {
25 if ( strrpos( $key, '_start' ) != false ) {
26 echo '<optgroup label="' . esc_attr( $value ) . '">';
27 } elseif ( strrpos( $key, '_end' ) != false ) {
28 echo '</optgroup>';
29 } else {
30 echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key, $val, false ) . '>' . esc_attr( $value ) . '</option>';
31 }
32 } ?>
33 </select>
34 </div>
35 </div>
36