PluginProbe
Team Showcase / 1.16
Team Showcase v1.16
trunk 1.0 1.1 1.11 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.22.0 1.22.1 1.22.10 1.22.12 1.22.13 1.22.14 All 49 releases
team / includes / menu / settings.php

settings.php in Team Showcase 1.16, at includes/menu/settings.php

354 lines 13.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * @Author ParaTheme
5 * Copyright: 2015 ParaTheme
6 */
7
8 if ( ! defined('ABSPATH')) exit; // if direct access
9
10
11
12 if(empty($_POST['team_hidden'])){
13 $team_member_slug = get_option( 'team_member_slug' );
14 $team_member_meta_fields = get_option( 'team_member_meta_fields' );
15 $team_member_social_field = get_option( 'team_member_social_field' );
16
17 }
18 else{
19 if($_POST['team_hidden'] == 'Y') {
20 //Form data sent
21
22 $team_member_slug = sanitize_text_field($_POST['team_member_slug']);
23 update_option('team_member_slug', $team_member_slug);
24
25 if(empty($_POST['team_member_meta_fields'])){
26
27 $_POST['team_member_meta_fields'] = array();
28 }
29 $team_member_meta_fields = stripslashes_deep($_POST['team_member_meta_fields']);
30 update_option('team_member_meta_fields', $team_member_meta_fields);
31
32 $team_member_social_field = stripslashes_deep($_POST['team_member_social_field']);
33 update_option('team_member_social_field', $team_member_social_field);
34
35 ?>
36 <div class="updated"><p><strong><?php _e('Changes Saved.', 'team' ); ?></strong></p></div>
37
38 <?php
39 }
40 }
41
42
43
44
45 $class_team_functions = new class_team_functions();
46 $default_social_field = $class_team_functions->team_member_social_field();
47
48 ?>
49
50
51 <div class="wrap">
52
53 <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__(team_plugin_name.' Settings', 'team')."</h2>";?>
54 <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
55 <input type="hidden" name="team_hidden" value="Y">
56 <?php settings_fields( 'team_plugin_options' );
57 do_settings_sections( 'team_plugin_options' );
58
59 ?>
60
61 <div class="para-settings team-settings">
62
63 <ul class="tab-nav">
64 <li nav="1" class="nav1 active"><i class="fa fa-cogs"></i> Options</li>
65 <li nav="2" class="nav2"><i class="fa fa-hand-o-right"></i> Help & Support</li>
66 </ul> <!-- tab-nav end -->
67 <ul class="box">
68 <li style="display: block;" class="box1 tab-box active">
69
70 <div class="option-box">
71 <p class="option-title"><?php _e('Team member slug.','team'); ?></p>
72 <p class="option-info"><?php _e('ex: volunteers','team'); ?></p>
73 <input type="text" size="30" placeholder="team_member_slug" name="team_member_slug" value="<?php if(!empty($team_member_slug)) echo $team_member_slug; ?>" />
74
75 </div>
76 <div class="option-box">
77 <p class="option-title"><?php _e('Custom meta fields on team member profile.','team'); ?></p>
78 <p class="option-info"><?php _e('','team'); ?></p>
79
80
81
82 <div class="">
83 <table class="widefat team-member-meta-fields">
84 <thead>
85 <tr>
86 <th>Sorting</th>
87 <th>Meta Name</th>
88 <th >Meta Key<br/><i style="font-size:10px;">Must be unique, no blank space, can use (_)underscore</i></th>
89 <th>Remove</th>
90 </tr>
91 </thead>
92 <tbody>
93
94 <?php
95
96 if(empty($team_member_meta_fields)){
97
98 $team_member_meta_fields = array(
99 //'address' => array('name'=>'Address','meta_key'=>'team_address'),
100 //'mobile' => array('name'=>'Mobile','meta_key'=>'team_mobile'),
101 );
102
103 }
104 //var_dump($team_member_skill);
105
106 foreach ($team_member_meta_fields as $meta_key=>$meta_info) {
107
108 ?>
109 <tr>
110 <td class="sorting"></td>
111 <td>
112
113 <?php //var_dump($skill_info); ?>
114
115 <input type="text" size="30" placeholder="Meta Name" name="team_member_meta_fields[<?php echo $meta_key; ?>][name]" value="<?php if(!empty($team_member_meta_fields[$meta_key]['name'])) echo $team_member_meta_fields[$meta_key]['name']; ?>" />
116
117 </td>
118 <td>
119 <input type="text" size="30" placeholder="meta_key" name="team_member_meta_fields[<?php echo $meta_key; ?>][meta_key]" value="<?php if(!empty($team_member_meta_fields[$meta_key]['meta_key'])) echo $team_member_meta_fields[$meta_key]['meta_key']; ?>" />
120 </td>
121
122 <td>
123 <span class="remove-meta">X</span>
124 </td>
125 </tr>
126 <?php
127 }
128 ?>
129 </tbody>
130 </table>
131
132 <div class="button add_team_member_meta">Add new</div>
133 </div>
134
135
136 <script>
137 jQuery(document).ready(function($)
138 {
139 $(function() {
140 $( ".team-member-meta-fields tbody" ).sortable();
141 //$( ".items" ).disableSelection();
142 });
143
144 })
145
146 </script>
147
148
149
150 </div>
151
152
153
154
155
156
157 <div class="option-box">
158 <p class="option-title"><?php _e('Display social field on team member profile.','team'); ?></p>
159 <p class="option-info"><?php _e('By adding bellow input you can control extra input field under member page. if you want to remove one profile field then please empty this field and save changes or to add new profile field simply click add new. some default profile fields are mobile, website, email, skype, facebook, twitter, googleplus, pinterest.','team'); ?></p>
160
161 <div class="button reset_team_member_social_field">Reset</div>
162 <table class="team_member_social_field widefat " id="team_member_social_field">
163 <thead><tr><th>Sort</th><th>Meta name</th><th>Meta key</th><th>Icon</th><th>Visibility</th><th>Remove</th>
164
165 </tr>
166 </thead>
167 <?php
168
169
170 if(empty($team_member_social_field)){
171 $team_member_social_field = $default_social_field;
172 }
173
174 foreach ($team_member_social_field as $field_key=>$field_info) {
175 if(!empty($field_key))
176 {
177 ?>
178 <tr><td class="sorting"></td>
179 <td>
180
181 <input name="team_member_social_field[<?php echo $field_key; ?>][name]" type="text" value="<?php if(isset($team_member_social_field[$field_key]['name'])) echo $team_member_social_field[$field_key]['name']; ?>" />
182 </td>
183
184 <td>
185
186 <input name="team_member_social_field[<?php echo $field_key; ?>][meta_key]" type="text" value="<?php if(isset($team_member_social_field[$field_key]['meta_key'])) echo $team_member_social_field[$field_key]['meta_key']; ?>" />
187
188
189 </td>
190
191 <td>
192 <span style=" <?php if(!empty($team_member_social_field[$field_key]['icon'])) echo 'background:url('.$team_member_social_field[$field_key]['icon'].') no-repeat scroll 0 0 rgba(0, 0, 0, 0);'; ?>" title="Icon for this field." class="team_member_social_icon <?php if(empty($team_member_social_field[$field_key]['icon'])) echo 'empty_icon';?>" icon-name="<?php echo $field_key; ?>"> </span>
193
194 <input class="team_member_social_icon team_member_social_icon_<?php echo $field_key; ?>" name="team_member_social_field[<?php echo $field_key; ?>][icon]" type="hidden" value="<?php if(isset($team_member_social_field[$field_key]['icon'])) echo $team_member_social_field[$field_key]['icon']; ?>" />
195
196
197 </td>
198 <td>
199
200 <?php if(isset($team_member_social_field[$field_key]['visibility'])) $checked = 'checked'; else $checked = ''; ?>
201
202
203 <input <?php echo $checked; ?> name="team_member_social_field[<?php echo $field_key; ?>][visibility]" type="checkbox" value="1" />
204
205 </td>
206 <td>
207
208 <?php
209 if($field_info['can_remove']=='yes'){
210 ?>
211
212 <span class="remove_icon">X</span>
213
214 <?php
215 }
216 else{
217 echo '<span title="Can\'t remove.">...</span>';
218
219 }
220
221 ?>
222
223 <input name="team_member_social_field[<?php echo $field_key; ?>][can_remove]" type="hidden" value="<?php echo $field_info['can_remove']; ?>" />
224
225
226 </td>
227
228
229 </tr>
230 <?php
231
232
233
234 }
235 }
236
237 ?>
238
239
240 </table>
241
242
243
244
245
246 <script>
247 jQuery(document).ready(function($)
248 {
249 $(function() {
250 $( "#team_member_social_field tbody" ).sortable();
251 //$( ".items" ).disableSelection();
252 });
253
254 })
255
256 </script>
257
258
259
260
261 <div class="button new_team_member_social_field"><?php _e('Add New','team'); ?></div>
262
263 </div>
264
265
266 </li>
267
268 <li style="display: none;" class="box2 tab-box">
269
270 <div class="option-box">
271 <p class="option-title">Plugin info ?</p>
272 <p class="option-info">
273 <?php
274
275 if(team_customer_type=="free")
276 {
277
278 echo 'You are using <strong> '.team_customer_type.' version '.team_plugin_version.'</strong> of <strong>'.team_plugin_name.'</strong>, To get more feature you could try our premium version. ';
279 echo '<br /><a href="'.team_pro_url.'">'.team_pro_url.'</a>';
280
281 }
282 else
283 {
284
285 echo 'Thanks for using <strong> premium version '.team_plugin_version.'</strong> of <strong>'.team_plugin_name.'</strong> ';
286
287
288 }
289
290 ?>
291
292
293 </p>
294
295 </div>
296
297 <div class="option-box">
298 <p class="option-title">Need Help ?</p>
299 <p class="option-info">Feel free to contact with any issue for this plugin, Ask any question via forum <a href="<?php echo team_qa_url; ?>"><?php echo team_qa_url; ?></a> <strong style="color:#139b50;">(free)</strong><br /> please read <strong>documentation</strong> here <a href="<?php echo team_tutorial_doc_url; ?>"><?php echo team_tutorial_doc_url; ?></a>
300
301 </p>
302
303 </div>
304
305 <div class="option-box">
306 <p class="option-title">Submit Reviews...</p>
307 <p class="option-info">We are working hard to build some awesome plugins for you and spend thousand hour for plugins. we wish your three(3) minute by submitting five star reviews at wordpress.org. if you have any issue please submit at forum.</p>
308 <img class="team-pro-pricing" src="<?php echo team_plugin_url."css/five-star.png";?>" /><br />
309 <a target="_blank" href="<?php echo team_wp_reviews; ?>">
310 <?php echo team_wp_reviews; ?>
311 </a>
312
313 </div>
314
315 <div class="option-box">
316 <p class="option-title">Please Share</p>
317 <p class="option-info">If you like this plugin please share with your social share network.</p>
318 <?php
319 $class_team_functions = new class_team_functions();
320 echo $class_team_functions->team_share_plugin();
321 ?>
322 </div>
323
324 <div class="option-box">
325 <p class="option-title">Video Tutorial</p>
326 <p class="option-info">Please watch this video tutorial.</p>
327 <iframe width="640" height="480" src="<?php echo team_tutorial_video_url; ?>" frameborder="0" allowfullscreen></iframe>
328 </div>
329
330
331
332
333 </li>
334 </ul>
335
336
337
338
339
340 </div>
341
342
343
344
345
346
347 <p class="submit">
348 <input class="button button-primary" type="submit" name="Submit" value="<?php _e('Save Changes','team' ); ?>" />
349 </p>
350 </form>
351
352
353 </div>
354