PluginProbe
Comments Extra Fields For Post,Pages and CPT / 5.2
Comments Extra Fields For Post,Pages and CPT v5.2
trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 2.2 2.3 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 5.0 5.1 5.2
wp-comment-fields / classes / inputs / input.palettes.php

input.palettes.php in Comments Extra Fields For Post,Pages and CPT 5.2, at classes/inputs/input.palettes.php

155 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Followig class handling radio input control and their
4 * dependencies. Do not make changes in code
5 * Create on: 9 November, 2013
6 */
7
8 class NM_Palettes_WPC extends WPComment_Inputs{
9
10 /*
11 * input control settings
12 */
13 var $title, $desc, $settings;
14
15 /*
16 * this var is pouplated with current plugin meta
17 */
18 var $plugin_meta;
19
20 function __construct(){
21
22 [];
23
24 $this -> title = __ ( 'Color Palettes', 'wp-comment-fields' );
25 $this -> desc = __ ( 'color boxes', 'wp-comment-fields' );
26 $this -> icon = __ ( '<i class="fa fa-user-plus" aria-hidden="true"></i>', 'wp-comment-fields' );
27 $this -> settings = self::get_settings();
28
29 }
30
31 private function get_settings(){
32
33 $input_meta = array (
34 'title' => array (
35 'type' => 'text',
36 'title' => __ ( 'Title', 'wp-comment-fields' ),
37 'desc' => __ ( 'It will be shown as field label', 'wp-comment-fields' )
38 ),
39 'data_name' => array (
40 'type' => 'text',
41 'title' => __ ( 'Data name', 'wp-comment-fields' ),
42 'desc' => __ ( 'REQUIRED: The identification name of this field, that you can insert into body email configuration. Note:Use only lowercase characters and underscores.', 'wp-comment-fields' )
43 ),
44 'description' => array (
45 'type' => 'textarea',
46 'title' => __ ( 'Description', 'wp-comment-fields' ),
47 'desc' => __ ( 'Small description, it will be display near name title.', 'wp-comment-fields' )
48 ),
49 'error_message' => array (
50 'type' => 'text',
51 'title' => __ ( 'Error message', 'wp-comment-fields' ),
52 'desc' => __ ( 'Insert the error message for validation.', 'wp-comment-fields' )
53 ),
54 'selected_palette_bcolor' => array (
55 'type' => 'color',
56 'title' => __ ( 'Selected Border Color', 'wp-comment-fields' ),
57 'desc' => __ ( 'Change selected palette border color, e.g: #fff', 'wp-comment-fields' ),
58 'col_classes' => array('col-md-3','col-sm-12')
59 ),
60 'class' => array (
61 'type' => 'text',
62 'title' => __ ( 'Class', 'wp-comment-fields' ),
63 'desc' => __ ( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'wp-comment-fields' ),
64 'col_classes' => array('col-md-3','col-sm-12')
65 ),
66 'width' => array (
67 'type' => 'select',
68 'title' => __ ( 'Width', 'wp-comment-fields' ),
69 'desc' => __ ( 'Select width column.', "wpcomment"),
70 'options' => wpcomment_get_input_cols(),
71 'default' => 12,
72 'col_classes' => array('col-md-3','col-sm-12')
73 ),
74 'max_selected' => array (
75 'type' => 'number',
76 'title' => __ ( 'Max selected', 'wp-comment-fields' ),
77 'desc' => __ ( 'Max. selected, leave blank for default.', 'wp-comment-fields' ),
78 'col_classes' => array('col-md-3','col-sm-12')
79 ),
80 'options' => array (
81 'type' => 'paired-palettes',
82 'title' => __ ( 'Add colors', 'wp-comment-fields' ),
83 'desc' => __ ( 'Type color code with price (optionally). To write label, use #colorcode - White', 'wp-comment-fields' )
84 ),
85 'selected' => array (
86 'type' => 'text',
87 'title' => __ ( 'Selected color', 'wp-comment-fields' ),
88 'desc' => __ ( 'Type color code given in (Add Options) tab if you want already selected.', 'wp-comment-fields' ),
89 'col_classes' => array('col-md-3','col-sm-12')
90 ),
91 'color_width' => array (
92 'type' => 'text',
93 'title' => __ ( 'Color width', 'wp-comment-fields' ),
94 'desc' => __ ( 'default is 50, e.g: 75', 'wp-comment-fields' ),
95 'col_classes' => array('col-md-3','col-sm-12')
96 ),
97 'color_height' => array (
98 'type' => 'text',
99 'title' => __ ( 'Color height', 'wp-comment-fields' ),
100 'desc' => __ ( 'default is 50, e.g: 100', 'wp-comment-fields' ),
101 'col_classes' => array('col-md-3','col-sm-12')
102 ),
103 'visibility' => array (
104 'type' => 'select',
105 'title' => __ ( 'Visibility', 'wp-comment-fields' ),
106 'desc' => __ ( 'Set field visibility based on user.', "wpcomment"),
107 'options' => wpcomment_field_visibility_options(),
108 'default' => 'everyone',
109 ),
110 'visibility_role' => array (
111 'type' => 'text',
112 'title' => __ ( 'User Roles', 'wp-comment-fields' ),
113 'desc' => __ ( 'Role separated by comma.', "wpcomment"),
114 'hidden' => true,
115 ),
116 'multiple_allowed' => array (
117 'type' => 'checkbox',
118 'title' => __ ( 'Multiple selections?', 'wp-comment-fields' ),
119 'desc' => __ ( 'Allow users to select more then one palette?.', 'wp-comment-fields' ),
120 'col_classes' => array('col-md-3','col-sm-12')
121 ),
122 'circle' => array (
123 'type' => 'checkbox',
124 'title' => __ ( 'Show as Circle', 'wp-comment-fields' ),
125 'desc' => __ ( 'It will display color palettes as circle', 'wp-comment-fields' ),
126 'col_classes' => array('col-md-3','col-sm-12')
127 ),
128 'desc_tooltip' => array (
129 'type' => 'checkbox',
130 'title' => __ ( 'Show tooltip (PRO)', 'wp-comment-fields' ),
131 'desc' => __ ( 'Show Description in Tooltip with Help Icon', 'wp-comment-fields' ),
132 'col_classes' => array('col-md-3','col-sm-12')
133 ),
134 'required' => array (
135 'type' => 'checkbox',
136 'title' => __ ( 'Required', 'wp-comment-fields' ),
137 'desc' => __ ( 'Select this if it must be required.', 'wp-comment-fields' ),
138 'col_classes' => array('col-md-3','col-sm-12')
139 ),
140 'logic' => array (
141 'type' => 'checkbox',
142 'title' => __ ( 'Enable Conditions', 'wp-comment-fields' ),
143 'desc' => __ ( 'Tick it to turn conditional logic to work below', 'wp-comment-fields' )
144 ),
145 'conditions' => array (
146 'type' => 'html-conditions',
147 'title' => __ ( 'Conditions', 'wp-comment-fields' ),
148 'desc' => __ ( 'Tick it to turn conditional logic to work below', 'wp-comment-fields' )
149 ),
150 );
151
152 $type = 'palettes';
153 return apply_filters("poom_{$type}_input_setting", $input_meta, $this);
154 }
155 }