PluginProbe
Team Showcase / 1.7
Team Showcase v1.7
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
← All changes | includes/menu/settings.php +53 -173 1.191.7 View file →
@@ -1,8 +1,11 @@
1 1 <?php
2 2
3 3 /*
4 4 * @Author ParaTheme
5 +* @Folder Team/Templates
6 +* @version 3.0.5
7 +
5 8 * Copyright: 2015 ParaTheme
6 9 */
7 10
8 11 if ( ! defined('ABSPATH')) exit; // if direct access
@@ -8,30 +11,33 @@
8 11 if ( ! defined('ABSPATH')) exit; // if direct access
9 12
10 13
11 14
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 +if(empty($_POST['team_hidden']))
16 + {
17 +
18 +
15 19 $team_member_social_field = get_option( 'team_member_social_field' );
20 + $team_member_social_icon = get_option( 'team_member_social_icon' );
16 21
17 22 }
18 -else{
23 +else
24 + {
19 25 if($_POST['team_hidden'] == 'Y') {
20 26 //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 27
25 - if(empty($_POST['team_member_meta_fields'])){
26 -
27 - $_POST['team_member_meta_fields'] = array();
28 + if(empty($_POST['team_themes']))
29 + {
30 + $_POST['team_themes'] = array();
28 31 }
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 +
33 +
34 +
32 35 $team_member_social_field = stripslashes_deep($_POST['team_member_social_field']);
33 36 update_option('team_member_social_field', $team_member_social_field);
37 +
38 + $team_member_social_icon = stripslashes_deep($_POST['team_member_social_icon']);
39 + update_option('team_member_social_icon', $team_member_social_icon);
34 40
35 41 ?>
36 42 <div class="updated"><p><strong><?php _e('Changes Saved.', 'team' ); ?></strong></p></div>
37 43
@@ -39,16 +45,20 @@
39 45 }
40 46 }
41 47
42 48
49 + $team_version = get_option('team_version');
43 50
51 + $class_team_functions = new class_team_functions();
44 52
45 - $class_team_functions = new class_team_functions();
46 53 $default_social_field = $class_team_functions->team_member_social_field();
47 54
48 55 ?>
49 56
50 57
58 +
59 +
60 +
51 61 <div class="wrap">
52 62
53 63 <div id="icon-tools" class="icon32"><br></div><?php echo "<h2>".__(team_plugin_name.' Settings', 'team')."</h2>";?>
54 64 <form method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
@@ -60,173 +70,43 @@
60 70
61 71 <div class="para-settings team-settings">
62 72
63 73 <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>
74 + <li nav="1" class="nav1 active">Options</li>
75 + <li nav="2" class="nav2">Help & Support</li>
66 76 </ul> <!-- tab-nav end -->
67 77 <ul class="box">
68 78 <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 79 <div class="option-box">
158 80 <p class="option-title"><?php _e('Display social field on team member profile.','team'); ?></p>
159 81 <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>
82 + <table class="team_member_social_field" id="team_member_social_field">
83 +
84 +
167 85 <?php
168 -
169 86
170 - if(empty($team_member_social_field)){
171 - $team_member_social_field = $default_social_field;
87 + if(empty($team_member_social_field))
88 + {
89 + $team_member_social_field = array(''=>'');
172 90 }
91 +
92 + $team_member_social_field = array_merge($team_member_social_field,$default_social_field);
173 93
174 - foreach ($team_member_social_field as $field_key=>$field_info) {
175 - if(!empty($field_key))
94 + foreach ($team_member_social_field as $value) {
95 + if(!empty($value))
176 96 {
177 97 ?>
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 -
98 + <tr><td>*</td><td>
99 + <input type="text" name="team_member_social_field[<?php echo $value; ?>]" value="<?php if(isset($team_member_social_field[$value])) echo $team_member_social_field[$value]; else echo $value; ?>" /><br />
189 100 </td>
190 -
191 101 <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>
102 + <span style=" <?php if(!empty($team_member_social_icon[$value])) echo 'background:url('.$team_member_social_icon[$value].') 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_icon[$value])) echo 'empty_icon';?>" icon-name="<?php echo $value; ?>"> </span>
193 103
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 104
105 + <input class="team_member_social_icon team_member_social_icon_<?php echo $value; ?>" name="team_member_social_icon[<?php echo $value; ?>]" type="hidden" value="<?php if(isset($team_member_social_icon[$value])) echo $team_member_social_icon[$value]; ?>" />
196 106
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 107 <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 108 </td>
227 -
228 -
229 109 </tr>
230 110 <?php
231 111
232 112
@@ -240,25 +120,24 @@
240 120 </table>
241 121
242 122
243 123
244 -
245 -
246 124 <script>
247 - jQuery(document).ready(function($)
248 - {
249 - $(function() {
250 - $( "#team_member_social_field tbody" ).sortable();
251 - //$( ".items" ).disableSelection();
252 - });
253 -
254 - })
255 125
126 + jQuery(document).ready(function() {
127 +
128 + // Initialise the table
129 + jQuery("#team_member_social_field").tableDnD();
130 +
131 + });
132 +
256 133 </script>
257 134
135 +
258 136
259 137
260 138
139 +
261 140 <div class="button new_team_member_social_field"><?php _e('Add New','team'); ?></div>
262 141
263 142 </div>
264 143
@@ -266,9 +145,9 @@
266 145 </li>
267 146
268 147 <li style="display: none;" class="box2 tab-box">
269 148
270 - <div class="option-box">
149 +<div class="option-box">
271 150 <p class="option-title">Plugin info ?</p>
272 151 <p class="option-info">
273 152 <?php
274 153
@@ -308,11 +187,12 @@
308 187 <img class="team-pro-pricing" src="<?php echo team_plugin_url."css/five-star.png";?>" /><br />
309 188 <a target="_blank" href="<?php echo team_wp_reviews; ?>">
310 189 <?php echo team_wp_reviews; ?>
311 190 </a>
312 -
191 +
192 +
193 +
313 194 </div>
314 -
315 195 <div class="option-box">
316 196 <p class="option-title">Please Share</p>
317 197 <p class="option-info">If you like this plugin please share with your social share network.</p>
318 198 <?php