PluginProbe
Comments Extra Fields For Post,Pages and CPT / trunk
Comments Extra Fields For Post,Pages and CPT vtrunk
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.email.php

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

113 lines 3.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 email input control and their
4 * dependencies. Do not make changes in code
5 * Create on: 9 November, 2013
6 */
7
8 class NM_Email_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 = __ ( 'Email Input', "wpcomment" );
25 $this -> desc = __ ( 'regular email input', "wpcomment" );
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', "wpcomment" ),
37 'desc' => __ ( 'It will be shown as field label', "wpcomment" )
38 ),
39 'data_name' => array (
40 'type' => 'text',
41 'title' => __ ( 'Data name', "wpcomment" ),
42 'desc' => __ ( 'REQUIRED: The identification name of this field, that you can insert into body email configuration. Note:Use only lowercase characters and underscores.', "wpcomment" )
43 ),
44 'description' => array (
45 'type' => 'textarea',
46 'title' => __ ( 'Description', "wpcomment" ),
47 'desc' => __ ( 'Small description, it will be display near name title.', "wpcomment" )
48 ),
49 'placeholder' => array (
50 'type' => 'text',
51 'title' => __ ( 'Placeholder', 'wp-comment-fields' ),
52 'desc' => __ ( 'Optional.', 'wp-comment-fields' )
53 ),
54 'error_message' => array (
55 'type' => 'text',
56 'title' => __ ( 'Error message', "wpcomment" ),
57 'desc' => __ ( 'Insert the error message for validation.', "wpcomment" )
58 ),
59 'class' => array (
60 'type' => 'text',
61 'title' => __ ( 'Class', "wpcomment" ),
62 'desc' => __ ( 'Insert an additional class(es) (separateb by comma) for more personalization.', "wpcomment" ),
63 'col_classes' => array('col-md-3','col-sm-12')
64 ),
65 'width' => array (
66 'type' => 'select',
67 'title' => __ ( 'Width', 'wp-comment-fields' ),
68 'desc' => __ ( 'Select width column.', "wpcomment"),
69 'options' => wpcomment_get_input_cols(),
70 'default' => 12,
71 'col_classes' => array('col-md-3','col-sm-12')
72 ),
73 'visibility' => array (
74 'type' => 'select',
75 'title' => __ ( 'Visibility', 'wp-comment-fields' ),
76 'desc' => __ ( 'Set field visibility based on user.', "wpcomment"),
77 'options' => wpcomment_field_visibility_options(),
78 'default' => 'everyone',
79 ),
80 'visibility_role' => array (
81 'type' => 'text',
82 'title' => __ ( 'User Roles', 'wp-comment-fields' ),
83 'desc' => __ ( 'Role separated by comma.', "wpcomment"),
84 'hidden' => true,
85 ),
86 'desc_tooltip' => array (
87 'type' => 'checkbox',
88 'title' => __ ( 'Show tooltip (PRO)', 'wp-comment-fields' ),
89 'desc' => __ ( 'Show Description in Tooltip with Help Icon', 'wp-comment-fields' ),
90 'col_classes' => array('col-md-3','col-sm-12')
91 ),
92 'required' => array (
93 'type' => 'checkbox',
94 'title' => __ ( 'Required', "wpcomment" ),
95 'desc' => __ ( 'Select this if it must be required.', "wpcomment" ),
96 'col_classes' => array('col-md-3','col-sm-12')
97 ),
98 'logic' => array (
99 'type' => 'checkbox',
100 'title' => __ ( 'Enable Conditions', "wpcomment" ),
101 'desc' => __ ( 'Tick it to turn conditional logic to work below', "wpcomment" )
102 ),
103 'conditions' => array (
104 'type' => 'html-conditions',
105 'title' => __ ( 'Conditions', "wpcomment" ),
106 'desc' => __ ( 'Tick it to turn conditional logic to work below', "wpcomment" )
107 ),
108 );
109
110 $type = 'email';
111 return apply_filters("poom_{$type}_input_setting", $input_meta, $this);
112 }
113 }