PluginProbe
Comments Extra Fields For Post,Pages and CPT / 4.6
Comments Extra Fields For Post,Pages and CPT v4.6
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.timezone.php

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

133 lines 4.9 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 Timezone input control and their
4 * dependencies. Do not make changes in code
5 * Create on: 9 November, 2013
6 */
7
8 class NM_Timezone_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 = __ ( 'Timezone Input', 'wp-comment-fields' );
25 $this -> desc = __ ( 'Show Timezone', 'wp-comment-fields' );
26 $this -> icon = __ ( '<i class="fa fa-clock-o" 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' => array (
55 'type' => 'text',
56 'title' => __ ( 'Selected option', 'wp-comment-fields' ),
57 'desc' => __ ( 'Type option name (given above) if you want already selected.', 'wp-comment-fields' ),
58 'col_classes' => array('col-md-3','col-sm-12')
59 ),
60 'first_option' => array (
61 'type' => 'text',
62 'title' => __ ( 'First option', 'wp-comment-fields' ),
63 'desc' => __ ( 'Just for info e.g: Select your option.', 'wp-comment-fields' ),
64 'col_classes' => array('col-md-3','col-sm-12')
65 ),
66 'regions' => array (
67 'type' => 'textarea',
68 'title' => __ ( 'Regions', 'wp-comment-fields' ),
69 'desc' => __ ( 'All,AFRICA, AMERICA, ANTARCTICA, ASIA, ATLANTIC, AUSTRALIA, EUROPE, INDIAN, PACIFIC', "wpcomment"),
70 'default' => 'All',
71 ),
72 'class' => array (
73 'type' => 'text',
74 'title' => __ ( 'Class', 'wp-comment-fields' ),
75 'desc' => __ ( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'wp-comment-fields' ),
76 'col_classes' => array('col-md-3','col-sm-12')
77 ),
78 'width' => array (
79 'type' => 'select',
80 'title' => __ ( 'Width', 'wp-comment-fields' ),
81 'desc' => __ ( 'Select width column', "wpcomment"),
82 'options' => wpcomment_get_input_cols(),
83 'default' => 12,
84 'col_classes' => array('col-md-3','col-sm-12')
85 ),
86 'visibility' => array (
87 'type' => 'select',
88 'title' => __ ( 'Visibility', 'wp-comment-fields' ),
89 'desc' => __ ( 'Set field visibility based on user.', "wpcomment"),
90 'options' => wpcomment_field_visibility_options(),
91 'default' => 'everyone',
92 'col_classes' => array('col-md-3','col-sm-12')
93 ),
94 'visibility_role' => array (
95 'type' => 'text',
96 'title' => __ ( 'User Roles', 'wp-comment-fields' ),
97 'desc' => __ ( 'Role separated by comma.', "wpcomment"),
98 'hidden' => true,
99 ),
100 'show_time' => array (
101 'type' => 'checkbox',
102 'title' => __ ( 'Show Local Time', 'wp-comment-fields' ),
103 'desc' => __ ( 'It will show current local time.', 'wp-comment-fields' ),
104 'col_classes' => array('col-md-3','col-sm-12')
105 ),
106 'desc_tooltip' => array (
107 'type' => 'checkbox',
108 'title' => __ ( 'Show tooltip (PRO)', 'wp-comment-fields' ),
109 'desc' => __ ( 'Show Description in Tooltip with Help Icon', 'wp-comment-fields' ),
110 'col_classes' => array('col-md-3','col-sm-12')
111 ),
112 'required' => array (
113 'type' => 'checkbox',
114 'title' => __ ( 'Required', 'wp-comment-fields' ),
115 'desc' => __ ( 'Select this if it must be required.', 'wp-comment-fields' ),
116 'col_classes' => array('col-md-3','col-sm-12')
117 ),
118 'logic' => array (
119 'type' => 'checkbox',
120 'title' => __ ( 'Enable Conditions', 'wp-comment-fields' ),
121 'desc' => __ ( 'Tick it to turn conditional logic to work below', 'wp-comment-fields' )
122 ),
123 'conditions' => array (
124 'type' => 'html-conditions',
125 'title' => __ ( 'Conditions', 'wp-comment-fields' ),
126 'desc' => __ ( 'Tick it to turn conditional logic to work below', 'wp-comment-fields' )
127 ),
128 );
129
130 $type = 'timezone';
131 return apply_filters("poom_{$type}_input_setting", $input_meta, $this);
132 }
133 }