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

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

120 lines 4.1 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 pre-uploaded image control and their
4 * dependencies. Do not make changes in code
5 * Create on: 9 November, 2013
6 */
7
8 class NM_Audio_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 = __ ( 'Audio / Video', "wpcomment" );
25 $this -> desc = __ ( 'Audio File Selection', "wpcomment" );
26 $this -> icon = __ ( '<i class="fa fa-file-video-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', "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 'error_message' => array (
50 'type' => 'text',
51 'title' => __ ( 'Error message', "wpcomment" ),
52 'desc' => __ ( 'Insert the error message for validation.', "wpcomment" )
53 ),
54 'class' => array (
55 'type' => 'text',
56 'title' => __ ( 'Class', "wpcomment" ),
57 'desc' => __ ( 'Insert an additional class(es) (separateb by comma) for more personalization.', "wpcomment" ),
58 'col_classes' => array('col-md-3','col-sm-12')
59 ),
60 'width' => array (
61 'type' => 'select',
62 'title' => __ ( 'Width', 'wp-comment-fields' ),
63 'desc' => __ ( 'Select width column.', "wpcomment"),
64 'options' => wpcomment_get_input_cols(),
65 'default' => 12,
66 'col_classes' => array('col-md-3','col-sm-12')
67 ),
68 'visibility' => array (
69 'type' => 'select',
70 'title' => __ ( 'Visibility', 'wp-comment-fields' ),
71 'desc' => __ ( 'Set field visibility based on user.', "wpcomment"),
72 'options' => wpcomment_field_visibility_options(),
73 'default' => 'everyone',
74 ),
75 'visibility_role' => array (
76 'type' => 'text',
77 'title' => __ ( 'User Roles', 'wp-comment-fields' ),
78 'desc' => __ ( 'Role separated by comma.', "wpcomment"),
79 'hidden' => true,
80 ),
81 'audio' => array (
82 'type' => 'pre-audios',
83 'title' => __ ( 'Select Audio/Video', "wpcomment" ),
84 'desc' => __ ( 'Select audio or video from media library', "wpcomment" ),
85 'col_classes' => array('col-md-3','col-sm-12')
86 ),
87 'desc_tooltip' => array (
88 'type' => 'checkbox',
89 'title' => __ ( 'Show tooltip (PRO)', 'wp-comment-fields' ),
90 'desc' => __ ( 'Show Description in Tooltip with Help Icon', 'wp-comment-fields' ),
91 'col_classes' => array('col-md-3','col-sm-12')
92 ),
93 'required' => array (
94 'type' => 'checkbox',
95 'title' => __ ( 'Required', "wpcomment" ),
96 'desc' => __ ( 'Select this if it must be required.', "wpcomment" ),
97 'col_classes' => array('col-md-3','col-sm-12')
98 ),
99 'multiple_allowed' => array (
100 'type' => 'checkbox',
101 'title' => __ ( 'Multiple selection?', "wpcomment" ),
102 'desc' => __ ( 'Allow users to select more then one videos or audios?.', "wpcomment" ),
103 'col_classes' => array('col-md-3','col-sm-12')
104 ),
105 'logic' => array (
106 'type' => 'checkbox',
107 'title' => __ ( 'Enable Conditions', "wpcomment" ),
108 'desc' => __ ( 'Tick it to turn conditional logic to work below', "wpcomment" )
109 ),
110 'conditions' => array (
111 'type' => 'html-conditions',
112 'title' => __ ( 'Conditions', "wpcomment" ),
113 'desc' => __ ( 'Tick it to turn conditional logic to work below', "wpcomment" )
114 ),
115 );
116
117 $type = 'audio';
118 return apply_filters("poom_{$type}_input_setting", $input_meta, $this);
119 }
120 }