PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / 1.1.0
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar v1.1.0
3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 All 156 releases
notificationx / admin / includes / fields / nx-select.php

nx-select.php in NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar 1.1.0, at admin/includes/fields/nx-select.php

25 lines 835 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $class .= ' nx-select';
3
4 $multiple = isset( $field['multiple'] ) ? 'multiple' : '';
5
6 if( $multiple ) {
7 $name .= "[]";
8 }
9
10 if( isset( $field['disable'] ) && $field['disable'] == true ) {
11 $attrs .= ' disabled';
12 }
13 ?>
14 <select class="<?php echo esc_attr( $class ); ?>" <?php echo $multiple; ?> name="<?php echo $name; ?>" id="<?php echo $field_id; ?>" <?php echo $attrs; ?>>
15 <?php
16 foreach( $field['options'] as $opt_id => $option ) {
17 if( is_array( $value ) ) {
18 $selected = in_array( $opt_id, $value ) ? 'selected="true"' : '';
19 } else {
20 $selected = ( $value == $opt_id ) ? 'selected="true"' : '';
21 }
22 echo '<option value="'. $opt_id .'" '. $selected .'>'. $option .'</option>';
23 }
24 ?>
25 </select>