PluginProbe
WP Directory Kit / trunk
WP Directory Kit vtrunk
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
wpdirectorykit / application / views / fields_edit / STARS.php

STARS.php in WP Directory Kit trunk, at application/views/fields_edit/STARS.php

73 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Edit field STARS.
4 *
5 * This is the template that field layout for edit form
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <?php
14
15 //wmvc_dump($field);
16
17 if(isset($field->field))
18 {
19 $field_id = $field->field;
20 }
21 else
22 {
23 $field_id = 'field_'.$field->idfield;
24 }
25
26 if(!isset($field->hint))$field->hint = '';
27 if(!isset($field->columns_number))$field->columns_number = '';
28 if(!isset($field->prefix))$field->prefix = '';
29 if(!isset($field->suffix))$field->suffix = '';
30 if(!isset($field->class))$field->class = '';
31
32 $field_label = $field->field_label;
33
34 $required = '';
35 if(isset($field->is_required) && $field->is_required == 1)
36 $required = '*';
37
38 if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE)
39 $required = '*';
40
41 ?>
42
43 <div class="wdk-field-<?php echo esc_attr($field_id);?> wdk-field-edit <?php echo esc_attr($field->field_type); ?> wdk-col-<?php echo esc_attr($field->columns_number); ?> <?php echo esc_attr($field->class); ?>">
44 <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label>
45 <div class="wdk-field-container">
46 <fieldset class="wdk-rating-field">
47 <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star5" name="<?php echo esc_attr($field_id); ?>" value="5" <?php if((int)wmvc_show_data($field_id, $db_data)=='5') echo 'checked="checked"';?>/>
48 <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star5" title="<?php echo esc_attr__('Awesome - 5 stars', 'wpdirectorykit');?>"></label>
49 <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star4" name="<?php echo esc_attr($field_id); ?>" value="4" <?php if((int)wmvc_show_data($field_id, $db_data)=='4') echo 'checked="checked"';?>/>
50 <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star4" title="<?php echo esc_attr__('Pretty good - 4 stars', 'wpdirectorykit');?>"></label>
51 <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star3" name="<?php echo esc_attr($field_id); ?>" value="3" <?php if((int)wmvc_show_data($field_id, $db_data)=='3') echo 'checked="checked"';?>/>
52 <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star3" title="<?php echo esc_attr__('Meh - 3 stars', 'wpdirectorykit');?>"></label>
53 <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star2" name="<?php echo esc_attr($field_id); ?>" value="2" <?php if((int)wmvc_show_data($field_id, $db_data)=='2') echo 'checked="checked"';?>/>
54 <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star2" title="<?php echo esc_attr__('Kinda bad - 2 stars', 'wpdirectorykit');?>"></label>
55 <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star1" name="<?php echo esc_attr($field_id); ?>" value="1" <?php if((int)wmvc_show_data($field_id, $db_data)=='1') echo 'checked="checked"';?>/>
56 <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star1" title="<?php echo esc_attr__('Very bad - 1 star', 'wpdirectorykit');?>"></label>
57 </fieldset>
58 <span class="suffix"><?php
59 // Dynamic field values are registered in the translation catalog separately.
60 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
61 echo esc_html__($field->prefix, 'wpdirectorykit');
62 if(!empty($field->prefix) && !empty($field->suffix)) echo ' / ';
63 // Dynamic field values are registered in the translation catalog separately.
64 // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
65 echo esc_html__($field->suffix, 'wpdirectorykit');
66 ?></span>
67 <?php if(!empty($field->hint)):?>
68 <p class="wdk-hint">
69 <?php echo esc_html($field->hint); ?>
70 </p>
71 <?php endif;?>
72 </div>
73 </div>