PluginProbe
Team Showcase / 1.13
Team Showcase v1.13
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 / class-post-meta.php

class-post-meta.php in Team Showcase 1.13, at includes/class-post-meta.php

1,433 lines 63.0 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 class team_class_post_meta{
11
12
13 public function __construct(){
14
15
16 add_action('add_meta_boxes', array($this, 'meta_boxes_team_member_meta_fileds'));
17 add_action('save_post', array($this, 'meta_boxes_team_member_save_meta_fileds'));
18
19 //meta box action for "team_member"
20 add_action('add_meta_boxes', array($this, 'meta_boxes_team_member_social'));
21 add_action('save_post', array($this, 'meta_boxes_team_member_social_save'));
22
23
24
25 //meta box action for "team"
26 add_action('add_meta_boxes', array($this, 'meta_boxes_team'));
27 add_action('save_post', array($this, 'meta_boxes_team_save'));
28
29
30 }
31
32
33
34 public function meta_boxes_team_member_meta_fileds($post_type) {
35 $post_types = array('team_member');
36
37 //limit meta box to certain post types
38 if (in_array($post_type, $post_types)) {
39 add_meta_box('team_member_metabox_meta_fileds',
40 'Team Member Meta Fields',
41 array($this, 'team_member_meta_box_function_meta_fileds'),
42 $post_type,
43 'normal',
44 'high');
45 }
46 }
47
48
49 public function team_member_meta_box_function_meta_fileds($post) {
50
51 // Add an nonce field so we can check for it later.
52 wp_nonce_field('team_member_nonce_check', 'team_member_nonce_check_value');
53
54 // Use get_post_meta to retrieve an existing value from the database.
55 $team_member_position = get_post_meta($post -> ID, 'team_member_position', true);
56 $team_member_link_to_post = get_post_meta($post -> ID, 'team_member_link_to_post', true);
57
58
59
60
61 $team_member_meta_fields = get_option('team_member_meta_fields');
62
63 if(empty($team_member_meta_fields)){
64 $team_member_meta_fields = array(
65 'address' => array('name'=>'Address','meta_key'=>'team_address'),
66 //'mobile' => array('name'=>'Mobile','meta_key'=>'team_mobile'),
67 );
68
69 }
70
71 foreach($team_member_meta_fields as $meta_key=>$meta_info){
72
73 ${$meta_info['meta_key']} = get_post_meta($post -> ID, $meta_info['meta_key'], true);
74
75 }
76
77
78 // Display the form, using the current value.
79
80 echo '<div class="para-settings">';
81 echo '<div class="option-box">';
82 echo '<p class="option-title">'.__('Member Position','team').'</p>';
83 echo '<p class="option-info"></p>';
84
85
86
87 echo '<input type="text" size="30" placeholder="Team Leader" name="team_member_position" value="';
88 if(!empty($team_member_position))
89 echo $team_member_position;
90 echo '" />';
91 echo '</div>';
92
93
94
95 echo '<div class="option-box">';
96 echo '<p class="option-title">'.__('Custom link to this member.','team').'</p>';
97 echo '<p class="option-info"></p>';
98
99 echo '<input type="text" size="30" placeholder="http://hello.com/project-sample" name="team_member_link_to_post" value="';
100 if(!empty($team_member_link_to_post))
101 echo $team_member_link_to_post;
102 echo '" />';
103 echo '</div>';
104
105 ?>
106
107
108 <?php
109
110 foreach($team_member_meta_fields as $meta_key=>$meta_info){
111
112
113
114 ?>
115 <div class="option-box">
116 <p class="option-title"><?php echo ucfirst($meta_info['name']); ?></p>
117 <p class="option-info"></p>
118 <input type="text" size="30" placeholder="" name="<?php echo $meta_info['meta_key']; ?>" value="<?php if(!empty(${$meta_info['meta_key']})) echo ${$meta_info['meta_key']}; ?>" />
119 </div>
120 <?php
121
122 }
123
124
125
126 ?>
127
128
129
130
131
132
133
134
135
136
137 </div> <!-- // end of para-settings -->
138
139
140 <?php
141
142 }
143
144
145
146
147
148 public function meta_boxes_team_member_save_meta_fileds($post_id) {
149
150 /*
151 * We need to verify this came from the our screen and with
152 * proper authorization,
153 * because save_post can be triggered at other times.
154 */
155
156 // Check if our nonce is set.
157 if (!isset($_POST['team_member_nonce_check_value']))
158 return $post_id;
159
160 $nonce = $_POST['team_member_nonce_check_value'];
161
162 // Verify that the nonce is valid.
163 if (!wp_verify_nonce($nonce, 'team_member_nonce_check'))
164 return $post_id;
165
166 // If this is an autosave, our form has not been submitted,
167 // so we don't want to do anything.
168 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
169 return $post_id;
170
171 // Check the user's permissions.
172 if ('page' == $_POST['post_type']) {
173
174 if (!current_user_can('edit_page', $post_id))
175 return $post_id;
176
177 } else {
178
179 if (!current_user_can('edit_post', $post_id))
180 return $post_id;
181 }
182
183 /* OK, its safe for us to save the data now. */
184
185 // Sanitize the user input.
186 $team_member_position = sanitize_text_field($_POST['team_member_position']);
187 $team_member_link_to_post = sanitize_text_field($_POST['team_member_link_to_post']);
188
189
190 // Update the meta field.
191 update_post_meta($post_id, 'team_member_position', $team_member_position);
192 update_post_meta($post_id, 'team_member_link_to_post', $team_member_link_to_post);
193
194
195 $team_member_meta_fields = get_option('team_member_meta_fields');
196
197 if(empty($team_member_meta_fields)){
198 $team_member_meta_fields = array(
199 'address' => array('name'=>'Address','meta_key'=>'team_address'),
200 //'mobile' => array('name'=>'Mobile','meta_key'=>'team_mobile'),
201 );
202
203 }
204
205 foreach($team_member_meta_fields as $meta_key=>$meta_info){
206
207 $meta_key = $meta_info['meta_key'];
208
209 $meta_key_value = sanitize_text_field($_POST[$meta_key]);
210 update_post_meta($post_id, $meta_key, $meta_key_value);
211
212 }
213
214
215
216
217
218
219 }
220
221
222
223
224
225
226
227
228
229
230 public function meta_boxes_team_member_social($post_type) {
231 $post_types = array('team_member');
232
233 //limit meta box to certain post types
234 if (in_array($post_type, $post_types)) {
235 add_meta_box('team_member_metabox',
236 'Team Member Social Info',
237 array($this, 'team_member_social_meta_box_function'),
238 $post_type,
239 'normal',
240 'high');
241 }
242 }
243
244
245 public function team_member_social_meta_box_function($post) {
246
247 // Add an nonce field so we can check for it later.
248 wp_nonce_field('team_member_nonce_check', 'team_member_nonce_check_value');
249
250 // Use get_post_meta to retrieve an existing value from the database.
251 $team_member_social_links = get_post_meta($post -> ID, 'team_member_social_links', true);
252
253 $team_member_social_field = get_option( 'team_member_social_field' );
254
255 //var_dump($team_member_social_field);
256
257 if(empty($team_member_social_field))
258 {
259 $class_team_functions = new class_team_functions();
260 $default_social_field = $class_team_functions->team_member_social_field();
261
262 }
263
264 // Display the form, using the current value.
265
266 echo '<div class="para-settings">';
267
268 foreach ($team_member_social_field as $field_key=>$field_info) {
269 if(!empty($field_key))
270 {
271 if($field_key == 'skype')
272 {
273 ?>
274
275 <div class="option-box">
276 <p class="option-title"><?php _e(' Member Skype.','team'); ?></p>
277 <p class="option-info"></p>
278 <input type="text" size="30" placeholder="skypeusername" name="team_member_social_links[<?php echo $field_key; ?>]" value="<?php if(!empty($team_member_social_links[$field_key])) echo $team_member_social_links[$field_key]; ?>" />
279 </div>
280
281 <?php
282 }
283
284 else if($field_key == 'mobile')
285 {
286 ?>
287
288 <div class="option-box">
289 <p class="option-title"><?php _e(' Member Mobile .','team'); ?></p>
290 <p class="option-info"></p>
291 <input type="text" size="30" placeholder="+01895632456" name="team_member_social_links[<?php echo $field_key; ?>]" value="<?php if(!empty($team_member_social_links[$field_key])) echo $team_member_social_links[$field_key]; ?>" />
292 </div>
293
294 <?php
295 }
296
297 else if($field_key == 'phone')
298 {
299 ?>
300
301 <div class="option-box">
302 <p class="option-title"><?php _e(' Member Telephone .','team'); ?></p>
303 <p class="option-info"></p>
304 <input type="text" size="30" placeholder="+01895632456" name="team_member_social_links[<?php echo $field_key; ?>]" value="<?php if(!empty($team_member_social_links[$field_key])) echo $team_member_social_links[$field_key]; ?>" />
305 </div>
306
307 <?php
308 }
309
310 else if($field_key == 'email')
311 {
312 ?>
313
314 <div class="option-box">
315 <p class="option-title"><?php _e(' Member Email.','team'); ?></p>
316 <p class="option-info"></p>
317 <input type="text" size="30" placeholder="hello@exapmle.com" name="team_member_social_links[<?php echo $field_key; ?>]" value="<?php if(!empty($team_member_social_links[$field_key])) echo $team_member_social_links[$field_key]; ?>" />
318 </div>
319
320 <?php
321 }
322 else if($field_key == 'website')
323 {
324 ?>
325
326 <div class="option-box">
327 <p class="option-title"><?php _e(' Member Website.','team'); ?></p>
328 <p class="option-info"></p>
329 <input type="text" size="30" placeholder="http://exapmle.com" name="team_member_social_links[<?php echo $field_key; ?>]" value="<?php if(!empty($team_member_social_links[$field_key])) echo $team_member_social_links[$field_key]; ?>" />
330 </div>
331
332 <?php
333 }
334 else
335 {
336 ?>
337
338 <div class="option-box">
339 <p class="option-title"><?php echo ucfirst($field_info['name']); ?></p>
340 <p class="option-info"></p>
341 <input type="text" size="30" placeholder="http://exapmle.com/username" name="team_member_social_links[<?php echo $field_key; ?>]" value="<?php if(!empty($team_member_social_links[$field_key])) echo $team_member_social_links[$field_key]; ?>" />
342 </div>
343
344 <?php
345 }
346
347 }
348 }
349
350
351
352 echo '</div>'; // end of para-settings
353
354 }
355
356
357
358
359 public function meta_boxes_team_member_social_save($post_id) {
360
361 /*
362 * We need to verify this came from the our screen and with
363 * proper authorization,
364 * because save_post can be triggered at other times.
365 */
366
367 // Check if our nonce is set.
368 if (!isset($_POST['team_member_nonce_check_value']))
369 return $post_id;
370
371 $nonce = $_POST['team_member_nonce_check_value'];
372
373 // Verify that the nonce is valid.
374 if (!wp_verify_nonce($nonce, 'team_member_nonce_check'))
375 return $post_id;
376
377 // If this is an autosave, our form has not been submitted,
378 // so we don't want to do anything.
379 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
380 return $post_id;
381
382 // Check the user's permissions.
383 if ('page' == $_POST['post_type']) {
384
385 if (!current_user_can('edit_page', $post_id))
386 return $post_id;
387
388 } else {
389
390 if (!current_user_can('edit_post', $post_id))
391 return $post_id;
392 }
393
394 /* OK, its safe for us to save the data now. */
395
396 // Sanitize the user input.
397 $team_member_social_links = stripslashes_deep($_POST['team_member_social_links']);
398
399 // Update the meta field.
400
401 update_post_meta($post_id, 'team_member_social_links', $team_member_social_links);
402
403 }
404
405
406
407
408
409
410 /*
411 Team Post
412 */
413
414
415 public function meta_boxes_team($post_type) {
416 $post_types = array('team');
417
418 //limit meta box to certain post types
419 if (in_array($post_type, $post_types)) {
420 add_meta_box('team_metabox',
421 'Team Options',
422 array($this, 'team_meta_box_function'),
423 $post_type,
424 'normal',
425 'high');
426 }
427 }
428 public function team_meta_box_function($post) {
429
430 // Add an nonce field so we can check for it later.
431 wp_nonce_field('team_nonce_check', 'team_nonce_check_value');
432
433 // Use get_post_meta to retrieve an existing value from the database.
434 $team_bg_img = get_post_meta( $post->ID, 'team_bg_img', true );
435 $team_container_bg_color = get_post_meta( $post->ID, 'team_container_bg_color', true );
436
437 $team_themes = get_post_meta( $post->ID, 'team_themes', true );
438 $team_social_icon_style = get_post_meta( $post->ID, 'team_social_icon_style', true );
439 $team_masonry_enable = get_post_meta( $post->ID, 'team_masonry_enable', true );
440
441 $team_grid_item_align = get_post_meta( $post->ID, 'team_grid_item_align', true );
442 $team_item_text_align = get_post_meta( $post->ID, 'team_item_text_align', true );
443 $team_total_items = get_post_meta( $post->ID, 'team_total_items', true );
444 $team_pagination_display = get_post_meta( $post->ID, 'team_pagination_display', true );
445
446 $team_query_order = get_post_meta( $post->ID, 'team_query_order', true );
447 $team_query_orderby = get_post_meta( $post->ID, 'team_query_orderby', true );
448
449
450 $team_content_source = get_post_meta( $post->ID, 'team_content_source', true );
451
452 if(empty($team_content_source))
453 {
454 $team_content_source = 'latest';
455 }
456
457
458 $team_content_year = get_post_meta( $post->ID, 'team_content_year', true );
459 $team_content_month = get_post_meta( $post->ID, 'team_content_month', true );
460 $team_content_month_year = get_post_meta( $post->ID, 'team_content_month_year', true );
461
462
463 $team_taxonomy_terms = get_post_meta( $post->ID, 'team_taxonomy_terms', true );
464
465 $team_post_ids = get_post_meta( $post->ID, 'team_post_ids', true );
466
467
468
469
470 $team_items_title_color = get_post_meta( $post->ID, 'team_items_title_color', true );
471 $team_items_title_font_size = get_post_meta( $post->ID, 'team_items_title_font_size', true );
472
473 $team_items_position_color = get_post_meta( $post->ID, 'team_items_position_color', true );
474 $team_items_position_font_size = get_post_meta( $post->ID, 'team_items_position_font_size', true );
475
476 $team_pagination_bg_color = get_post_meta( $post->ID, 'team_pagination_bg_color', true );
477 $team_pagination_active_bg_color = get_post_meta( $post->ID, 'team_pagination_active_bg_color', true );
478
479
480 $team_items_content = get_post_meta( $post->ID, 'team_items_content', true );
481 if(empty($team_items_content))
482 {
483 $team_items_content = 'excerpt';
484 }
485
486 $team_items_content_color = get_post_meta( $post->ID, 'team_items_content_color', true );
487 $team_items_content_font_size = get_post_meta( $post->ID, 'team_items_content_font_size', true );
488
489 $team_items_excerpt_count = get_post_meta( $post->ID, 'team_items_excerpt_count', true );
490 $team_items_excerpt_text = get_post_meta( $post->ID, 'team_items_excerpt_text', true );
491
492 $team_items_thumb_size = get_post_meta( $post->ID, 'team_items_thumb_size', true );
493 $team_items_link_to_post = get_post_meta( $post->ID, 'team_items_link_to_post', true );
494 $team_items_max_width = get_post_meta( $post->ID, 'team_items_max_width', true );
495 $team_items_width_mobile = get_post_meta( $post->ID, 'team_items_width_mobile', true );
496 $team_items_width_tablet = get_post_meta( $post->ID, 'team_items_width_tablet', true );
497
498 $team_items_thumb_max_hieght = get_post_meta( $post->ID, 'team_items_thumb_max_hieght', true );
499
500 $team_items_margin = get_post_meta( $post->ID, 'team_items_margin', true );
501 $team_items_social_icon_width = get_post_meta( $post->ID, 'team_items_social_icon_width', true );
502 $team_items_social_icon_height = get_post_meta( $post->ID, 'team_items_social_icon_height', true );
503
504 $team_items_custom_css = get_post_meta( $post->ID, 'team_items_custom_css', true );
505
506 $team_items_popup_content = get_post_meta( $post->ID, 'team_items_popup_content', true );
507
508 $team_items_popup_excerpt_count = get_post_meta( $post->ID, 'team_items_popup_excerpt_count', true );
509 $team_items_popup_excerpt_text = get_post_meta( $post->ID, 'team_items_popup_excerpt_text', true );
510 $team_items_popup_width = get_post_meta( $post->ID, 'team_items_popup_width', true );
511 $team_items_popup_height = get_post_meta( $post->ID, 'team_items_popup_height', true );
512
513 if(empty($team_items_popup_content))
514 {
515 $team_items_popup_content = 'full';
516 }
517
518
519
520
521 $team_grid_items = get_post_meta( $post->ID, 'team_grid_items', true );
522 $team_grid_items_hide = get_post_meta( $post->ID, 'team_grid_items_hide', true );
523 $team_grid_meta_keys = get_post_meta( $post->ID, 'team_grid_meta_keys', true );
524
525 $team_items_skill_bg_color = get_post_meta( $post->ID, 'team_items_skill_bg_color', true );
526
527
528
529
530
531
532
533
534
535 // Display the form, using the current value.
536 $class_team_functions = new class_team_functions();
537
538 $team_id = $post->ID;
539
540 ?>
541
542
543 <div class="para-settings">
544 <ul class="tab-nav">
545 <li nav="1" class="nav1 active"><i class="fa fa-code"></i> <?php _e('Shortcode','team'); ?></li>
546 <li nav="2" class="nav2"><i class="fa fa-cogs"></i> <?php _e('Options','team'); ?></li>
547 <li nav="3" class="nav3"><i class="fa fa-diamond"></i> <?php _e('Style','team'); ?></li>
548 <li nav="4" class="nav4"><i class="fa fa-users"></i> <?php _e('Query Member','team'); ?></li>
549 <li nav="5" class="nav5"><i class="fa fa-bug"></i> <?php _e('Custom CSS','team'); ?></li>
550 <li nav="7" class="nav6"><i class="fa fa-qrcode"></i> <?php _e('Layout Builder','team'); ?></li>
551
552 </ul> <!-- tab-nav end -->
553 <ul class="box">
554
555 <li style="display: block;" class="box1 tab-box active">
556
557 <div class="option-box">
558 <p class="option-title"><?php _e('Shortcode.','team'); ?></p>
559 <p class="option-info"><?php _e('Copy this shortcode and paste on page or post where you want to display Team. <br />Use PHP code to your themes file to display Team.','team'); ?></p>
560 <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" >[team <?php echo 'id="'.$post->ID.'"';?>]</textarea><br />
561 <textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" ><?php echo '<?php echo do_shortcode("[team id='; echo "'".$post->ID."']"; echo '"); ?>'; ?></textarea>
562
563 </div>
564
565 </li>
566
567
568 <li style="display: none;" class="box2 tab-box">
569 <div class="option-box">
570 <p class="option-title"><?php _e('Total number of members on each page(pagination).','team'); ?></p>
571 <p class="option-info"><?php _e('You can display pagination or Total number of member on grid.','team'); ?></p>
572 <input type="text" placeholder="ex:5 - Number Only" name="team_total_items" value="<?php if(!empty($team_total_items))echo $team_total_items; else echo 5; ?>" />
573 </div>
574
575
576 <div class="option-box">
577 <p class="option-title">Display Pagination</p>
578 <p class="option-info"></p>
579
580 <select name="team_pagination_display" >
581 <option value="no" <?php if($team_pagination_display=="no")echo "selected"; ?>>No</option>
582 <option value="yes" <?php if($team_pagination_display=="yes")echo "selected"; ?>>Yes</option>
583
584 </select>
585
586 </div>
587
588
589
590
591
592
593
594 <div class="option-box">
595 <p class="option-title"><?php _e('Link to Member.','team'); ?></p>
596 <p class="option-info"><?php _e('Clickable link to post team member.','team'); ?></p>
597 <select name="team_items_link_to_post" >
598 <option value="no" <?php if($team_items_link_to_post=="no")echo "selected"; ?>>No</option>
599 <option value="yes" <?php if($team_items_link_to_post=="yes")echo "selected"; ?>>Custom Post</option>
600 <option value="custom" <?php if($team_items_link_to_post=="custom")echo "selected"; ?>>Custom Link</option>
601 </select>
602 </div>
603
604
605 <div class="option-box">
606 <p class="option-title"><?php _e('Grid item max Width(px).','team'); ?></p>
607 <p class="option-info"><?php _e('Maximum width for grid items.','team'); ?></p>
608 For Destop:<br/>
609 <input type="text" name="team_items_max_width" placeholder="ex:150px, px or %" id="team_items_max_width" value="<?php if(!empty($team_items_max_width)) echo $team_items_max_width; else echo "280px"; ?>" />
610 <br/>
611 <?php _e('For Mobile:','team'); ?> <br/>
612 <input type="text" name="team_items_width_mobile" placeholder="ex:150px, px or %" id="team_items_width_mobile" value="<?php if(!empty($team_items_width_mobile)) echo $team_items_width_mobile; else echo "90%"; ?>" />
613
614 <br/>
615 <?php _e('For Tablet:','team'); ?> <br/>
616 <input type="text" name="team_items_width_tablet" placeholder="ex:150px, px or %" id="team_items_width_tablet" value="<?php if(!empty($team_items_width_tablet)) echo $team_items_width_tablet; else echo "45%"; ?>" />
617
618
619
620
621
622 </div>
623
624
625
626
627 <div class="option-box">
628 <p class="option-title"><?php _e('Grid Items Margin (px).','team'); ?></p>
629 <p class="option-info"><?php _e('You can use general CSS rules for margin, ex:10px, <br /> 10px 10px, <br /> 10px 10px 10px, <br /> 10px 10px 10px 10px.','team'); ?></p>
630 <input type="text" name="team_items_margin" placeholder="ex:20px number with px" id="team_items_margin" value="<?php if(!empty($team_items_margin)) echo $team_items_margin; else echo "15px"; ?>" />
631 </div>
632
633
634
635 <div class="option-box">
636 <p class="option-title"><?php _e('Grid Items Text Align.','team'); ?></p>
637 <p class="option-info"></p>
638 <select id="team_item_text_align" name="team_item_text_align" >
639 <option class="team_item_text_align" value="left" <?php if($team_item_text_align=="left")echo "selected"; ?>>Left</option>
640
641 <option class="team_item_text_align" value="center" <?php if($team_item_text_align=="center")echo "selected"; ?>>Center</option>
642
643 <option class="team_item_text_align" value="right" <?php if($team_item_text_align=="right")echo "selected"; ?>>Right</option>
644 </select>
645 </div>
646
647
648
649 </li>
650 <li style="display: none;" class="box3 tab-box">
651 <div class="option-box">
652 <p class="option-title"><?php _e('Themes.','team'); ?></p>
653 <p class="option-info"><?php _e('Themes for Team grid.','team'); ?></p>
654 <?php
655
656
657
658 $team_themes_list = $class_team_functions->team_themes();
659
660
661 ?>
662
663
664
665 <select name="team_themes" >
666
667 <?php
668
669 foreach($team_themes_list as $key => $value)
670 {
671 ?>
672 <option value="<?php echo $key; ?>" <?php if($team_themes== $key )echo "selected"; ?>><?php echo $value; ?></option>
673
674 <?php
675
676
677 }
678
679 ?>
680
681 </select>
682 </div>
683
684
685
686
687
688
689
690
691 <div class="option-box">
692 <p class="option-title"><?php _e('Active Masonry Grid.','team'); ?></p>
693 <p class="option-info"><?php _e('Masonry Style grid.','team'); ?></p>
694 <select name="team_masonry_enable" >
695 <option value="no" <?php if($team_masonry_enable=="no")echo "selected"; ?>><?php _e('No','team'); ?></option>
696 <option value="yes" <?php if($team_masonry_enable=="yes")echo "selected"; ?>><?php _e('Yes','team'); ?></option>
697
698 </select>
699 </div>
700
701
702
703
704
705
706
707
708
709 <div class="option-box">
710 <p class="option-title"><?php _e('Container Options.','team'); ?></p>
711 <p class="option-info"><?php _e('Background image:','team'); ?></p>
712 <img class="bg_image_src" onClick="bg_img_src(this)" src="<?php echo team_plugin_url; ?>assets/global/images/bg/dark_embroidery.png" />
713 <img class="bg_image_src" onClick="bg_img_src(this)" src="<?php echo team_plugin_url; ?>assets/global/images/bg/dimension.png" />
714 <img class="bg_image_src" onClick="bg_img_src(this)" src="<?php echo team_plugin_url; ?>assets/global/images/bg/eight_horns.png" />
715 <br />
716 <input type="text" id="team_bg_img" class="team_bg_img" name="team_bg_img" value="<?php echo $team_bg_img; ?>" /> <div onClick="clear_container_bg_image()" class="button clear-container-bg-image"> <?php _e('Clear','team'); ?></div>
717
718 <script>
719
720 function bg_img_src(img){
721
722 src =img.src;
723
724 document.getElementById('team_bg_img').value = src;
725
726 }
727
728 function clear_container_bg_image(){
729
730 document.getElementById('team_bg_img').value = '';
731
732 }
733
734
735 </script>
736
737 <p class="option-info"><?php _e('Background color:','team'); ?></p>
738 <input type="text" name="team_container_bg_color" class="team_color" value="<?php if(!empty($team_container_bg_color)) echo $team_container_bg_color; ?>" />
739
740
741 <p class="option-info"><?php _e('Text align:','team'); ?></p>
742 <select id="team_grid_item_align" name="team_grid_item_align" >
743 <option class="team_grid_item_align" value="left" <?php if($team_grid_item_align=="left")echo "selected"; ?>>Left</option>
744
745 <option class="team_grid_item_align" value="center" <?php if($team_grid_item_align=="center")echo "selected"; ?>>Center</option>
746
747 <option class="team_grid_item_align" value="right" <?php if($team_grid_item_align=="right")echo "selected"; ?>>Right</option>
748 </select>
749
750 </div>
751
752
753 <div class="option-box">
754 <p class="option-title"><?php _e('Pagination.','team'); ?></p>
755 <p class="option-info"><?php _e('Pagination default background color.','team'); ?></p>
756 <input type="text" name="team_pagination_bg_color" id="team_pagination_bg_color" value="<?php if(!empty($team_pagination_bg_color)) echo $team_pagination_bg_color; else echo "#2eb3f8"; ?>" />
757
758
759 <p class="option-info"><?php _e('Pagination active background color.','team'); ?></p>
760 <input type="text" name="team_pagination_active_bg_color" id="team_pagination_active_bg_color" value="<?php if(!empty($team_pagination_active_bg_color)) echo $team_pagination_active_bg_color; else echo "#249bd9"; ?>" />
761
762 </div>
763
764
765
766 </li>
767 <li style="display: none;" class="box4 tab-box">
768
769
770
771
772
773
774
775 <div class="option-box">
776 <p class="option-title"><?php _e('Query orderby','team'); ?></p>
777 <p class="option-info"></p>
778 <select name="team_query_orderby" >
779 <option value="none" <?php if($team_query_orderby=="none") echo "selected"; ?>>None</option>
780 <option value="ID" <?php if($team_query_orderby=="ID") echo "selected"; ?>>ID</option>
781 <option value="date" <?php if($team_query_orderby=="date") echo "selected"; ?>>Date</option>
782 <option value="rand" <?php if($team_query_orderby=="rand") echo "selected"; ?>>Rand</option>
783 <option value="title" <?php if($team_query_orderby=="title") echo "selected"; ?>>Title(post title)</option>
784 <option value="name" <?php if($team_query_orderby=="name") echo "selected"; ?>>Name(post slug)</option>
785
786
787
788
789 </select>
790 </div>
791
792
793
794
795
796 <div class="option-box">
797 <p class="option-title"><?php _e('Query order','team'); ?></p>
798 <p class="option-info"></p>
799 <select name="team_query_order" >
800 <option value="ASC" <?php if($team_query_order=="ASC") echo "selected"; ?>>ASC</option>
801 <option value="DESC" <?php if($team_query_order=="DESC") echo "selected"; ?>>DESC</option>
802
803 </select>
804 </div>
805
806 <div class="option-box">
807 <p class="option-title"><?php _e('Filter Member.','team'); ?></p>
808 <p class="option-info"></p>
809 <ul class="content_source_area" >
810
811 <li><input class="team_content_source" name="team_content_source" id="team_content_source_latest" type="radio" value="latest" <?php if($team_content_source=="latest") echo "checked";?> /> <label for="team_content_source_latest"><?php _e('Display from Latest Published Member.','team'); ?></label>
812 <div class="team_content_source_latest content-source-box"><?php _e('Team items will query from latest published Members.','team'); ?></div>
813 </li>
814
815 <li><input class="team_content_source" name="team_content_source" id="team_content_source_year" type="radio" value="year" <?php if($team_content_source=="year") echo "checked";?> /> <label for="team_content_source_year"><?php _e('Display from Only Year.','team'); ?></label>
816
817 <div class="team_content_source_year content-source-box"><?php _e('Member items will query from a year.','team'); ?>
818 <input type="text" size="7" class="team_content_year" name="team_content_year" value="<?php if(!empty($team_content_year)) echo $team_content_year;?>" placeholder="2014" />
819 </div>
820 </li>
821
822
823 <li><input class="team_content_source" name="team_content_source" id="team_content_source_month" type="radio" value="month" <?php if($team_content_source=="month") echo "checked";?> /> <label for="team_content_source_month"><?php _e('Display from Month.','team'); ?></label>
824
825 <div class="team_content_source_month content-source-box"><?php _e('Member items will query from Month of a year.','team'); ?><br />
826 <input type="text" size="7" class="team_content_month_year" name="team_content_month_year" value="<?php if(!empty($team_content_month_year)) echo $team_content_month_year;?>" placeholder="2014" />
827 <input type="text" size="7" class="team_content_month" name="team_content_month" value="<?php if(!empty($team_content_month)) echo $team_content_month;?>" placeholder="06" />
828 </div>
829 </li>
830
831 </ul>
832 </div>
833
834
835
836
837
838
839
840 </li>
841
842 <li style="display: none;" class="box5 tab-box">
843 <div class="option-box">
844 <p class="option-title"><?php _e('Custom CSS for this Team Grid.','team'); ?></p>
845 <p class="option-info"><?php _e('Do not use &lt;style>&lt;/style> tag, you can use bellow prefix to your css, sometime you need use "!important" to overrid.','team'); ?>
846 <br/>
847 <b>#team-<?php echo $team_id ; ?></b>
848 </p>
849 <?php
850
851 $empty_css_sample = '.team-container #team-'.$team_id.'{}\n.team-container #team-'.$team_id.' .team-item{}\n.team-container #team-'.$team_id.' .team-thumb{}\n.team-container #team-'.$team_id.' .team-title{}\n.team-container #team-'.$team_id.' .team-content{}';
852
853
854 ?>
855
856 <textarea style="width:80%; min-height:150px" name="team_items_custom_css"><?php if(!empty($team_items_custom_css)) echo htmlentities($team_items_custom_css); else echo str_replace('\n', PHP_EOL, $empty_css_sample); ?></textarea>
857
858 </div>
859
860
861 </li>
862
863
864
865 <li style="display: none;" class="box7 tab-box">
866 <div class="option-box">
867 <p class="option-title"><?php _e('Layout builder','team'); ?></p>
868 <p class="option-info"><?php _e('You can sort grid items from here.','team'); ?></p>
869
870 <div class="team-grid-builder">
871
872 <?php
873 $class_team_functions = new class_team_functions();
874
875 if(empty($team_grid_items))
876 {
877
878 $team_grid_items = $class_team_functions->team_grid_items();
879
880 }
881 else
882 {
883
884 $team_grid_items = array_merge($team_grid_items,$class_team_functions->team_grid_items());
885 }
886
887
888 foreach($team_grid_items as $item_key=>$item_name)
889 {
890 echo '<div title="Click to expand" class="item"><div class="header">';
891 echo '<label title="Checked to Hide on frontend">';
892
893
894 if(!empty($team_grid_items_hide[$item_key]))
895 {
896 $checked = 'checked';
897 }
898 else
899 {
900 $checked = '';
901 }
902 echo '<input type="checkbox" title="Checked to Hide on frontend" '.$checked.' value="yes" name="team_grid_items_hide['.$item_key.']" />';
903 echo 'Hide on Frontend</label>';
904 echo '<input type="hidden" name="team_grid_items['.$item_key.']" value="'.$item_name.'"/>';
905 echo $item_name.'</div>';
906
907 if($item_key == 'meta')
908 {
909 echo '<div class="item-option"><br/>';
910 echo '<b>'.__('Meta key\'s','team').'</b> <br />'.__('Separtates by comma','team').'<br/>';
911
912 if(empty($team_grid_meta_keys))
913 {
914 $team_grid_meta_keys = 'dummy';
915 }
916 echo '<input type="text" placeholder="meta_key_1,meta_key_2" name="team_grid_meta_keys" value="'.$team_grid_meta_keys.'" size="20"/>';
917 echo '</div>';
918 }
919 elseif($item_key == 'thumbnail'){
920
921 ?>
922 <div class="item-option">
923 <div class="option-box">
924 <p class="option-title"><?php _e('Thumbnail Size.','team'); ?></p>
925 <p class="option-info"><?php _e('Thumbnail size of member on grid.','team'); ?></p>
926 <select name="team_items_thumb_size" >
927 <option value="none" <?php if($team_items_thumb_size=="none")echo "selected"; ?>><?php _e('None','team'); ?></option>
928 <option value="thumbnail" <?php if($team_items_thumb_size=="thumbnail")echo "selected"; ?>><?php _e('Thumbnail','team'); ?></option>
929 <option value="medium" <?php if($team_items_thumb_size=="medium")echo "selected"; ?>><?php _e('Medium','team'); ?></option>
930 <option value="large" <?php if($team_items_thumb_size=="large")echo "selected"; ?>><?php _e('Large','team'); ?></option>
931 <option value="full" <?php if($team_items_thumb_size=="full")echo "selected"; ?>><?php _e('Full','team'); ?></option>
932 </select>
933 </div>
934
935 <div class="option-box">
936 <p class="option-title"><?php _e('Grid item thumbnail max Height(px).','team'); ?></p>
937 <p class="option-info"><?php _e('Maximum Height for grid items thumbnail.','team'); ?></p>
938 <input type="text" name="team_items_thumb_max_hieght" placeholder="ex:150px number with px" id="team_items_thumb_max_hieght" value="<?php if(!empty($team_items_thumb_max_hieght)) echo $team_items_thumb_max_hieght; else echo "10000px"; ?>" />
939 </div>
940
941
942
943
944
945
946
947 </div>
948 <?php
949
950 }
951
952 elseif($item_key == 'title'){
953
954 ?>
955 <div class="item-option">
956 <div class="option-box">
957 <p class="option-title"><?php _e('Font Color.','team'); ?></p>
958 <p class="option-info"></p>
959 <input type="text" name="team_items_title_color" id="team_items_title_color" value="<?php if(!empty($team_items_title_color)) echo $team_items_title_color; else echo "#333"; ?>" />
960 </div>
961
962
963 <div class="option-box">
964 <p class="option-title"><?php _e('Font Size.','team'); ?></p>
965 <p class="option-info"></p>
966 <input type="text" name="team_items_title_font_size" placeholder="ex:14px number with px" id="team_items_title_font_size" value="<?php if(!empty($team_items_title_font_size)) echo $team_items_title_font_size; else echo "14px"; ?>" />
967 </div>
968
969
970 </div>
971 <?php
972
973 }
974
975 elseif($item_key == 'position'){
976
977 ?>
978 <div class="item-option">
979 <div class="option-box">
980 <p class="option-title"><?php _e('Member Position Font Color.','team'); ?></p>
981 <p class="option-info"></p>
982 <input type="text" name="team_items_position_color" placeholder="#ffffff" id="team_items_position_color" value="<?php if(!empty($team_items_position_color)) echo $team_items_position_color; else echo "#333"; ?>" />
983 </div>
984
985 <div class="option-box">
986 <p class="option-title"><?php _e('Member Position Font Size.','team'); ?></p>
987 <p class="option-info"></p>
988 <input type="text" name="team_items_position_font_size" placeholder="ex:12px number with px" id="team_items_position_font_size" value="<?php if(!empty($team_items_position_font_size)) echo $team_items_position_font_size; else echo "13px"; ?>" />
989 </div>
990
991
992 </div>
993 <?php
994 }
995
996 elseif($item_key == 'social'){
997
998 ?>
999 <div class="item-option">
1000 <div class="option-box">
1001 <p class="option-title"><?php _e('Social icons size(px).','team'); ?></p>
1002 <p class="option-info"><?php _e('you can change social icons height & width here.','team'); ?></p> Width:<br />
1003 <input type="text" name="team_items_social_icon_width" placeholder="ex:20px number with px" value="<?php if(!empty($team_items_social_icon_width)) echo $team_items_social_icon_width; else echo "25px"; ?>" />
1004 <br />
1005 Height:<br/>
1006 <input type="text" name="team_items_social_icon_height" placeholder="ex:20px number with px" value="<?php if(!empty($team_items_social_icon_height)) echo $team_items_social_icon_height; else echo "25px"; ?>" />
1007 </div>
1008
1009 <div class="option-box">
1010 <p class="option-title"><?php _e('Social icon style.','team'); ?></p>
1011 <p class="option-info"><?php _e('','team'); ?></p>
1012 <select name="team_social_icon_style" >
1013 <option value="flat" <?php if($team_social_icon_style=="flat")echo "selected"; ?>><?php _e('Flat','team'); ?></option>
1014 <option value="rounded" <?php if($team_social_icon_style=="rounded")echo "selected"; ?>><?php _e('Rounded','team'); ?></option>
1015 <option value="rounded-border" <?php if($team_social_icon_style=="rounded-border")echo "selected"; ?>><?php _e('Rounded Border','team'); ?></option>
1016 <option value="semi-rounded" <?php if($team_social_icon_style=="semi-rounded")echo "selected"; ?>><?php _e('Semi Rounded','team'); ?></option>
1017 </select>
1018 </div>
1019
1020
1021 </div>
1022 <?php
1023 }
1024
1025
1026
1027
1028
1029
1030
1031
1032 elseif($item_key == 'content'){
1033
1034 ?>
1035 <div class="item-option">
1036
1037 <div class="option-box">
1038 <p class="option-title"><?php _e('Member Bio Content Display.','team'); ?></p>
1039 <p class="option-info"></p>
1040 <ul class="content_source_area" >
1041 <li>
1042 <input class="team_content_source" name="team_items_content" id="team_items_content" type="radio" value="full" <?php if($team_items_content=="full") echo "checked";?> />
1043 <label for="team_items_content"><?php _e('Display full content.','team'); ?></label>
1044 <div class="team_items_content content-source-box">
1045 <?php _e('Member bio content will display from full content.','team'); ?>
1046 </div>
1047 </li>
1048 <li>
1049 <input class="team_content_source" name="team_items_content" id="team_items_excerpt" type="radio" value="excerpt" <?php if($team_items_content=="excerpt") echo "checked";?> />
1050 <label for="team_items_excerpt"><?php _e('Display excerpt','team'); ?></label>
1051 <div class="team_items_excerpt content-source-box">
1052 <?php _e('Member bio content will display from excerpt.','team'); ?><br />
1053 <?php _e('Excrept Length:','team'); ?>
1054 <input type="text" placeholder="25" size="4" name="team_items_excerpt_count" value="<?php if(!empty($team_items_excerpt_count)) echo $team_items_excerpt_count; else echo 30; ?>" />
1055 <br />
1056 <?php _e('Read More Text:','team'); ?>
1057 <input type="text" placeholder="Read More..." size="10" name="team_items_excerpt_text" value="<?php if(!empty($team_items_excerpt_text)) echo $team_items_excerpt_text; else echo 'Read More'; ?>" />
1058
1059 </div>
1060 </li>
1061
1062 </ul>
1063 </div>
1064
1065 <div class="option-box">
1066 <p class="option-title"><?php _e('Font Color.','team'); ?></p>
1067 <p class="option-info"></p>
1068 <input type="text" name="team_items_content_color" id="team_items_content_color" value="<?php if(!empty($team_items_content_color)) echo $team_items_content_color; else echo "#333"; ?>" />
1069 </div>
1070
1071
1072 <div class="option-box">
1073 <p class="option-title"><?php _e('Font Size.','team'); ?></p>
1074 <p class="option-info"></p>
1075 <input type="text" placeholder="ex:12px number with px" name="team_items_content_font_size" id="team_items_content_font_size" value="<?php if(!empty($team_items_content_font_size)) echo $team_items_content_font_size; else echo "13px"; ?>" />
1076 </div>
1077
1078
1079 </div>
1080 <?php
1081 }
1082
1083 elseif($item_key == 'popup'){
1084 ?>
1085 <div class="item-option">
1086 <div class="option-box">
1087 <p class="option-title"><?php _e('Member Bio Popup Content Display.','team'); ?></p>
1088 <p class="option-info"></p>
1089 <ul class="content_source_area" >
1090 <li>
1091 <input class="team_content_source" name="team_items_popup_content" id="team_items_popup_content" type="radio" value="full" <?php if($team_items_popup_content=="full") echo "checked";?> />
1092 <label for="team_items_popup_content"><?php _e('Display full content.','team'); ?></label>
1093 <div class="team_items_popup_content content-source-box">
1094 <?php _e('Member bio content will display from full content.','team'); ?>
1095 </div>
1096 </li>
1097
1098
1099 <li>
1100 <input class="team_content_source" name="team_items_popup_content" id="team_items_popup_excerpt" type="radio" value="excerpt" <?php if($team_items_popup_content=="excerpt") echo "checked";?> />
1101 <label for="team_items_popup_excerpt"><?php _e('Display excerpt.','team'); ?></label>
1102 <div class="team_items_popup_excerpt content-source-box">
1103 <?php _e('Member bio content will display from excerpt.','team'); ?><br />
1104 <?php _e('Excrept Length:','team'); ?>
1105 <input type="text" placeholder="25" size="4" name="team_items_popup_excerpt_count" value="<?php if(!empty($team_items_popup_excerpt_count)) echo $team_items_popup_excerpt_count; else echo '25'; ?>" />
1106 <br />
1107 <?php _e('Read More Text:','team'); ?>
1108 <input type="text" placeholder="Read More..." size="10" name="team_items_popup_excerpt_text" value="<?php if(!empty($team_items_popup_excerpt_text)) echo $team_items_popup_excerpt_text; else echo 'Read More'; ?>" />
1109
1110 </div>
1111 </li>
1112
1113 </ul>
1114 </div>
1115
1116
1117
1118
1119 <div class="option-box">
1120 <p class="option-title"><?php _e('Popup box width.','team'); ?></p>
1121 <p class="option-info"></p>
1122 <input type="text" placeholder="80%" name="team_items_popup_width" id="team_items_popup_width" value="<?php if(!empty($team_items_popup_width)) echo $team_items_popup_width; else echo "80%"; ?>" />
1123 </div>
1124
1125 <div class="option-box">
1126 <p class="option-title"><?php _e('Popup box height.','team'); ?></p>
1127 <p class="option-info"></p>
1128 <input type="text" placeholder="70%" name="team_items_popup_height" id="team_items_popup_height" value="<?php if(!empty($team_items_popup_height)) echo $team_items_popup_height; else echo "70%"; ?>" />
1129 </div>
1130
1131
1132
1133
1134
1135
1136 </div>
1137 <?php
1138
1139
1140
1141
1142
1143
1144
1145
1146 }
1147 elseif($item_key == 'skill'){
1148 ?>
1149 <div class="item-option">
1150 <div class="option-box">
1151 <p class="option-title"><?php _e('Font Color.','team'); ?></p>
1152 <p class="option-info"></p>
1153 <input type="text" name="team_items_skill_bg_color" id="team_items_skill_bg_color" value="<?php if(!empty($team_items_skill_bg_color)) echo $team_items_skill_bg_color; else echo "#399fe7"; ?>" />
1154 </div>
1155 </div>
1156
1157 <?php
1158
1159 }
1160
1161
1162
1163 echo '</div>';
1164 }
1165
1166 ?>
1167
1168
1169
1170 </div>
1171
1172 <script>
1173 jQuery(document).ready(function($)
1174 {
1175 $(function() {
1176 $( ".team-grid-builder" ).sortable();
1177 //$( ".items-container" ).disableSelection();
1178 });
1179
1180 })
1181
1182 </script>
1183 </div>
1184 </li>
1185
1186
1187
1188
1189
1190 </ul><!-- box end -->
1191
1192 </div>
1193
1194
1195
1196
1197 <script>
1198 jQuery(document).ready(function($){
1199 $('#team_items_position_color, #team_items_content_color, #team_items_title_color ').wpColorPicker();
1200 });
1201 </script>
1202
1203
1204
1205 <?php
1206
1207
1208
1209
1210
1211 }
1212
1213
1214 public function meta_boxes_team_save($post_id) {
1215
1216 /*
1217 * We need to verify this came from the our screen and with
1218 * proper authorization,
1219 * because save_post can be triggered at other times.
1220 */
1221
1222 // Check if our nonce is set.
1223 if (!isset($_POST['team_nonce_check_value']))
1224 return $post_id;
1225
1226 $nonce = $_POST['team_nonce_check_value'];
1227
1228 // Verify that the nonce is valid.
1229 if (!wp_verify_nonce($nonce, 'team_nonce_check'))
1230 return $post_id;
1231
1232 // If this is an autosave, our form has not been submitted,
1233 // so we don't want to do anything.
1234 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
1235 return $post_id;
1236
1237 // Check the user's permissions.
1238 if ('page' == $_POST['post_type']) {
1239
1240 if (!current_user_can('edit_page', $post_id))
1241 return $post_id;
1242
1243 } else {
1244
1245 if (!current_user_can('edit_post', $post_id))
1246 return $post_id;
1247 }
1248
1249 /* OK, its safe for us to save the data now. */
1250
1251 // Sanitize user input.
1252 $team_bg_img = sanitize_text_field( $_POST['team_bg_img'] );
1253 $team_container_bg_color = sanitize_text_field( $_POST['team_container_bg_color'] );
1254
1255 $team_themes = sanitize_text_field( $_POST['team_themes'] );
1256 $team_social_icon_style = sanitize_text_field( $_POST['team_social_icon_style'] );
1257 $team_masonry_enable = sanitize_text_field( $_POST['team_masonry_enable'] );
1258
1259 $team_grid_item_align = sanitize_text_field( $_POST['team_grid_item_align'] );
1260 $team_item_text_align = sanitize_text_field( $_POST['team_item_text_align'] );
1261 $team_total_items = sanitize_text_field( $_POST['team_total_items'] );
1262 $team_pagination_display = sanitize_text_field( $_POST['team_pagination_display'] );
1263
1264 $team_items_content = sanitize_text_field( $_POST['team_items_content'] );
1265 $team_items_excerpt_count = sanitize_text_field( $_POST['team_items_excerpt_count'] );
1266 $team_items_excerpt_text = sanitize_text_field( $_POST['team_items_excerpt_text'] );
1267
1268 $team_query_order = sanitize_text_field( $_POST['team_query_order'] );
1269 $team_query_orderby = sanitize_text_field( $_POST['team_query_orderby'] );
1270
1271 $team_content_source = sanitize_text_field( $_POST['team_content_source'] );
1272 $team_content_year = sanitize_text_field( $_POST['team_content_year'] );
1273 $team_content_month = sanitize_text_field( $_POST['team_content_month'] );
1274 $team_content_month_year = sanitize_text_field( $_POST['team_content_month_year'] );
1275
1276 if(empty($_POST['team_taxonomy_terms']))
1277 {
1278 $_POST['team_taxonomy_terms'] = '';
1279 }
1280
1281 $team_taxonomy_terms = stripslashes_deep( $_POST['team_taxonomy_terms'] );
1282
1283 if(empty($_POST['team_post_ids']))
1284 {
1285 $_POST['team_post_ids'] = '';
1286 }
1287
1288 $team_post_ids = stripslashes_deep( $_POST['team_post_ids'] );
1289
1290
1291 $team_items_title_color = sanitize_text_field( $_POST['team_items_title_color'] );
1292 $team_items_title_font_size = sanitize_text_field( $_POST['team_items_title_font_size'] );
1293
1294 $team_items_position_color = sanitize_text_field( $_POST['team_items_position_color'] );
1295 $team_items_position_font_size = sanitize_text_field( $_POST['team_items_position_font_size'] );
1296
1297 $team_items_content_color = sanitize_text_field( $_POST['team_items_content_color'] );
1298 $team_items_content_font_size = sanitize_text_field( $_POST['team_items_content_font_size'] );
1299
1300 $team_pagination_bg_color = sanitize_text_field( $_POST['team_pagination_bg_color'] );
1301 $team_pagination_active_bg_color = sanitize_text_field( $_POST['team_pagination_active_bg_color'] );
1302
1303 $team_items_thumb_size = sanitize_text_field( $_POST['team_items_thumb_size'] );
1304 $team_items_link_to_post = sanitize_text_field( $_POST['team_items_link_to_post'] );
1305 $team_items_max_width = sanitize_text_field( $_POST['team_items_max_width'] );
1306 $team_items_width_mobile = sanitize_text_field( $_POST['team_items_width_mobile'] );
1307 $team_items_width_tablet = sanitize_text_field( $_POST['team_items_width_tablet'] );
1308
1309 $team_items_thumb_max_hieght = sanitize_text_field( $_POST['team_items_thumb_max_hieght'] );
1310
1311 $team_items_margin = sanitize_text_field( $_POST['team_items_margin'] );
1312 $team_items_social_icon_width = sanitize_text_field( $_POST['team_items_social_icon_width'] );
1313 $team_items_social_icon_height = sanitize_text_field( $_POST['team_items_social_icon_height'] );
1314
1315 $team_items_custom_css = sanitize_text_field( $_POST['team_items_custom_css'] );
1316
1317
1318 $team_items_popup_content = sanitize_text_field( $_POST['team_items_popup_content'] );
1319 $team_items_popup_excerpt_count = sanitize_text_field( $_POST['team_items_popup_excerpt_count'] );
1320 $team_items_popup_excerpt_text = sanitize_text_field( $_POST['team_items_popup_excerpt_text'] );
1321 $team_items_popup_width = sanitize_text_field( $_POST['team_items_popup_width'] );
1322 $team_items_popup_height = sanitize_text_field( $_POST['team_items_popup_height'] );
1323
1324
1325
1326
1327 $team_grid_items = stripslashes_deep( $_POST['team_grid_items'] );
1328 $team_grid_items_hide = stripslashes_deep( $_POST['team_grid_items_hide'] );
1329 $team_grid_meta_keys = sanitize_text_field( $_POST['team_grid_meta_keys'] );
1330
1331 $team_items_skill_bg_color = sanitize_text_field( $_POST['team_items_skill_bg_color'] );
1332
1333
1334
1335 // Update the meta field in the database.
1336 update_post_meta( $post_id, 'team_bg_img', $team_bg_img );
1337 update_post_meta( $post_id, 'team_container_bg_color', $team_container_bg_color );
1338
1339 update_post_meta( $post_id, 'team_themes', $team_themes );
1340 update_post_meta( $post_id, 'team_social_icon_style', $team_social_icon_style );
1341 update_post_meta( $post_id, 'team_masonry_enable', $team_masonry_enable );
1342
1343 update_post_meta( $post_id, 'team_grid_item_align', $team_grid_item_align );
1344 update_post_meta( $post_id, 'team_item_text_align', $team_item_text_align );
1345 update_post_meta( $post_id, 'team_total_items', $team_total_items );
1346 update_post_meta( $post_id, 'team_pagination_display', $team_pagination_display );
1347
1348 update_post_meta( $post_id, 'team_query_order', $team_query_order );
1349 update_post_meta( $post_id, 'team_query_orderby', $team_query_orderby );
1350
1351 update_post_meta( $post_id, 'team_items_content', $team_items_content );
1352 update_post_meta( $post_id, 'team_items_excerpt_count', $team_items_excerpt_count );
1353 update_post_meta( $post_id, 'team_items_excerpt_text', $team_items_excerpt_text );
1354
1355 update_post_meta( $post_id, 'team_content_source', $team_content_source );
1356 update_post_meta( $post_id, 'team_content_year', $team_content_year );
1357 update_post_meta( $post_id, 'team_content_month', $team_content_month );
1358 update_post_meta( $post_id, 'team_content_month_year', $team_content_month_year );
1359
1360
1361 update_post_meta( $post_id, 'team_taxonomy_terms', $team_taxonomy_terms );
1362
1363 update_post_meta( $post_id, 'team_post_ids', $team_post_ids );
1364
1365
1366
1367 update_post_meta( $post_id, 'team_items_title_color', $team_items_title_color );
1368 update_post_meta( $post_id, 'team_items_title_font_size', $team_items_title_font_size );
1369
1370 update_post_meta( $post_id, 'team_items_position_color', $team_items_position_color );
1371 update_post_meta( $post_id, 'team_items_position_font_size', $team_items_position_font_size );
1372
1373 update_post_meta( $post_id, 'team_items_content_color', $team_items_content_color );
1374 update_post_meta( $post_id, 'team_items_content_font_size', $team_items_content_font_size );
1375
1376 update_post_meta( $post_id, 'team_pagination_bg_color', $team_pagination_bg_color );
1377 update_post_meta( $post_id, 'team_pagination_active_bg_color', $team_pagination_active_bg_color );
1378
1379 update_post_meta( $post_id, 'team_items_thumb_size', $team_items_thumb_size );
1380 update_post_meta( $post_id, 'team_items_link_to_post', $team_items_link_to_post );
1381 update_post_meta( $post_id, 'team_items_max_width', $team_items_max_width );
1382 update_post_meta( $post_id, 'team_items_width_mobile', $team_items_width_mobile );
1383 update_post_meta( $post_id, 'team_items_width_tablet', $team_items_width_tablet );
1384
1385 update_post_meta( $post_id, 'team_items_thumb_max_hieght', $team_items_thumb_max_hieght );
1386
1387 update_post_meta( $post_id, 'team_items_margin', $team_items_margin );
1388 update_post_meta( $post_id, 'team_items_social_icon_width', $team_items_social_icon_width );
1389 update_post_meta( $post_id, 'team_items_social_icon_height', $team_items_social_icon_height );
1390
1391 update_post_meta( $post_id, 'team_items_custom_css', $team_items_custom_css );
1392
1393
1394 update_post_meta( $post_id, 'team_items_popup_content', $team_items_popup_content );
1395 update_post_meta( $post_id, 'team_items_popup_excerpt_count', $team_items_popup_excerpt_count );
1396 update_post_meta( $post_id, 'team_items_popup_excerpt_text', $team_items_popup_excerpt_text );
1397 update_post_meta( $post_id, 'team_items_popup_width', $team_items_popup_width );
1398 update_post_meta( $post_id, 'team_items_popup_height', $team_items_popup_height );
1399
1400
1401
1402 update_post_meta( $post_id, 'team_grid_items', $team_grid_items );
1403 update_post_meta( $post_id, 'team_grid_items_hide', $team_grid_items_hide );
1404 update_post_meta( $post_id, 'team_grid_meta_keys', $team_grid_meta_keys );
1405
1406 update_post_meta( $post_id, 'team_items_skill_bg_color', $team_items_skill_bg_color );
1407
1408
1409 }
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431 }
1432
1433 new team_class_post_meta();