Version Description
- SAFE UPDATE: No data loss for those upgrading from version 1.0 or higher
- A few layout changes for the admin interface
- Added a link for the members photo (user request)
- Added a hover photo (PRO version only)
- Fixed a bug when removing/sorting the members
Download this release
Release Info
Developer | spwebguy |
Plugin | Team Members |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.1
- css/tmm_custom_style.css +5 -5
- css/tmm_custom_style.min.css +1 -1
- readme.txt +25 -18
- tmm.php +73 -29
css/tmm_custom_style.css
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
.tmm_3_columns .tmm_member {width: 31%; margin-right:1%; margin-left:1%;}
|
22 |
.tmm_4_columns .tmm_member {width: 23%; margin-right:1%; margin-left:1%;}
|
23 |
|
24 |
-
.tmm_member
|
25 |
width:150px;
|
26 |
height:150px;
|
27 |
border:none;
|
@@ -33,7 +33,7 @@
|
|
33 |
border:10px solid whitesmoke;
|
34 |
}
|
35 |
|
36 |
-
.tmm_4_columns .tmm_member
|
37 |
width:100px;
|
38 |
height:100px;
|
39 |
margin-top:-70px;
|
@@ -63,13 +63,13 @@
|
|
63 |
.tmm_job {font-size:13px; color:#a2a5a4; text-transform:uppercase;}
|
64 |
.tmm_desc {padding:10px; margin-top:19px; margin-bottom:10px; font-size:14px; line-height:23px;}
|
65 |
.tmm_4_columns .tmm_desc {font-size:15px; line-height:23px;}
|
66 |
-
.tmm_3_columns .tmm_member
|
67 |
width:100px;
|
68 |
height:100px;
|
69 |
border-radius:40px !important;
|
70 |
border:9px solid whitesmoke;
|
71 |
}
|
72 |
-
.tmm_4_columns .tmm_member
|
73 |
width:150px;
|
74 |
height:150px;
|
75 |
border-radius:60px !important;
|
@@ -83,7 +83,7 @@
|
|
83 |
.tmm_member {width: 96%; margin:0 2%; margin-top:120px;}
|
84 |
.tmm_2_columns .tmm_member, .tmm_3_columns .tmm_member, .tmm_4_columns .tmm_member {width: 96%; margin:0 2%; margin-top:120px;}
|
85 |
.tmm_4_columns .tmm_desc {font-size:15px;}
|
86 |
-
.tmm_4_columns .tmm_member
|
87 |
width:150px;
|
88 |
height:150px;
|
89 |
border-radius:60px !important;
|
21 |
.tmm_3_columns .tmm_member {width: 31%; margin-right:1%; margin-left:1%;}
|
22 |
.tmm_4_columns .tmm_member {width: 23%; margin-right:1%; margin-left:1%;}
|
23 |
|
24 |
+
.tmm_member .tmm_photo {
|
25 |
width:150px;
|
26 |
height:150px;
|
27 |
border:none;
|
33 |
border:10px solid whitesmoke;
|
34 |
}
|
35 |
|
36 |
+
.tmm_4_columns .tmm_member .tmm_photo {
|
37 |
width:100px;
|
38 |
height:100px;
|
39 |
margin-top:-70px;
|
63 |
.tmm_job {font-size:13px; color:#a2a5a4; text-transform:uppercase;}
|
64 |
.tmm_desc {padding:10px; margin-top:19px; margin-bottom:10px; font-size:14px; line-height:23px;}
|
65 |
.tmm_4_columns .tmm_desc {font-size:15px; line-height:23px;}
|
66 |
+
.tmm_3_columns .tmm_member .tmm_photo {
|
67 |
width:100px;
|
68 |
height:100px;
|
69 |
border-radius:40px !important;
|
70 |
border:9px solid whitesmoke;
|
71 |
}
|
72 |
+
.tmm_4_columns .tmm_member .tmm_photo {
|
73 |
width:150px;
|
74 |
height:150px;
|
75 |
border-radius:60px !important;
|
83 |
.tmm_member {width: 96%; margin:0 2%; margin-top:120px;}
|
84 |
.tmm_2_columns .tmm_member, .tmm_3_columns .tmm_member, .tmm_4_columns .tmm_member {width: 96%; margin:0 2%; margin-top:120px;}
|
85 |
.tmm_4_columns .tmm_desc {font-size:15px;}
|
86 |
+
.tmm_4_columns .tmm_member .tmm_photo {
|
87 |
width:150px;
|
88 |
height:150px;
|
89 |
border-radius:60px !important;
|
css/tmm_custom_style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";.tmm_wrap{width:100%;margin-bottom:30px;text-align:center}.clearer{clear:both}.tmm_member{margin-top:100px;height:auto;float:left;text-align:center;-webkit-box-shadow:1px 0 5px 0 rgba(0,0,0,.05);-moz-box-shadow:1px 0 5px 0 rgba(0,0,0,.05);box-shadow:1px 0 5px 0 rgba(0,0,0,.05);border-top:5px solid #d3d3d3;border-bottom:8px solid #f5f5f5}.tmm_three_entries{clear:both}.tmm_2_columns .tmm_member{width:48%;margin-right:1%;margin-left:1%}.tmm_3_columns .tmm_member{width:31%;margin-right:1%;margin-left:1%}.tmm_4_columns .tmm_member{width:23%;margin-right:1%;margin-left:1%}.tmm_member
|
1 |
+
@charset "UTF-8";.tmm_wrap{width:100%;margin-bottom:30px;text-align:center}.clearer{clear:both}.tmm_member{margin-top:100px;height:auto;float:left;text-align:center;-webkit-box-shadow:1px 0 5px 0 rgba(0,0,0,.05);-moz-box-shadow:1px 0 5px 0 rgba(0,0,0,.05);box-shadow:1px 0 5px 0 rgba(0,0,0,.05);border-top:5px solid #d3d3d3;border-bottom:8px solid #f5f5f5}.tmm_three_entries{clear:both}.tmm_2_columns .tmm_member{width:48%;margin-right:1%;margin-left:1%}.tmm_3_columns .tmm_member{width:31%;margin-right:1%;margin-left:1%}.tmm_4_columns .tmm_member{width:23%;margin-right:1%;margin-left:1%}.tmm_member .tmm_photo{width:150px;height:150px;-webkit-box-shadow:2px 0 15px 0 rgba(0,0,0,.15);-moz-box-shadow:2px 0 15px 0 rgba(0,0,0,.15);box-shadow:2px 0 15px 0 rgba(0,0,0,.15);border-radius:60px!important;margin-top:-80px;border:10px solid #f5f5f5}.tmm_4_columns .tmm_member .tmm_photo{width:100px;height:100px;margin-top:-70px;border-radius:40px!important;border:6px solid #f5f5f5}.tmm_member .tmm_textblock .tmm_scblock{padding-top:10px}.tmm_member .tmm_textblock{padding:10px 20px}.tmm_member .tmm_textblock .tmm_sociallink{clear:both;margin-bottom:20px;border:none}.tmm_member .tmm_textblock .tmm_sociallink img{display:inline-block;border:none;width:24px;height:24px;box-shadow:0 0;margin:10px 5px}.tmm_4_columns .tmm_member .tmm_textblock .tmm_sociallink img{width:21px;height:21px;margin:6px 3px}.tmm_member .tmm_textblock .tmm_sociallink img:hover{opacity:.8}.tmm_names{font-size:22px;margin-bottom:8px;margin-top:10px;font-weight:300;line-height:24px}.tmm_4_columns .tmm_names{font-size:19px}.tmm_fname,.tmm_lname{display:inline}.tmm_job{font-size:14px;color:#a2a5a4;text-transform:uppercase}.tmm_desc{padding:10px;margin-top:19px;margin-bottom:10px;font-size:14px}.tmm_4_columns .tmm_desc{padding:8px;margin-top:14px;margin-bottom:8px;font-size:13px;line-height:23px}@media only screen and (min-width:40em) and (max-width:64.063em){.tmm_4_columns .tmm_member{width:40%;margin-left:5%;margin-right:5%}.tmm_names{font-size:17px;margin-bottom:8px;margin-top:10px;font-weight:300;line-height:24px}.tmm_job{font-size:13px;color:#a2a5a4;text-transform:uppercase}.tmm_desc{padding:10px;margin-top:19px;margin-bottom:10px;font-size:14px;line-height:23px}.tmm_4_columns .tmm_desc{font-size:15px;line-height:23px}.tmm_3_columns .tmm_member .tmm_photo{width:100px;height:100px;border-radius:40px!important;border:9px solid #f5f5f5}.tmm_4_columns .tmm_member .tmm_photo{width:150px;height:150px;border-radius:60px!important;border:9px solid #f5f5f5}.tmm_4_columns .tmm_member .tmm_textblock .tmm_sociallink img{width:24px;height:24px;margin:10px 5px}}@media only screen and (max-width:40em){.tmm_2_columns .tmm_member,.tmm_3_columns .tmm_member,.tmm_4_columns .tmm_member,.tmm_member{width:96%;margin:120px 2% 0}.tmm_4_columns .tmm_desc{font-size:15px}.tmm_4_columns .tmm_member .tmm_photo{width:150px;height:150px;border-radius:60px!important;border:9px solid #f5f5f5}.tmm_4_columns .tmm_names{font-size:22px}.tmm_4_columns .tmm_member .tmm_textblock .tmm_sociallink img{width:24px;height:24px;margin:10px 5px}}.tmm_container .tmm_ori_f .tmm_desc,.tmm_container .tmm_ori_f .tmm_fname,.tmm_container .tmm_ori_f .tmm_job,.tmm_container .tmm_ori_f .tmm_lname{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif!important;font-weight:300!important}
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== Team Members ===
|
2 |
Contributors: spwebguy
|
3 |
-
Tags: team, teams,
|
4 |
Requires at least: 3.6
|
5 |
-
Tested up to: 4.
|
6 |
Stable tag: trunk
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
@@ -12,23 +12,19 @@ A responsive and clean way to display your team. Create members, add their posit
|
|
12 |
== Description ==
|
13 |
This plugin adds a “Teams” section to the admin panel which allows you to showcase your staff/employees/people on your website the easy way. You can quickly add members to your team(s), add their picture, position, bios, social links, re-order them at anytime and display them anywhere with a simple shortcode. What you see is what you get, and it’s totally free.
|
14 |
|
15 |
-
=
|
16 |
-
We love to hear from our users, please take the time to rate this plugin and tell us what you think about it!
|
17 |
-
|
18 |
-
= Free vs PRO version? =
|
19 |
The free version of the Team Members plugin is **not limited** and does not contain any ad.
|
20 |
|
21 |
-
The [PRO version](http://wpdarko.com/items/team-members-pro/) gives you access to a lot of new features:
|
22 |
-
|
23 |
-
= Author =
|
24 |
-
[WP Darko](http://wpdarko.com/) is one more great place to find exclusive WordPress themes & plugins.
|
25 |
|
26 |
-
= Available fields
|
27 |
* Firstname
|
28 |
* Lastname
|
29 |
* Description/bio
|
30 |
* Picture
|
31 |
* Social links (FB, Twitter…)
|
|
|
|
|
32 |
* Number of members to show per line (2, 3, 4)
|
33 |
* Color
|
34 |
|
@@ -51,23 +47,34 @@ Go to [the plugin's documentation](http://wpdarko.com/support/documentation/get-
|
|
51 |
|
52 |
== Frequently Asked Questions ==
|
53 |
|
54 |
-
=
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
|
60 |
-
=
|
61 |
-
|
62 |
|
63 |
-
The [PRO version](http://wpdarko.com/items/team-members-pro/) gives you access to a lot of new features: Pictures’ shape, enabling/disabling picture borders, picture position. It also allows you to add filters to your pictures, set a color for each member instead of one general color for everybody (good for distinguishing your staff). One more link can be added to each member.
|
64 |
|
65 |
== Screenshots ==
|
66 |
1. Team Members (front view - 3 per line)
|
67 |
2. Team Members (front view - 4 per line)
|
68 |
3. Creating members (admin view)
|
|
|
|
|
|
|
69 |
|
70 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
= 2.0.4 =
|
72 |
* SAFE UPDATE: No data loss for those upgrading from version 1.0 or higher
|
73 |
* Added alt attribute to link’s icon
|
1 |
=== Team Members ===
|
2 |
Contributors: spwebguy
|
3 |
+
Tags: team, teams, meet the team, shortcode, responsive, members, staff, people
|
4 |
Requires at least: 3.6
|
5 |
+
Tested up to: 4.2
|
6 |
Stable tag: trunk
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
12 |
== Description ==
|
13 |
This plugin adds a “Teams” section to the admin panel which allows you to showcase your staff/employees/people on your website the easy way. You can quickly add members to your team(s), add their picture, position, bios, social links, re-order them at anytime and display them anywhere with a simple shortcode. What you see is what you get, and it’s totally free.
|
14 |
|
15 |
+
= No limitation for the Free version =
|
|
|
|
|
|
|
16 |
The free version of the Team Members plugin is **not limited** and does not contain any ad.
|
17 |
|
18 |
+
The [PRO version](http://wpdarko.com/items/team-members-pro/) gives you access to a lot of new features: New picture on hover, pictures’ shape, enabling/disabling picture borders, picture position It also allows you to show from 1 to 5 members per line, add filters to your pictures, set a color for each member instead of one general color for everybody (good for distinguishing your staff). Two more links can be added to each member.
|
|
|
|
|
|
|
19 |
|
20 |
+
= Available fields =
|
21 |
* Firstname
|
22 |
* Lastname
|
23 |
* Description/bio
|
24 |
* Picture
|
25 |
* Social links (FB, Twitter…)
|
26 |
+
|
27 |
+
= Available settings =
|
28 |
* Number of members to show per line (2, 3, 4)
|
29 |
* Color
|
30 |
|
47 |
|
48 |
== Frequently Asked Questions ==
|
49 |
|
50 |
+
= No limitation for the Free version =
|
51 |
+
The free version of the Team Members plugin is **not limited** and does not contain any ad.
|
52 |
|
53 |
+
The [PRO version](http://wpdarko.com/items/team-members-pro/) gives you access to a lot of new features: New picture on hover, pictures’ shape, enabling/disabling picture borders, picture position It also allows you to show from 1 to 5 members per line, add filters to your pictures, set a color for each member instead of one general color for everybody (good for distinguishing your staff). Two more links can be added to each member.
|
54 |
+
|
55 |
+
= Usage =
|
56 |
+
Go to [the plugin's documentation](http://wpdarko.com/support/documentation/get-started-team-members/) if you need more information on how to use this plugin.
|
57 |
|
58 |
+
= Support =
|
59 |
+
Find help in [our forums](http://wpdarko.com/support/forum/plugins/team-members/) for this plugin (we’ll answer you fast, promise).
|
60 |
|
|
|
61 |
|
62 |
== Screenshots ==
|
63 |
1. Team Members (front view - 3 per line)
|
64 |
2. Team Members (front view - 4 per line)
|
65 |
3. Creating members (admin view)
|
66 |
+
4. Creating members 2 (admin view)
|
67 |
+
5. Team settings (admin view)
|
68 |
+
6. Finding the shortcode (admin view)
|
69 |
|
70 |
== Changelog ==
|
71 |
+
= 2.1 =
|
72 |
+
* SAFE UPDATE: No data loss for those upgrading from version 1.0 or higher
|
73 |
+
* A few layout changes for the admin interface
|
74 |
+
* Added a link for the member’s photo (user request)
|
75 |
+
* Added a hover photo (PRO version only)
|
76 |
+
* Fixed a bug when removing/sorting the members
|
77 |
+
|
78 |
= 2.0.4 =
|
79 |
* SAFE UPDATE: No data loss for those upgrading from version 1.0 or higher
|
80 |
* Added alt attribute to link’s icon
|
tmm.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Team Members
|
4 |
Plugin URI: http://wpdarko.com/support/documentation/get-started-team-members/
|
5 |
Description: A responsive, simple and clean way to display your team. Create new members, add their positions, bios, social links and copy-paste the shortcode into any post/page. Find support and information on the <a href="http://wpdarko.com/team-members/">plugin's page</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='http://wpdarko.com/items/team-members-pro'>PRO version</a> for more great features.
|
6 |
-
Version: 2.
|
7 |
Author: WP Darko
|
8 |
Author URI: http://wpdarko.com
|
9 |
License: GPL2
|
@@ -160,6 +160,14 @@ function tmm_register_group_metabox() {
|
|
160 |
'object_types' => array( 'tmm' ),
|
161 |
));
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
$tmm_group = $main_group->add_field( array(
|
164 |
'id' => $prefix . 'head',
|
165 |
'type' => 'group',
|
@@ -204,17 +212,6 @@ function tmm_register_group_metabox() {
|
|
204 |
'sanitization_cb' => false,
|
205 |
));
|
206 |
|
207 |
-
|
208 |
-
$main_group->add_group_field( $tmm_group, array(
|
209 |
-
'name' => '<span class="dashicons dashicons-format-image"></span> Photo',
|
210 |
-
'id' => $prefix . 'photo',
|
211 |
-
'type' => 'file',
|
212 |
-
'attributes' => array(
|
213 |
-
'placeholder' => 'recommended size: 500 x 500',
|
214 |
-
),
|
215 |
-
'row_classes' => 'de_first de_hundred de_upload de_input',
|
216 |
-
));
|
217 |
-
|
218 |
$main_group->add_group_field( $tmm_group, array(
|
219 |
'name' => '<span class="dashicons dashicons-edit"></span> Description/bio',
|
220 |
'id' => $prefix . 'desc',
|
@@ -253,6 +250,13 @@ function tmm_register_group_metabox() {
|
|
253 |
'sanitization_cb' => false,
|
254 |
));
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
$main_group->add_group_field( $tmm_group, array(
|
257 |
'name' => 'Member links',
|
258 |
'id' => $prefix . 'member_links_header',
|
@@ -264,6 +268,7 @@ function tmm_register_group_metabox() {
|
|
264 |
'name' => '<span class="dashicons dashicons-admin-generic"></span> Link type (icon)',
|
265 |
'id' => $prefix . 'sc_type1',
|
266 |
'type' => 'select',
|
|
|
267 |
'options' => array(
|
268 |
'nada' => '-',
|
269 |
'twitter' => 'Twitter',
|
@@ -277,8 +282,8 @@ function tmm_register_group_metabox() {
|
|
277 |
'website' => 'Website',
|
278 |
'customlink' => 'Other links',
|
279 |
),
|
280 |
-
|
281 |
-
|
282 |
));
|
283 |
|
284 |
$main_group->add_group_field( $tmm_group, array(
|
@@ -289,7 +294,7 @@ function tmm_register_group_metabox() {
|
|
289 |
));
|
290 |
|
291 |
$main_group->add_group_field( $tmm_group, array(
|
292 |
-
'name' => '<span class="dashicons dashicons-
|
293 |
'id' => $prefix . 'sc_url1',
|
294 |
'type' => 'text',
|
295 |
'row_classes' => 'de_fifty de_text de_input',
|
@@ -299,6 +304,7 @@ function tmm_register_group_metabox() {
|
|
299 |
'name' => '',
|
300 |
'id' => $prefix . 'sc_type2',
|
301 |
'type' => 'select',
|
|
|
302 |
'options' => array(
|
303 |
'nada' => '-',
|
304 |
'twitter' => 'Twitter',
|
@@ -312,7 +318,6 @@ function tmm_register_group_metabox() {
|
|
312 |
'website' => 'Website',
|
313 |
'customlink' => 'Other links',
|
314 |
),
|
315 |
-
'default' => 'nada',
|
316 |
'row_classes' => 'de_first de_twentyfive de_select de_text de_input de_nomtop',
|
317 |
));
|
318 |
|
@@ -334,6 +339,7 @@ function tmm_register_group_metabox() {
|
|
334 |
'name' => '',
|
335 |
'id' => $prefix . 'sc_type3',
|
336 |
'type' => 'select',
|
|
|
337 |
'options' => array(
|
338 |
'nada' => '-',
|
339 |
'twitter' => 'Twitter',
|
@@ -347,7 +353,6 @@ function tmm_register_group_metabox() {
|
|
347 |
'website' => 'Website',
|
348 |
'customlink' => 'Other links',
|
349 |
),
|
350 |
-
'default' => 'nada',
|
351 |
'row_classes' => 'de_first de_twentyfive de_select de_text de_input de_nomtop',
|
352 |
));
|
353 |
|
@@ -363,22 +368,54 @@ function tmm_register_group_metabox() {
|
|
363 |
'id' => $prefix . 'sc_url3',
|
364 |
'type' => 'text',
|
365 |
'row_classes' => 'de_fifty de_text de_input de_nomtop',
|
366 |
-
));
|
367 |
|
368 |
$main_group->add_group_field( $tmm_group, array(
|
369 |
-
'name' => 'Member
|
370 |
'id' => $prefix . 'member_styling_header',
|
371 |
'type' => 'title',
|
372 |
'row_classes' => 'de_hundred de_heading',
|
373 |
));
|
374 |
|
375 |
$main_group->add_group_field( $tmm_group, array(
|
376 |
-
'name' => '<span
|
377 |
-
'id'
|
378 |
-
'type' => '
|
379 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
));
|
381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
// Settings group
|
383 |
$side_group = new_cmb2_box( array(
|
384 |
'id' => $prefix . 'settings_head',
|
@@ -559,10 +596,10 @@ function tmm_sc($atts) {
|
|
559 |
"name" => ''
|
560 |
), $atts));
|
561 |
|
562 |
-
query_posts( array( 'post_type' => 'tmm', 'name' => $name, ) );
|
563 |
-
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
564 |
-
|
565 |
global $post;
|
|
|
|
|
|
|
566 |
|
567 |
$members = get_post_meta( get_the_id(), '_tmm_head', true );
|
568 |
$options = get_post_meta( get_the_id(), '_tmm_settings_head', true );
|
@@ -591,8 +628,14 @@ function tmm_sc($atts) {
|
|
591 |
}
|
592 |
|
593 |
$output .= '<div class="tmm_member" style="border-top:'.$tmm_color.' solid 5px;">';
|
594 |
-
if (!empty($member['
|
595 |
-
$output .= '<
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
}
|
597 |
$output .= '<div class="tmm_textblock">';
|
598 |
$output .= '<div class="tmm_names">';
|
@@ -649,6 +692,7 @@ function tmm_sc($atts) {
|
|
649 |
|
650 |
$i++;
|
651 |
|
|
|
652 |
}
|
653 |
|
654 |
$output .= '</div>';
|
@@ -657,7 +701,7 @@ function tmm_sc($atts) {
|
|
657 |
$output .= '</div>';
|
658 |
|
659 |
|
660 |
-
|
661 |
|
662 |
return $output;
|
663 |
|
3 |
Plugin Name: Team Members
|
4 |
Plugin URI: http://wpdarko.com/support/documentation/get-started-team-members/
|
5 |
Description: A responsive, simple and clean way to display your team. Create new members, add their positions, bios, social links and copy-paste the shortcode into any post/page. Find support and information on the <a href="http://wpdarko.com/team-members/">plugin's page</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='http://wpdarko.com/items/team-members-pro'>PRO version</a> for more great features.
|
6 |
+
Version: 2.1
|
7 |
Author: WP Darko
|
8 |
Author URI: http://wpdarko.com
|
9 |
License: GPL2
|
160 |
'object_types' => array( 'tmm' ),
|
161 |
));
|
162 |
|
163 |
+
$main_group->add_field( array(
|
164 |
+
'name' => '<span style="font-weight:400;">Getting started / Instructions</span>',
|
165 |
+
'desc' => 'Edit your members (see below), add more, reorder them and play around with the settings on the right. If you have trouble understanding how this works, click the "Help & Support tab on the right."',
|
166 |
+
'id' => $prefix . 'instructions',
|
167 |
+
'type' => 'title',
|
168 |
+
'row_classes' => 'de_hundred de_instructions',
|
169 |
+
) );
|
170 |
+
|
171 |
$tmm_group = $main_group->add_field( array(
|
172 |
'id' => $prefix . 'head',
|
173 |
'type' => 'group',
|
212 |
'sanitization_cb' => false,
|
213 |
));
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
$main_group->add_group_field( $tmm_group, array(
|
216 |
'name' => '<span class="dashicons dashicons-edit"></span> Description/bio',
|
217 |
'id' => $prefix . 'desc',
|
250 |
'sanitization_cb' => false,
|
251 |
));
|
252 |
|
253 |
+
$main_group->add_group_field( $tmm_group, array(
|
254 |
+
'name' => '<span style="color:#8a7463;"><span class="dashicons dashicons-lock"></span> PRO Color (per member)</span>',
|
255 |
+
'id' => $prefix . 'freecolor',
|
256 |
+
'type' => 'colorpicker',
|
257 |
+
'row_classes' => 'de_first de_hundred de_color de_input',
|
258 |
+
));
|
259 |
+
|
260 |
$main_group->add_group_field( $tmm_group, array(
|
261 |
'name' => 'Member links',
|
262 |
'id' => $prefix . 'member_links_header',
|
268 |
'name' => '<span class="dashicons dashicons-admin-generic"></span> Link type (icon)',
|
269 |
'id' => $prefix . 'sc_type1',
|
270 |
'type' => 'select',
|
271 |
+
'default' => 'nada',
|
272 |
'options' => array(
|
273 |
'nada' => '-',
|
274 |
'twitter' => 'Twitter',
|
282 |
'website' => 'Website',
|
283 |
'customlink' => 'Other links',
|
284 |
),
|
285 |
+
|
286 |
+
'row_classes' => 'de_first de_twentyfive de_select de_text de_input',
|
287 |
));
|
288 |
|
289 |
$main_group->add_group_field( $tmm_group, array(
|
294 |
));
|
295 |
|
296 |
$main_group->add_group_field( $tmm_group, array(
|
297 |
+
'name' => '<span class="dashicons dashicons-admin-links"></span> Link URL',
|
298 |
'id' => $prefix . 'sc_url1',
|
299 |
'type' => 'text',
|
300 |
'row_classes' => 'de_fifty de_text de_input',
|
304 |
'name' => '',
|
305 |
'id' => $prefix . 'sc_type2',
|
306 |
'type' => 'select',
|
307 |
+
'default' => 'nada',
|
308 |
'options' => array(
|
309 |
'nada' => '-',
|
310 |
'twitter' => 'Twitter',
|
318 |
'website' => 'Website',
|
319 |
'customlink' => 'Other links',
|
320 |
),
|
|
|
321 |
'row_classes' => 'de_first de_twentyfive de_select de_text de_input de_nomtop',
|
322 |
));
|
323 |
|
339 |
'name' => '',
|
340 |
'id' => $prefix . 'sc_type3',
|
341 |
'type' => 'select',
|
342 |
+
'default' => 'nada',
|
343 |
'options' => array(
|
344 |
'nada' => '-',
|
345 |
'twitter' => 'Twitter',
|
353 |
'website' => 'Website',
|
354 |
'customlink' => 'Other links',
|
355 |
),
|
|
|
356 |
'row_classes' => 'de_first de_twentyfive de_select de_text de_input de_nomtop',
|
357 |
));
|
358 |
|
368 |
'id' => $prefix . 'sc_url3',
|
369 |
'type' => 'text',
|
370 |
'row_classes' => 'de_fifty de_text de_input de_nomtop',
|
371 |
+
));
|
372 |
|
373 |
$main_group->add_group_field( $tmm_group, array(
|
374 |
+
'name' => 'Member photo',
|
375 |
'id' => $prefix . 'member_styling_header',
|
376 |
'type' => 'title',
|
377 |
'row_classes' => 'de_hundred de_heading',
|
378 |
));
|
379 |
|
380 |
$main_group->add_group_field( $tmm_group, array(
|
381 |
+
'name' => '<span class="dashicons dashicons-format-image"></span> Upload Photo',
|
382 |
+
'id' => $prefix . 'photo',
|
383 |
+
'type' => 'file',
|
384 |
+
'attributes' => array(
|
385 |
+
'placeholder' => 'Recommended size: 250x250px',
|
386 |
+
),
|
387 |
+
'options' => array(
|
388 |
+
'add_upload_file_text' => __( 'Upload', 'jt_cmb2' ),
|
389 |
+
),
|
390 |
+
'row_classes' => 'de_first de_fifty de_upload de_input',
|
391 |
+
));
|
392 |
+
|
393 |
+
$main_group->add_group_field( $tmm_group, array(
|
394 |
+
'name' => '<span style="color:#8a7463;"><span class="dashicons dashicons-lock"></span> PRO Upload hover photo',
|
395 |
+
'desc' => 'Add another photo that will replace the first one on hover.',
|
396 |
+
'id' => $prefix . 'hoverphoto',
|
397 |
+
'type' => 'file',
|
398 |
+
'attributes' => array(
|
399 |
+
'placeholder' => 'Recommended size: 250x250px',
|
400 |
+
),
|
401 |
+
'options' => array(
|
402 |
+
'add_upload_file_text' => __( 'Upload', 'jt_cmb2' ),
|
403 |
+
),
|
404 |
+
'row_classes' => 'de_fifty de_upload de_input',
|
405 |
));
|
406 |
|
407 |
+
$main_group->add_group_field( $tmm_group, array(
|
408 |
+
'name' => '<span class="dashicons dashicons-admin-links"></span> Photo link URL',
|
409 |
+
'desc' => 'If a URL is added here, the member\'s photo will be clickable.',
|
410 |
+
'id' => $prefix . 'photo_url',
|
411 |
+
'type' => 'text',
|
412 |
+
'row_classes' => 'de_first de_hundred de_text de_input de_nomtop',
|
413 |
+
'attributes' => array(
|
414 |
+
'placeholder' => 'http://anything.com',
|
415 |
+
),
|
416 |
+
));
|
417 |
+
|
418 |
+
|
419 |
// Settings group
|
420 |
$side_group = new_cmb2_box( array(
|
421 |
'id' => $prefix . 'settings_head',
|
596 |
"name" => ''
|
597 |
), $atts));
|
598 |
|
|
|
|
|
|
|
599 |
global $post;
|
600 |
+
$args = array('post_type' => 'tmm', 'name' => $name);
|
601 |
+
$custom_posts = get_posts($args);
|
602 |
+
foreach($custom_posts as $post) : setup_postdata($post);
|
603 |
|
604 |
$members = get_post_meta( get_the_id(), '_tmm_head', true );
|
605 |
$options = get_post_meta( get_the_id(), '_tmm_settings_head', true );
|
628 |
}
|
629 |
|
630 |
$output .= '<div class="tmm_member" style="border-top:'.$tmm_color.' solid 5px;">';
|
631 |
+
if (!empty($member['_tmm_photo_url'])){
|
632 |
+
$output .= '<a href="'.$member['_tmm_photo_url'].'" title="'.$member['_tmm_firstname'].' '.$member['_tmm_lastname'].'">';
|
633 |
+
}
|
634 |
+
if (!empty($member['_tmm_photo'])){
|
635 |
+
$output .= '<div class="tmm_photo tmm_phover_'.$name.'_'.$key.'" style="background: url('.$member['_tmm_photo'].'); margin-left: auto; margin-right:auto; background-size:cover !important;"></div>';
|
636 |
+
}
|
637 |
+
if (!empty($member['_tmm_photo_url'])){
|
638 |
+
$output .= '</a>';
|
639 |
}
|
640 |
$output .= '<div class="tmm_textblock">';
|
641 |
$output .= '<div class="tmm_names">';
|
692 |
|
693 |
$i++;
|
694 |
|
695 |
+
|
696 |
}
|
697 |
|
698 |
$output .= '</div>';
|
701 |
$output .= '</div>';
|
702 |
|
703 |
|
704 |
+
endforeach; wp_reset_query();
|
705 |
|
706 |
return $output;
|
707 |
|