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

input.divider.php in Comments Extra Fields For Post,Pages and CPT trunk, at classes/inputs/input.divider.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 text input control and their
4 * dependencies. Do not make changes in code
5 * Create on: 9 November, 2013
6 */
7
8 class NM_Divider_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 = __ ( 'Divider', 'wp-comment-fields' );
25 $this -> desc = __ ( 'regular didider input', 'wp-comment-fields' );
26 $this -> icon = __ ( '<i class="fa fa-pencil-square-o" aria-hidden="true"></i>', 'wp-comment-fields' );
27 $this -> settings = self::get_settings();
28
29 }
30
31 function wpcomment_divider_style(){
32
33 return array(
34 'style1' => __( 'Style 1', 'wp-comment-fields' ),
35 'style2' => __( 'Style 2', 'wp-comment-fields' ),
36 'style3' => __( 'Style 3', 'wp-comment-fields' ),
37 'style4' => __( 'Style 4', 'wp-comment-fields' ),
38 'style5' => __( 'Style 5', 'wp-comment-fields' ),
39 );
40 }
41
42 function border_style(){
43
44 return array(
45 'solid' => __( 'Solid', 'wp-comment-fields' ),
46 'dotted' => __( 'Dotted', 'wp-comment-fields' ),
47 'dashed' => __( 'Dashed', 'wp-comment-fields' ),
48 'double' => __( 'Double', 'wp-comment-fields' ),
49 'groove' => __( 'Groove', 'wp-comment-fields' ),
50 'ridge' => __( 'Ridge', 'wp-comment-fields' ),
51 'inset' => __( 'Inset', 'wp-comment-fields' ),
52 'outset' => __( 'Outset', 'wp-comment-fields' ),
53 );
54 }
55
56 private function get_settings(){
57
58 $input_meta = array (
59 'title' => array (
60 'type' => 'text',
61 'title' => __ ( 'Title', 'wp-comment-fields' ),
62 'desc' => __ ( 'It will be shown as field label', 'wp-comment-fields' )
63 ),
64 'data_name' => array (
65 'type' => 'text',
66 'title' => __ ( 'Data name', 'wp-comment-fields' ),
67 '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' )
68 ),
69 'divider_styles' => array (
70 'type' => 'select',
71 'title' => __ ( 'Select style', 'wp-comment-fields' ),
72 'desc' => __ ( 'Select style you want to render', "wpcomment"),
73 'options' => $this->wpcomment_divider_style(),
74 'col_classes' => array('col-md-3','col-sm-12')
75 ),
76 'style1_border' => array (
77 'type' => 'select',
78 'title' => __ ( 'Style border', 'wp-comment-fields' ),
79 'desc' => __ ( 'It will only apply on style 1.', "wpcomment"),
80 'options' => $this-> border_style(),
81 'col_classes' => array('col-md-3','col-sm-12')
82 ),
83 'divider_height' => array (
84 'type' => 'text',
85 'title' => __ ( 'Divider height', 'wp-comment-fields' ),
86 'desc' => __ ( 'Provide the divider height e.g: 3px.', 'wp-comment-fields' ),
87 'col_classes' => array('col-md-3','col-sm-12')
88 ),
89 'divider_txtsize' => array (
90 'type' => 'text',
91 'title' => __ ( 'Font size', 'wp-comment-fields' ),
92 'desc' => __ ( 'Provide divider text font size e.g: 18px', 'wp-comment-fields' ),
93 'col_classes' => array('col-md-3','col-sm-12')
94 ),
95 'divider_color' => array (
96 'type' => 'color',
97 'title' => __ ( 'Divider color', 'wp-comment-fields' ),
98 'desc' => __ ( 'Choose the divider color.', 'wp-comment-fields' ),
99 'col_classes' => array('col-md-3','col-sm-12')
100 ),
101 'divider_txtclr' => array (
102 'type' => 'color',
103 'title' => __ ( 'Divider text color', 'wp-comment-fields' ),
104 'desc' => __ ( 'Choose the divider text color.', 'wp-comment-fields' ),
105 'col_classes' => array('col-md-3','col-sm-12')
106 ),
107
108 );
109
110 $type = 'divider';
111 return apply_filters("poom_{$type}_input_setting", $input_meta, $this);
112 }
113 }