PluginProbe ʕ •ᴥ•ʔ
Slider Ultimate / 2.0.8
Slider Ultimate v2.0.8
trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9
ultimate-slider / lib / simple-admin-pages / classes / AdminPageSetting.Select.class.php
ultimate-slider / lib / simple-admin-pages / classes Last commit date
AdminPage.Menu.class.php 4 years ago AdminPage.Submenu.class.php 4 years ago AdminPage.Themes.class.php 4 years ago AdminPage.class.php 4 years ago AdminPageSection.class.php 4 years ago AdminPageSetting.Address.class.php 4 years ago AdminPageSetting.Checkbox.class.php 4 years ago AdminPageSetting.ColorPicker.class.php 4 years ago AdminPageSetting.Count.class.php 4 years ago AdminPageSetting.Editor.class.php 4 years ago AdminPageSetting.FileUpload.class.php 4 years ago AdminPageSetting.HTML.class.php 4 years ago AdminPageSetting.Image.class.php 4 years ago AdminPageSetting.InfiniteTable.class.php 4 years ago AdminPageSetting.McApiKey.class.php 4 years ago AdminPageSetting.McListMerge.class.php 4 years ago AdminPageSetting.Number.class.php 4 years ago AdminPageSetting.OpeningHours.class.php 4 years ago AdminPageSetting.Ordering.class.php 4 years ago AdminPageSetting.Radio.class.php 4 years ago AdminPageSetting.Scheduler.class.php 4 years ago AdminPageSetting.Select.class.php 4 years ago AdminPageSetting.SelectMenu.class.php 4 years ago AdminPageSetting.SelectPost.class.php 4 years ago AdminPageSetting.SelectTaxonomy.class.php 4 years ago AdminPageSetting.Text.class.php 4 years ago AdminPageSetting.Textarea.class.php 4 years ago AdminPageSetting.Time.class.php 4 years ago AdminPageSetting.Toggle.class.php 4 years ago AdminPageSetting.WarningTip.class.php 4 years ago AdminPageSetting.class.php 4 years ago Library.class.php 4 years ago
AdminPageSetting.Select.class.php
66 lines
1 <?php
2
3 /**
4 * Register, display and save a selection option with a drop-down menu.
5 *
6 * This setting accepts the following arguments in its constructor function.
7 *
8 * $args = array(
9 * 'id' => 'setting_id', // Unique id
10 * 'title' => 'My Setting', // Title or label for the setting
11 * 'description' => 'Description', // Help text description
12 * 'blank_option' => true, // Whether or not to show a blank option
13 * 'options' => array( // An array of key/value pairs which
14 * 'option1' => 'Option 1', // define the options.
15 * 'option2' => 'Option 2',
16 * ...
17 * );
18 * );
19 *
20 * @since 1.0
21 * @package Simple Admin Pages
22 */
23
24 class sapAdminPageSettingSelect_2_6_1 extends sapAdminPageSetting_2_6_1 {
25
26 public $sanitize_callback = 'sanitize_text_field';
27
28 // Whether or not to display a blank option
29 public $blank_option = true;
30
31 // An array of options for this select field, accepted as a key/value pair.
32 public $options = array();
33
34 /**
35 * Display this setting
36 * @since 1.0
37 */
38 public function display_setting() {
39
40 ?>
41
42 <fieldset <?php $this->print_conditional_data(); ?>>
43
44 <select name="<?php echo $this->get_input_name(); ?>" id="<?php echo $this->id; ?>" <?php echo ( $this->disabled ? 'disabled' : ''); ?>>
45
46 <?php if ( $this->blank_option === true ) : ?>
47 <option></option>
48 <?php endif; ?>
49
50 <?php foreach ( $this->options as $id => $title ) : ?>
51 <option value="<?php echo esc_attr( $id ); ?>"<?php if( $this->value == $id ) : ?> selected="selected"<?php endif; ?>><?php echo esc_html( $title ); ?></option>
52 <?php endforeach; ?>
53
54 </select>
55 <?php $this->display_disabled(); ?>
56
57 </fieldset>
58
59 <?php
60
61 $this->display_description();
62
63 }
64
65 }
66