| 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 |
} |