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.section.php

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

102 lines 3.2 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 text input control and their
4 * dependencies. Do not make changes in code
5 * Create on: 9 November, 2013
6 */
7
8 class NM_Section_WPC extends WPComment_Inputs{
9
10 /*
11 * input control settings
12 */
13 var $title, $desc, $settings;
14
15
16 /*
17 * check if section is started
18 */
19 var $is_section_stared;
20 /*
21 * this var is pouplated with current plugin meta
22 */
23 var $plugin_meta;
24
25 function __construct(){
26
27 [];
28
29 $this -> title = __ ( 'HTML', 'wp-comment-fields' );
30 $this -> desc = __ ( 'HTML content', 'wp-comment-fields' );
31 $this -> icon = __ ( '<i class="fa fa-code" aria-hidden="true"></i>', 'wp-comment-fields' );
32 $this -> settings = self::get_settings();
33
34 }
35
36
37 private function get_settings(){
38
39 $input_meta = array (
40 'data_name' => array (
41 'type' => 'text',
42 'title' => __ ( 'Data name', 'wp-comment-fields' ),
43 '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' )
44 ),
45 'width' => array (
46 'type' => 'select',
47 'title' => __ ( 'Width', 'wp-comment-fields' ),
48 'desc' => __ ( 'Select width column.', "wpcomment"),
49 'options' => wpcomment_get_input_cols(),
50 'default' => 12,
51 ),
52 'description' => array (
53 'type' => 'textarea',
54 'title' => __ ( 'Description', 'wp-comment-fields' ),
55 'desc' => __ ( 'Small description, it will be display near name title.', 'wp-comment-fields' )
56 ),
57 'html' => array (
58 'type' => 'textarea',
59 'title' => __ ( 'Content', 'wp-comment-fields' ),
60 'desc' => __ ( 'Add your text/HTML here.', 'wp-comment-fields' )
61 ),
62 'visibility' => array (
63 'type' => 'select',
64 'title' => __ ( 'Visibility', 'wp-comment-fields' ),
65 'desc' => __ ( 'Set field visibility based on user.', "wpcomment"),
66 'options' => wpcomment_field_visibility_options(),
67 'default' => 'everyone',
68 ),
69 'visibility_role' => array (
70 'type' => 'text',
71 'title' => __ ( 'User Roles', 'wp-comment-fields' ),
72 'desc' => __ ( 'Role separated by comma.', "wpcomment"),
73 'hidden' => true,
74 ),
75 'desc_tooltip' => array (
76 'type' => 'checkbox',
77 'title' => __ ( 'Show tooltip (PRO)', 'wp-comment-fields' ),
78 'desc' => __ ( 'Show Description in Tooltip with Help Icon', 'wp-comment-fields' ),
79 'col_classes' => array('col-md-3','col-sm-12')
80 ),
81 'cart_display' => array (
82 'type' => 'checkbox',
83 'title' => __ ( 'Show in Cart', 'wp-comment-fields' ),
84 'desc' => __ ( 'Display Field Value in Cart', 'wp-comment-fields' ),
85 'col_classes' => array('col-md-3','col-sm-12')
86 ),
87 'logic' => array (
88 'type' => 'checkbox',
89 'title' => __ ( 'Enable Conditions', "wpcomment" ),
90 'desc' => __ ( 'Tick it to turn conditional logic to work below', "wpcomment" )
91 ),
92 'conditions' => array (
93 'type' => 'html-conditions',
94 'title' => __ ( 'Conditions', "wpcomment" ),
95 'desc' => __ ( 'Tick it to turn conditional logic to work below', "wpcomment" )
96 ),
97 );
98
99 $type = 'section';
100 return apply_filters("poom_{$type}_input_setting", $input_meta, $this);
101 }
102 }