Version Description
- Added the ability to set the number of columns from the shortcode
- Updated documentation
- Bug fixes
- Updated Pro version - Now it includes a the Community Hub for the team
Download this release
Release Info
Developer | smartcat |
Plugin | Our Team Showcase |
Version | 4.2.0 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.2.0
- assets/admin/css/admin.css +133 -4
- assets/admin/css/settings.css +6 -3
- assets/fonts/fonts.css +1 -1
- assets/images/doc/manage-members-1.jpg +0 -0
- assets/images/doc/manage-members-2.jpg +0 -0
- assets/images/doc/manage-members-3.jpg +0 -0
- assets/images/doc/ots-widget.jpg +0 -0
- assets/images/doc/portal-1.jpg +0 -0
- assets/images/doc/restrict-posts-1.jpg +0 -0
- assets/images/doc/restrict-posts-2.jpg +0 -0
- assets/images/doc/restrict-posts-3.jpg +0 -0
- assets/images/doc/restrict-posts-4.jpg +0 -0
- assets/js/script.js +20 -15
- constants.php +7 -6
- includes/TeamMainWidget.php +16 -0
- includes/TeamMember.php +45 -0
- includes/add-ons.php +10 -14
- includes/admin-settings.php +36 -0
- includes/documentation.php +219 -7
- includes/helpers.php +36 -5
- includes/team-member.php +846 -0
- includes/team-view.php +2 -0
- our-team-showcase.php +2 -2
- readme.txt +17 -1
- templates/grid-circles-2.php +1 -1
- templates/grid-circles.php +1 -1
- templates/grid.php +1 -1
- uninstall.php +1 -1
- upgrade.php +1 -1
assets/admin/css/admin.css
CHANGED
@@ -10,6 +10,9 @@
|
|
10 |
}
|
11 |
|
12 |
/* edit.php */
|
|
|
|
|
|
|
13 |
|
14 |
.ots-meta-box {
|
15 |
border: none !important;
|
@@ -19,19 +22,80 @@
|
|
19 |
width: 100%;
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
.ots-meta-box input[disabled],
|
|
|
23 |
.ots-meta-box select[disabled],
|
24 |
.ots-meta-box textarea[disabled] {
|
25 |
border: 1px solid #bbb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
.ots-member-skill-rating {
|
29 |
-
width:
|
30 |
-
|
|
|
31 |
}
|
32 |
|
33 |
.ots-member-skill-title {
|
34 |
-
width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
@media ( min-width: 769px ) {
|
@@ -53,8 +117,73 @@
|
|
53 |
width: 70%;
|
54 |
float: right;
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
.ots-pro {
|
59 |
-
color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
10 |
}
|
11 |
|
12 |
/* edit.php */
|
13 |
+
.ots-toggle {
|
14 |
+
margin-bottom: 8px;
|
15 |
+
}
|
16 |
|
17 |
.ots-meta-box {
|
18 |
border: none !important;
|
22 |
width: 100%;
|
23 |
}
|
24 |
|
25 |
+
.ots-meta-box input,
|
26 |
+
.ots-meta-box textarea {
|
27 |
+
border: 1px solid #ddd;
|
28 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
|
29 |
+
padding: 5px 8px;
|
30 |
+
transition: 50ms border-color ease-in-out;
|
31 |
+
}
|
32 |
+
|
33 |
.ots-meta-box input[disabled],
|
34 |
+
.ots-meta-box input[readonly],
|
35 |
.ots-meta-box select[disabled],
|
36 |
.ots-meta-box textarea[disabled] {
|
37 |
border: 1px solid #bbb;
|
38 |
+
background: #fff;
|
39 |
+
}
|
40 |
+
|
41 |
+
.ots-meta-box input[type=checkbox],
|
42 |
+
.ots-meta-box input[type=radio] {
|
43 |
+
margin-top: 4px;
|
44 |
+
}
|
45 |
+
|
46 |
+
div[id^="team-"] .inside {
|
47 |
+
margin: 0 !important;
|
48 |
+
padding: 0 !important;
|
49 |
+
}
|
50 |
+
|
51 |
+
.ots-meta-box tr:nth-child(odd) {
|
52 |
+
background: #fafafa;
|
53 |
+
}
|
54 |
+
|
55 |
+
.ots-meta-box th {
|
56 |
+
font-weight: 500;
|
57 |
+
}
|
58 |
+
|
59 |
+
.ots-meta-box th,
|
60 |
+
.ots-meta-box td {
|
61 |
+
display: block;
|
62 |
+
float: none;
|
63 |
+
padding: 5px 10px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.ots-meta-box tr {
|
67 |
+
border-bottom: 1px solid #ddd !important;
|
68 |
+
display: block;
|
69 |
+
padding: 5px 0;
|
70 |
}
|
71 |
|
72 |
.ots-member-skill-rating {
|
73 |
+
width: 30%;
|
74 |
+
margin-left: 4px;
|
75 |
+
height: 30px !important;
|
76 |
}
|
77 |
|
78 |
.ots-member-skill-title {
|
79 |
+
width: 66%;
|
80 |
+
}
|
81 |
+
|
82 |
+
#ots-member-other-icon {
|
83 |
+
margin-bottom: 10px;
|
84 |
+
}
|
85 |
+
|
86 |
+
#ots-member-other-icon,
|
87 |
+
#ots-member-other {
|
88 |
+
width: 100%;
|
89 |
+
}
|
90 |
+
|
91 |
+
@media ( min-width: 767px ) {
|
92 |
+
|
93 |
+
.ots-meta-box input[type=checkbox],
|
94 |
+
.ots-meta-box input[type=radio] {
|
95 |
+
margin-top: 0;
|
96 |
+
margin-bottom: 2px;
|
97 |
+
}
|
98 |
+
|
99 |
}
|
100 |
|
101 |
@media ( min-width: 769px ) {
|
117 |
width: 70%;
|
118 |
float: right;
|
119 |
}
|
120 |
+
|
121 |
+
.ots-member-skill-rating {
|
122 |
+
width: 32%;
|
123 |
+
}
|
124 |
+
|
125 |
}
|
126 |
|
127 |
.ots-pro {
|
128 |
+
color: #e05555;
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
.switch {
|
133 |
+
position: relative;
|
134 |
+
display: inline-block;
|
135 |
+
width: 50px;
|
136 |
+
height: 23px;
|
137 |
+
margin-right: 10px;
|
138 |
+
float: left;
|
139 |
+
}
|
140 |
+
|
141 |
+
.switch input {
|
142 |
+
display:none;
|
143 |
+
}
|
144 |
+
|
145 |
+
.slider {
|
146 |
+
position: absolute;
|
147 |
+
cursor: pointer;
|
148 |
+
top: 0;
|
149 |
+
left: 0;
|
150 |
+
right: 0;
|
151 |
+
bottom: 0;
|
152 |
+
background-color: #ccc;
|
153 |
+
-webkit-transition: .4s;
|
154 |
+
transition: .4s;
|
155 |
+
}
|
156 |
+
|
157 |
+
.slider:before {
|
158 |
+
position: absolute;
|
159 |
+
content: "";
|
160 |
+
height: 16px;
|
161 |
+
width: 16px;
|
162 |
+
left: 4px;
|
163 |
+
bottom: 4px;
|
164 |
+
background-color: white;
|
165 |
+
-webkit-transition: .4s;
|
166 |
+
transition: .4s;
|
167 |
+
}
|
168 |
+
|
169 |
+
input:checked + .slider {
|
170 |
+
background-color: #2196F3;
|
171 |
+
}
|
172 |
+
|
173 |
+
input:focus + .slider {
|
174 |
+
box-shadow: 0 0 1px #2196F3;
|
175 |
+
}
|
176 |
+
|
177 |
+
input:checked + .slider:before {
|
178 |
+
-webkit-transform: translateX(26px);
|
179 |
+
-ms-transform: translateX(26px);
|
180 |
+
transform: translateX(26px);
|
181 |
+
}
|
182 |
+
|
183 |
+
.slider.round {
|
184 |
+
border-radius: 50px;
|
185 |
+
}
|
186 |
+
|
187 |
+
.slider.round:before {
|
188 |
+
border-radius: 50%;
|
189 |
}
|
assets/admin/css/settings.css
CHANGED
@@ -150,12 +150,15 @@
|
|
150 |
border-radius: 3px;
|
151 |
border: 1px solid #ccc;
|
152 |
padding: 3px 10px;
|
|
|
|
|
|
|
|
|
153 |
line-height: 30px;
|
154 |
}
|
155 |
|
156 |
.ots-admin-page form input:not([type="checkbox"]):not([type="radio"]),
|
157 |
-
.ots-admin-page form select
|
158 |
-
.ots-admin-page form textarea {
|
159 |
height: 30px;
|
160 |
}
|
161 |
|
@@ -442,7 +445,7 @@
|
|
442 |
@media(min-width: 768px) {
|
443 |
|
444 |
.ots-add-ons .ots-add-on {
|
445 |
-
max-width:
|
446 |
float: left;
|
447 |
margin: 0 10px 10px 0;
|
448 |
min-height: 520px;
|
150 |
border-radius: 3px;
|
151 |
border: 1px solid #ccc;
|
152 |
padding: 3px 10px;
|
153 |
+
}
|
154 |
+
|
155 |
+
.ots-admin-page form input,
|
156 |
+
.ots-admin-page form select {
|
157 |
line-height: 30px;
|
158 |
}
|
159 |
|
160 |
.ots-admin-page form input:not([type="checkbox"]):not([type="radio"]),
|
161 |
+
.ots-admin-page form select {
|
|
|
162 |
height: 30px;
|
163 |
}
|
164 |
|
445 |
@media(min-width: 768px) {
|
446 |
|
447 |
.ots-add-ons .ots-add-on {
|
448 |
+
max-width: 800px;
|
449 |
float: left;
|
450 |
margin: 0 10px 10px 0;
|
451 |
min-height: 520px;
|
assets/fonts/fonts.css
CHANGED
@@ -24,4 +24,4 @@
|
|
24 |
url('./lato/lato-regular.woff') format('woff'), /* Modern Browsers */
|
25 |
url('./lato/lato-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
26 |
url('./lato/lato-regular.svg#Lato') format('svg'); /* Legacy iOS */
|
27 |
-
}
|
24 |
url('./lato/lato-regular.woff') format('woff'), /* Modern Browsers */
|
25 |
url('./lato/lato-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
26 |
url('./lato/lato-regular.svg#Lato') format('svg'); /* Legacy iOS */
|
27 |
+
}
|
assets/images/doc/manage-members-1.jpg
ADDED
Binary file
|
assets/images/doc/manage-members-2.jpg
ADDED
Binary file
|
assets/images/doc/manage-members-3.jpg
ADDED
Binary file
|
assets/images/doc/ots-widget.jpg
ADDED
Binary file
|
assets/images/doc/portal-1.jpg
ADDED
Binary file
|
assets/images/doc/restrict-posts-1.jpg
ADDED
Binary file
|
assets/images/doc/restrict-posts-2.jpg
ADDED
Binary file
|
assets/images/doc/restrict-posts-3.jpg
ADDED
Binary file
|
assets/images/doc/restrict-posts-4.jpg
ADDED
Binary file
|
assets/js/script.js
CHANGED
@@ -9,31 +9,36 @@ jQuery(document).ready(function ($) {
|
|
9 |
|
10 |
function do_resize() {
|
11 |
|
12 |
-
|
13 |
-
'#sc_our_team.grid_circles .sc_team_member,' +
|
14 |
-
'#sc_our_team.grid_circles2 .sc_team_member');
|
15 |
|
16 |
-
|
|
|
|
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
21 |
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
|
35 |
});
|
36 |
|
|
|
37 |
}
|
38 |
|
39 |
});
|
9 |
|
10 |
function do_resize() {
|
11 |
|
12 |
+
$('.ots-team-view').each(function (index, el) {
|
|
|
|
|
13 |
|
14 |
+
var members = $(el).find('#sc_our_team.grid .sc_team_member, ' +
|
15 |
+
'#sc_our_team.grid_circles .sc_team_member,' +
|
16 |
+
'#sc_our_team.grid_circles2 .sc_team_member');
|
17 |
|
18 |
+
var member_height = members.width();
|
19 |
+
|
20 |
+
members.each(function (index, el) {
|
21 |
+
$(el).find('.sc_team_member_inner').css({height: member_height});
|
22 |
+
});
|
23 |
|
24 |
|
25 |
+
members.mouseenter(function () {
|
26 |
|
27 |
+
$(this).find('.sc_team_member_overlay').stop(true, false).fadeIn(440);
|
28 |
+
$(this).find('.wp-post-image').addClass('zoomIn');
|
29 |
+
$(this).find('.sc_team_more').addClass('show');
|
30 |
|
31 |
+
}).mouseleave(function () {
|
32 |
|
33 |
+
$(this).find('.sc_team_member_overlay').stop(true, false).fadeOut(440);
|
34 |
+
$(this).find('.wp-post-image').removeClass('zoomIn');
|
35 |
+
$(this).find('.sc_team_more').removeClass('show');
|
36 |
+
|
37 |
+
});
|
38 |
|
39 |
});
|
40 |
|
41 |
+
|
42 |
}
|
43 |
|
44 |
});
|
constants.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace ots;
|
4 |
|
5 |
-
const VERSION = '4.
|
6 |
|
7 |
|
8 |
interface Options {
|
@@ -77,11 +77,11 @@ interface Options {
|
|
77 |
*/
|
78 |
const PLUGIN_VERSION = 'ots-plugin-version';
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
}
|
86 |
|
87 |
interface Defaults {
|
@@ -146,4 +146,5 @@ interface Defaults {
|
|
146 |
*/
|
147 |
const SHOW_SINGLE_SOCIAL = 'on';
|
148 |
|
|
|
149 |
}
|
2 |
|
3 |
namespace ots;
|
4 |
|
5 |
+
const VERSION = '4.2.0';
|
6 |
|
7 |
|
8 |
interface Options {
|
77 |
*/
|
78 |
const PLUGIN_VERSION = 'ots-plugin-version';
|
79 |
|
80 |
+
/**
|
81 |
+
* @since 4.0.0
|
82 |
+
*/
|
83 |
+
const NUKE = 'ots-nuke-install';
|
84 |
+
|
85 |
}
|
86 |
|
87 |
interface Defaults {
|
146 |
*/
|
147 |
const SHOW_SINGLE_SOCIAL = 'on';
|
148 |
|
149 |
+
|
150 |
}
|
includes/TeamMainWidget.php
CHANGED
@@ -32,6 +32,7 @@ class TeamMainWidget extends \WP_Widget {
|
|
32 |
'title' => __( 'Meet Our Team', 'ots' ),
|
33 |
'group' => '',
|
34 |
'limit' => 'all',
|
|
|
35 |
'template' => Defaults::TEMPLATE,
|
36 |
'single_template' => Defaults::SINGLE_TEMPLATE
|
37 |
);
|
@@ -61,6 +62,7 @@ class TeamMainWidget extends \WP_Widget {
|
|
61 |
$title = $new_instance['title'];
|
62 |
$group = $new_instance['group'];
|
63 |
$limit = $new_instance['limit'];
|
|
|
64 |
$template = $new_instance['template'];
|
65 |
$single = $new_instance['single_template'];
|
66 |
|
@@ -74,6 +76,8 @@ class TeamMainWidget extends \WP_Widget {
|
|
74 |
$group_templates = get_templates();
|
75 |
$single_templates = $this->single_templates();
|
76 |
|
|
|
|
|
77 |
$instance['template'] = array_key_exists( $template, $group_templates ) ? $template : Defaults::TEMPLATE;
|
78 |
$instance['single_template'] = array_key_exists( $single, $single_templates ) ? $single : Defaults::SINGLE_TEMPLATE;
|
79 |
|
@@ -209,6 +213,18 @@ class TeamMainWidget extends \WP_Widget {
|
|
209 |
?>
|
210 |
|
211 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
<div class="ots-widget-limit">
|
213 |
<p>
|
214 |
<label for="<?php esc_attr_e( $this->get_field_id( 'limit' ) ); ?>"
|
32 |
'title' => __( 'Meet Our Team', 'ots' ),
|
33 |
'group' => '',
|
34 |
'limit' => 'all',
|
35 |
+
'columns' => Defaults::GRID_COLUMNS,
|
36 |
'template' => Defaults::TEMPLATE,
|
37 |
'single_template' => Defaults::SINGLE_TEMPLATE
|
38 |
);
|
62 |
$title = $new_instance['title'];
|
63 |
$group = $new_instance['group'];
|
64 |
$limit = $new_instance['limit'];
|
65 |
+
$columns = $new_instance['columns'];
|
66 |
$template = $new_instance['template'];
|
67 |
$single = $new_instance['single_template'];
|
68 |
|
76 |
$group_templates = get_templates();
|
77 |
$single_templates = $this->single_templates();
|
78 |
|
79 |
+
$instance['columns'] = absint( $columns ) > 0 ? $columns : Defaults::GRID_COLUMNS;
|
80 |
+
|
81 |
$instance['template'] = array_key_exists( $template, $group_templates ) ? $template : Defaults::TEMPLATE;
|
82 |
$instance['single_template'] = array_key_exists( $single, $single_templates ) ? $single : Defaults::SINGLE_TEMPLATE;
|
83 |
|
213 |
?>
|
214 |
|
215 |
</p>
|
216 |
+
<p>
|
217 |
+
<label for="<?php esc_attr_e( $this->get_field_id( 'columns' ) ); ?>"
|
218 |
+
class="sc_our_team_widget_columns_label">
|
219 |
+
<?php _e( 'Grid Columns', 'ots' ); ?>
|
220 |
+
</label>
|
221 |
+
|
222 |
+
<input class="widefat ots-grid-columns"
|
223 |
+
type="number"
|
224 |
+
id="<?php esc_attr_e( $this->get_field_id( 'columns' ) ); ?>"
|
225 |
+
name="<?php esc_attr_e( $this->get_field_name( 'columns' ) ); ?>"
|
226 |
+
value="<?php echo esc_attr_e( absint( $instance['columns'] ) ); ?>" />
|
227 |
+
</p>
|
228 |
<div class="ots-widget-limit">
|
229 |
<p>
|
230 |
<label for="<?php esc_attr_e( $this->get_field_id( 'limit' ) ); ?>"
|
includes/TeamMember.php
CHANGED
@@ -59,6 +59,51 @@ class TeamMember {
|
|
59 |
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
protected function prefix( $key ) {
|
63 |
return self::$prefix . $key;
|
64 |
}
|
59 |
|
60 |
}
|
61 |
|
62 |
+
public function get_id() {
|
63 |
+
|
64 |
+
return $this->post->ID;
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
public function get_name() {
|
70 |
+
|
71 |
+
return $this->post->post_title;
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
public function get_bio() {
|
77 |
+
|
78 |
+
return $this->post->post_content;
|
79 |
+
|
80 |
+
}
|
81 |
+
|
82 |
+
|
83 |
+
public function get_groups() {
|
84 |
+
|
85 |
+
return get_the_terms( get_post( $this->get_id() ), 'team_member_position' );
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
|
90 |
+
public function in_group( $id ) {
|
91 |
+
|
92 |
+
$groups = $this->get_groups();
|
93 |
+
|
94 |
+
foreach ( $groups as $group ) {
|
95 |
+
|
96 |
+
if ( $group->term_id == $id ) {
|
97 |
+
return true;
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
return false;
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
protected function prefix( $key ) {
|
108 |
return self::$prefix . $key;
|
109 |
}
|
includes/add-ons.php
CHANGED
@@ -69,25 +69,21 @@ function do_addons_page() { ?>
|
|
69 |
<h2 style="display: none"></h2>
|
70 |
|
71 |
<div class="inner">
|
72 |
-
|
73 |
<div class="ots-add-on">
|
74 |
-
<img src="
|
75 |
<h2><?php _e( 'Our Team Showcase Pro', 'ots' ); ?></h2>
|
76 |
-
<p><?php _e( 'Feature-loaded Pro version of Our Team Showcase adds additional professional templates to your Team Showcase, including a Staff Directory, Honeycomb Layout, Carousel, Stacked Layout, as well as 4 impressive Single Member views: Slide-in Side Panel, Single with team sidebar, Popup V-Card and a Custom Page Single View. It also adds new features such as Team Member Skills, Tags/hobbies, Favorite Content and more!', 'ots' ); ?></p>
|
77 |
-
<div class="cta">
|
78 |
-
<a target="_blank" href="http://wordpressteamplugin.com/templates/" class="button button-default"><?php _e( 'View Demo', 'ots' ); ?></a>
|
79 |
-
<a target="_blank" href="https://smartcatdesign.net/downloads/our-team-showcase/" class="button button-primary">Go Pro</a>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
|
83 |
-
|
84 |
-
<
|
85 |
-
<
|
86 |
-
|
87 |
<div class="cta">
|
88 |
-
<a target="_blank" href="http://wordpressteamplugin.com/
|
89 |
-
<a target="_blank" href="https://smartcatdesign.net/downloads/
|
90 |
</div>
|
|
|
91 |
</div>
|
92 |
|
93 |
<div class="clear"></div>
|
69 |
<h2 style="display: none"></h2>
|
70 |
|
71 |
<div class="inner">
|
72 |
+
|
73 |
<div class="ots-add-on">
|
74 |
+
<img src="https://ps.w.org/our-team-enhanced/assets/banner-772x250.jpg" />
|
75 |
<h2><?php _e( 'Our Team Showcase Pro', 'ots' ); ?></h2>
|
76 |
+
<p style="font-size: 16px"><?php _e( 'Feature-loaded Pro version of Our Team Showcase adds additional professional templates to your Team Showcase, including a Staff Directory, Honeycomb Layout, Carousel, Stacked Layout, as well as 4 impressive Single Member views: Slide-in Side Panel, Single with team sidebar, Popup V-Card and a Custom Page Single View. It also adds new features such as Team Member Skills, Tags/hobbies, Favorite Content and more!', 'ots' ); ?></p>
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
|
79 |
+
<h2><?php _e( 'Our Community Hub - Member Login Portal', 'ots' ); ?></h2>
|
80 |
+
<p style="font-size: 16px"><?php _e( 'For a limited time, upgrading to Our Team Showcase Pro comes bundled with <strong class="ots-pro">Our Community Hub add-on for free ($40 value)</strong>. This add-on creates a private login-portal for your team members, and allows you to restrict posts and pages to be accessible only by your community members.') ?></p>
|
81 |
+
|
82 |
<div class="cta">
|
83 |
+
<a target="_blank" href="http://wordpressteamplugin.com/templates/" class="button button-default" style="font-size: 18px;"><?php _e( 'View Demo', 'ots' ); ?></a>
|
84 |
+
<a target="_blank" href="https://smartcatdesign.net/downloads/our-team-showcase/" class="button button-primary" style="font-size: 18px">Go Pro</a>
|
85 |
</div>
|
86 |
+
|
87 |
</div>
|
88 |
|
89 |
<div class="clear"></div>
|
includes/admin-settings.php
CHANGED
@@ -527,10 +527,18 @@ function do_settings_page() {
|
|
527 |
<li><?php _e( 'To display members from a multiple groups, add <code>[our-team group="group1,group2"]</code>', 'ots' ); ?></li>
|
528 |
<li><?php _e( 'To override the template choice from the short-code, add <code>[our-team template="grid"]</code>. <i>Template options include: grid, grid_circles, grid_circles2, carousel, hc and stacked.</i>', 'ots' ); ?></li>
|
529 |
<li><?php _e( 'To override the single template choice from the short-code add <code>[our-team single_template="vcard"]</code>. Alternatively you can set it to panel', 'ots' ); ?></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
530 |
</ul>
|
531 |
</div>
|
532 |
</div>
|
533 |
|
|
|
|
|
534 |
</div>
|
535 |
|
536 |
<div class="clear"></div>
|
@@ -755,3 +763,31 @@ function display_limit_field() {
|
|
755 |
<p class="description"><?php _e( 'The maximum number of members to display', 'ots' ); ?></p>
|
756 |
|
757 |
<?php }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
<li><?php _e( 'To display members from a multiple groups, add <code>[our-team group="group1,group2"]</code>', 'ots' ); ?></li>
|
528 |
<li><?php _e( 'To override the template choice from the short-code, add <code>[our-team template="grid"]</code>. <i>Template options include: grid, grid_circles, grid_circles2, carousel, hc and stacked.</i>', 'ots' ); ?></li>
|
529 |
<li><?php _e( 'To override the single template choice from the short-code add <code>[our-team single_template="vcard"]</code>. Alternatively you can set it to panel', 'ots' ); ?></li>
|
530 |
+
<li><?php _e( 'To override the number of columns from the short-code add <code>[our-team columns="4"]</code>.', 'ots' ); ?></li>
|
531 |
+
<li><?php _e( 'Need more help? Check out the full plugin documentation manual', 'ots' ); ?>
|
532 |
+
<a href="<?php echo admin_url( 'edit.php?post_type=team_member&page=ots-docs' ); ?>">
|
533 |
+
<?php _e( 'Go to documentation', 'ots' ); ?>
|
534 |
+
</a>
|
535 |
+
</li>
|
536 |
</ul>
|
537 |
</div>
|
538 |
</div>
|
539 |
|
540 |
+
<?php do_action( 'ots_admin_sidebar_widgets' ); ?>
|
541 |
+
|
542 |
</div>
|
543 |
|
544 |
<div class="clear"></div>
|
763 |
<p class="description"><?php _e( 'The maximum number of members to display', 'ots' ); ?></p>
|
764 |
|
765 |
<?php }
|
766 |
+
|
767 |
+
|
768 |
+
function settings_toggle( array $args ) {
|
769 |
+
|
770 |
+
$defaults = array(
|
771 |
+
'attrs' => array(),
|
772 |
+
'checked' => false,
|
773 |
+
'label' => '',
|
774 |
+
'slider' => ''
|
775 |
+
);
|
776 |
+
|
777 |
+
$args = wp_parse_args( $args, $defaults );
|
778 |
+
|
779 |
+
echo '<input type="hidden" name="' . esc_attr( $args['name'] ) . '" value="off" />';
|
780 |
+
|
781 |
+
echo '<label class="switch">
|
782 |
+
<input type="checkbox"
|
783 |
+
value="on"
|
784 |
+
name="' . esc_attr( $args['name'] ) . '" ';
|
785 |
+
|
786 |
+
print_attrs( $args['attrs'] );
|
787 |
+
|
788 |
+
checked( 'on', $args['checked'] );
|
789 |
+
|
790 |
+
echo ' /><span class="slider ' . esc_attr( $args['slider'] ) . '"></label> ';
|
791 |
+
echo '<span class="label">' . esc_html( $args['label'] ) . '</span>';
|
792 |
+
|
793 |
+
}
|
includes/documentation.php
CHANGED
@@ -28,6 +28,10 @@ function add_documentation_sections() {
|
|
28 |
add_settings_section( 'templates', __( 'Templates', 'ots' ), '', 'ots-getting-started' );
|
29 |
add_settings_section( 'widgets', __( 'Widgets', 'ots' ), '', 'ots-getting-started' );
|
30 |
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
add_action( 'admin_init', 'ots\add_documentation_sections' );
|
@@ -43,12 +47,23 @@ function add_documentation_fields() {
|
|
43 |
add_settings_field( 'usage', __( 'Usage', 'ots' ), 'ots\doc_usage', 'ots-getting-started', 'plugin-usage' );
|
44 |
add_settings_field( 'templates', __( 'Team View Templates', 'ots' ), 'ots\doc_templates', 'ots-getting-started', 'templates' );
|
45 |
add_settings_field( 'shortcode-templates', __( 'Setting a Template and Using Shortcodes', 'ots' ), 'ots\doc_shortcode_templates', 'ots-getting-started', 'templates' );
|
|
|
46 |
add_settings_field( 'shortcode-ids', __( 'Setting The ID of a Shortcode Instance', 'ots' ), 'ots\doc_shortcode_ids', 'ots-getting-started', 'templates' );
|
47 |
add_settings_field( 'single-templates', __( 'Single Member View Templates', 'ots' ), 'ots\doc_single_templates', 'ots-getting-started', 'templates' );
|
48 |
add_settings_field( 'custom-templates', __( 'Custom Templates - <i class="ots-pro">Pro Version</i>', 'ots' ), 'ots\doc_custom_templates', 'ots-getting-started', 'templates' );
|
49 |
add_settings_field( 'main-widget', __( 'Main Widget', 'ots' ), 'ots\doc_main_widget', 'ots-getting-started', 'widgets' );
|
50 |
add_settings_field( 'sidebar-widget', __( 'Sidebar Widget', 'ots' ), 'ots\doc_sidebar_widget', 'ots-getting-started', 'widgets' );
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
add_action( 'admin_init', 'ots\add_documentation_fields' );
|
@@ -66,7 +81,8 @@ function doc_usage() { ?>
|
|
66 |
</p>
|
67 |
<p>
|
68 |
<?php _e( 'You can also indicate a specific group to display, as well as override the settings for the full team and single member templates through the short-code:', 'ots' ); ?>
|
69 |
-
<
|
|
|
70 |
</p>
|
71 |
<p>
|
72 |
<i>
|
@@ -91,7 +107,7 @@ function doc_templates() { ?>
|
|
91 |
|
92 |
<p>
|
93 |
<?php _e( 'To view the Template options for Our Team Showcase, visit the ', 'ots' ); ?>
|
94 |
-
<a target="_blank" href="
|
95 |
</p>
|
96 |
<p>
|
97 |
<i>
|
@@ -111,7 +127,7 @@ function doc_shortcode_templates() { ?>
|
|
111 |
|
112 |
<p>
|
113 |
<?php _e( 'The default template, "Grid - Boxes", can be changed to one of several other options. Each one will display your team showcase in a different visual arrangement. The template can be changed in the ', 'ots' ); ?>
|
114 |
-
<a
|
115 |
</p>
|
116 |
<p>
|
117 |
<?php _e( 'If you wish to display the Showcase in more than one configuration on the site, you can also modify the short-code to specify a different template for that version of output of the plugin.', 'ots' ); ?>
|
@@ -149,6 +165,18 @@ function doc_shortcode_ids() { ?>
|
|
149 |
|
150 |
<?php }
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
/**
|
154 |
* Render the single templates topic.
|
@@ -171,7 +199,7 @@ function doc_single_templates() { ?>
|
|
171 |
</p>
|
172 |
<p>
|
173 |
<strong>
|
174 |
-
<?php _e( 'Card Popup
|
175 |
</strong>
|
176 |
</p>
|
177 |
<p class="media">
|
@@ -184,7 +212,7 @@ function doc_single_templates() { ?>
|
|
184 |
</p>
|
185 |
<p>
|
186 |
<strong>
|
187 |
-
<?php _e( 'Side Panel
|
188 |
</strong>
|
189 |
</p>
|
190 |
<p class="media">
|
@@ -222,12 +250,18 @@ function doc_custom_templates() { ?>
|
|
222 |
|
223 |
function doc_main_widget() { ?>
|
224 |
|
|
|
|
|
|
|
|
|
225 |
<p>
|
226 |
<?php _e( 'The plugin also includes a widget that can output the same templates as the shortcode in your theme\'s widget areas. Simply go to Appearance - Widgets and find the widget titled "Our Team Widget".', 'ots' ); ?>
|
227 |
</p>
|
228 |
<p>
|
229 |
<?php _e( 'You can drag & drop the widget into any widget placeholder and then configure to your liking.', 'ots' ); ?>
|
230 |
</p>
|
|
|
|
|
231 |
|
232 |
<?php }
|
233 |
|
@@ -248,6 +282,183 @@ function doc_sidebar_widget() { ?>
|
|
248 |
|
249 |
<?php }
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
|
252 |
/**
|
253 |
* Render the documentation page.
|
@@ -257,7 +468,8 @@ function doc_sidebar_widget() { ?>
|
|
257 |
function do_documentation_page() {
|
258 |
|
259 |
$tabs = array(
|
260 |
-
'ots-getting-started' => __( 'Getting Started', 'ots' )
|
|
|
261 |
);
|
262 |
|
263 |
$tabs = apply_filters( 'ots_documentation_tabs', $tabs );
|
@@ -277,7 +489,7 @@ function do_documentation_page() {
|
|
277 |
<div class="inner">
|
278 |
|
279 |
<div class="branding">
|
280 |
-
<img src="<?php echo esc_url( asset( 'images/branding/smartcat-medium.
|
281 |
</div>
|
282 |
|
283 |
<p class="page-title"><?php _e( 'Our Team Showcase', 'ots' ); ?></p>
|
28 |
add_settings_section( 'templates', __( 'Templates', 'ots' ), '', 'ots-getting-started' );
|
29 |
add_settings_section( 'widgets', __( 'Widgets', 'ots' ), '', 'ots-getting-started' );
|
30 |
|
31 |
+
add_settings_section( 'manage-members', __( 'Managing Members', 'ots-pro' ), '', 'ots-portal' );
|
32 |
+
add_settings_section( 'restrict-posts', __( 'Restricting Posts and Pages', 'ots-pro' ), '', 'ots-portal' );
|
33 |
+
add_settings_section( 'portal-usage', __( 'Using the Community Hub', 'ots-pro' ), '', 'ots-portal' );
|
34 |
+
|
35 |
}
|
36 |
|
37 |
add_action( 'admin_init', 'ots\add_documentation_sections' );
|
47 |
add_settings_field( 'usage', __( 'Usage', 'ots' ), 'ots\doc_usage', 'ots-getting-started', 'plugin-usage' );
|
48 |
add_settings_field( 'templates', __( 'Team View Templates', 'ots' ), 'ots\doc_templates', 'ots-getting-started', 'templates' );
|
49 |
add_settings_field( 'shortcode-templates', __( 'Setting a Template and Using Shortcodes', 'ots' ), 'ots\doc_shortcode_templates', 'ots-getting-started', 'templates' );
|
50 |
+
add_settings_field( 'shortcode-columns', __( 'Setting The number of columns Using Shortcodes', 'ots' ), 'ots\doc_shortcode_columns', 'ots-getting-started', 'templates' );
|
51 |
add_settings_field( 'shortcode-ids', __( 'Setting The ID of a Shortcode Instance', 'ots' ), 'ots\doc_shortcode_ids', 'ots-getting-started', 'templates' );
|
52 |
add_settings_field( 'single-templates', __( 'Single Member View Templates', 'ots' ), 'ots\doc_single_templates', 'ots-getting-started', 'templates' );
|
53 |
add_settings_field( 'custom-templates', __( 'Custom Templates - <i class="ots-pro">Pro Version</i>', 'ots' ), 'ots\doc_custom_templates', 'ots-getting-started', 'templates' );
|
54 |
add_settings_field( 'main-widget', __( 'Main Widget', 'ots' ), 'ots\doc_main_widget', 'ots-getting-started', 'widgets' );
|
55 |
add_settings_field( 'sidebar-widget', __( 'Sidebar Widget', 'ots' ), 'ots\doc_sidebar_widget', 'ots-getting-started', 'widgets' );
|
56 |
|
57 |
+
add_settings_field( 'whatis-hub', __( 'What is the Community Hub ?', 'ots-pro' ), 'ots\doc_whatis_hub', 'ots-portal', 'manage-members' );
|
58 |
+
add_settings_field( 'manage-members', __( 'Enable or Disable Community Access', 'ots-pro' ), 'ots\doc_manage_members', 'ots-portal', 'manage-members' );
|
59 |
+
add_settings_field( 'redirect-posts', __( 'Redirecting Users From Restricted Content', 'ots-pro' ), 'ots\doc_redirect_posts', 'ots-portal', 'restrict-posts' );
|
60 |
+
add_settings_field( 'restrict-posts', __( 'Restricting Posts and Pages to Members Only', 'ots-pro' ), 'ots\doc_restrict_posts', 'ots-portal', 'restrict-posts' );
|
61 |
+
add_settings_field( 'restrict-groups', __( 'Restricting Posts and Pages by Group', 'ots-pro' ), 'ots\doc_restrict_groups', 'ots-portal', 'restrict-posts' );
|
62 |
+
add_settings_field( 'portal-overview', __( 'Community Hub Overview', 'ots-pro' ), 'ots\doc_portal_overview', 'ots-portal', 'portal-usage' );
|
63 |
+
add_settings_field( 'editing-profile', __( 'Editing Your Profile', 'ots-pro' ), 'ots\doc_editing_profile', 'ots-portal', 'portal-usage' );
|
64 |
+
add_settings_field( 'viewing-profile', __( 'Viewing Others Profiles', 'ots-pro' ), 'ots\doc_viewing_profile', 'ots-portal', 'portal-usage' );
|
65 |
+
add_settings_field( 'reset-password', __( 'Resetting Your Password', 'ots-pro' ), 'ots\doc_reset_password', 'ots-portal', 'portal-usage' );
|
66 |
+
|
67 |
}
|
68 |
|
69 |
add_action( 'admin_init', 'ots\add_documentation_fields' );
|
81 |
</p>
|
82 |
<p>
|
83 |
<?php _e( 'You can also indicate a specific group to display, as well as override the settings for the full team and single member templates through the short-code:', 'ots' ); ?>
|
84 |
+
<br>
|
85 |
+
<code>[our-team group="slug" template="grid" single_template="panel" columns="3"]</code>
|
86 |
</p>
|
87 |
<p>
|
88 |
<i>
|
107 |
|
108 |
<p>
|
109 |
<?php _e( 'To view the Template options for Our Team Showcase, visit the ', 'ots' ); ?>
|
110 |
+
<a target="_blank" href="http://wordpressteamplugin.com/templates/"><?php _e( 'Our Team Showcase Demo Page', 'ots' ); ?></a>.
|
111 |
</p>
|
112 |
<p>
|
113 |
<i>
|
127 |
|
128 |
<p>
|
129 |
<?php _e( 'The default template, "Grid - Boxes", can be changed to one of several other options. Each one will display your team showcase in a different visual arrangement. The template can be changed in the ', 'ots' ); ?>
|
130 |
+
<a href="<?php menu_page_url( 'ots-settings' ); ?>"><?php _e( 'plugin settings', 'ots' ); ?></a>.
|
131 |
</p>
|
132 |
<p>
|
133 |
<?php _e( 'If you wish to display the Showcase in more than one configuration on the site, you can also modify the short-code to specify a different template for that version of output of the plugin.', 'ots' ); ?>
|
165 |
|
166 |
<?php }
|
167 |
|
168 |
+
function doc_shortcode_columns() { ?>
|
169 |
+
|
170 |
+
<p>
|
171 |
+
<?php _e( 'You can set the number of columns from the settings page of the plugin, alternatively, you can also set it from the shortcode directly.', 'ots' ); ?>
|
172 |
+
</p>
|
173 |
+
|
174 |
+
<p>
|
175 |
+
<code>[our-team template="grid3" columns="4"]</code>
|
176 |
+
</p>
|
177 |
+
|
178 |
+
<?php }
|
179 |
+
|
180 |
|
181 |
/**
|
182 |
* Render the single templates topic.
|
199 |
</p>
|
200 |
<p>
|
201 |
<strong>
|
202 |
+
<?php _e( 'Card Popup <code>[our-team single_template="vcard"]</code>', 'ots' ); ?> - <i class="ots-pro"><?php _e( 'Pro Version', 'ots' ); ?></i>
|
203 |
</strong>
|
204 |
</p>
|
205 |
<p class="media">
|
212 |
</p>
|
213 |
<p>
|
214 |
<strong>
|
215 |
+
<?php _e( 'Side Panel <code>[our-team single_template="panel"]</code>', 'ots' ); ?> - <i class="ots-pro"><?php _e( 'Pro Version', 'ots' ); ?></i>
|
216 |
</strong>
|
217 |
</p>
|
218 |
<p class="media">
|
250 |
|
251 |
function doc_main_widget() { ?>
|
252 |
|
253 |
+
<p class="alignright">
|
254 |
+
<img src="<?php echo esc_url( asset( 'images/doc/ots-widget.jpg' ) ); ?>"/>
|
255 |
+
</p>
|
256 |
+
|
257 |
<p>
|
258 |
<?php _e( 'The plugin also includes a widget that can output the same templates as the shortcode in your theme\'s widget areas. Simply go to Appearance - Widgets and find the widget titled "Our Team Widget".', 'ots' ); ?>
|
259 |
</p>
|
260 |
<p>
|
261 |
<?php _e( 'You can drag & drop the widget into any widget placeholder and then configure to your liking.', 'ots' ); ?>
|
262 |
</p>
|
263 |
+
|
264 |
+
|
265 |
|
266 |
<?php }
|
267 |
|
282 |
|
283 |
<?php }
|
284 |
|
285 |
+
function doc_whatis_hub() { ?>
|
286 |
+
|
287 |
+
<p>
|
288 |
+
<?php _e( 'Our Community Hub is an add-on for Our Team Showcase, which creates a private, password-protected area on your site that can be only accessed by your team members.', 'ots' ); ?>
|
289 |
+
</p>
|
290 |
+
|
291 |
+
<p>
|
292 |
+
<?php _e( 'Allow your team members to <strong>login and update</strong> their own user profiles', 'ots' ); ?><br>
|
293 |
+
<?php _e( 'Secure posts and pages so that they can only be accessed by your team members', 'ots' ); ?> <br>
|
294 |
+
<?php _e( 'A social hub for your company where you can share news, events and updates', 'ots' ); ?> <br>
|
295 |
+
|
296 |
+
</p>
|
297 |
+
<h2><?php _e( 'Our Community Hub creates a private, password-protected area on your site, where team members can login, view protected posts & pages, write comments, "like" and "favorite" content.' ); ?></h2>
|
298 |
+
|
299 |
+
<br>
|
300 |
+
|
301 |
+
<p class="media">
|
302 |
+
<img src="<?php echo esc_url( asset( 'images/doc/portal-1.jpg' ) ); ?>"/>
|
303 |
+
</p>
|
304 |
+
|
305 |
+
|
306 |
+
<?php }
|
307 |
+
|
308 |
+
function doc_manage_members() { ?>
|
309 |
+
|
310 |
+
<div>
|
311 |
+
<p>
|
312 |
+
<?php _e( 'Member Portal access can be enabled or disabled for each team member with the Member Portal meta box. Once enabled, they will be able to log in and start using the portal.', 'ots' ); ?>
|
313 |
+
</p>
|
314 |
+
<p class="media">
|
315 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/manage-members-1.jpg' ) ); ?>">
|
316 |
+
<img src="<?php echo esc_url( asset( 'images/doc/manage-members-1.jpg' ) ); ?>">
|
317 |
+
</a>
|
318 |
+
</p>
|
319 |
+
<p>
|
320 |
+
<?php _e( 'Each members status will display in the <i>Portal Status</i> column the Team Members list table for easy viewing.', 'ots' ); ?>
|
321 |
+
</p>
|
322 |
+
<p class="media">
|
323 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/manage-members-2.jpg' ) ); ?>">
|
324 |
+
<img src="<?php echo esc_url( asset( 'images/doc/manage-members-2.jpg' ) ); ?>">
|
325 |
+
</a>
|
326 |
+
</p>
|
327 |
+
<p>
|
328 |
+
<?php _e( 'The <i>Team Portal</i> widget in the plugin settings page will display helpful information about the status of your member portal. Here you also have the option to enable portal access for all members.', 'ots' ); ?>
|
329 |
+
</p>
|
330 |
+
<p>
|
331 |
+
<i>
|
332 |
+
<?php _e( 'Note: When bulk enabling access, all newly activated members will have a new password auto generated and sent to their contact email address', 'ots' ); ?>
|
333 |
+
</i>
|
334 |
+
</p>
|
335 |
+
<p class="media">
|
336 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/manage-members-3.jpg' ) ); ?>">
|
337 |
+
<img src="<?php echo esc_url( asset( 'images/doc/manage-members-3.jpg' ) ); ?>">
|
338 |
+
</a>
|
339 |
+
</p>
|
340 |
+
</div>
|
341 |
+
|
342 |
+
<?php }
|
343 |
+
|
344 |
+
|
345 |
+
function doc_redirect_posts() { ?>
|
346 |
+
|
347 |
+
<div>
|
348 |
+
<p>
|
349 |
+
<?php _e( 'If a user does not have sufficient privileges to view a particular post or page, you can customize the page that they will be redirected to, each can be overridden on a post level.', 'ots' ); ?>
|
350 |
+
</p>
|
351 |
+
<p class="media">
|
352 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/restrict-posts-1.jpg' ) ); ?>">
|
353 |
+
<img src="<?php echo esc_url( asset( 'images/doc/restrict-posts-1.jpg' ) ); ?>">
|
354 |
+
</a>
|
355 |
+
</p>
|
356 |
+
</div>
|
357 |
+
|
358 |
+
<?php }
|
359 |
+
|
360 |
+
|
361 |
+
function doc_restrict_posts() { ?>
|
362 |
+
|
363 |
+
<div>
|
364 |
+
<p>
|
365 |
+
<?php _e( 'In the <i>Member Portal Restriction</i> meta box you can control who can see a post or page.', 'ots' ); ?>
|
366 |
+
</p>
|
367 |
+
<p>
|
368 |
+
<?php _e( 'Restricting a post to <strong>All logged in members</strong> under Access will cause the post to no longer be public and only viewable only by members who are logged in.', 'ots' ); ?>
|
369 |
+
</p>
|
370 |
+
<p class="media">
|
371 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/restrict-posts-2.jpg' ) ); ?>">
|
372 |
+
<img src="<?php echo esc_url( asset( 'images/doc/restrict-posts-2.jpg' ) ); ?>">
|
373 |
+
</a>
|
374 |
+
</p>
|
375 |
+
</div>
|
376 |
+
|
377 |
+
<?php }
|
378 |
+
|
379 |
+
|
380 |
+
function doc_restrict_groups() { ?>
|
381 |
+
|
382 |
+
<div>
|
383 |
+
<p>
|
384 |
+
<?php _e( 'Posts and Pages can also be restricted to one or more groups so that only members of those groups will be able to view them.', 'ots' ); ?>
|
385 |
+
</p>
|
386 |
+
<p class="media">
|
387 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/restrict-posts-3.jpg' ) ); ?>">
|
388 |
+
<img src="<?php echo esc_url( asset( 'images/doc/restrict-posts-3.jpg' ) ); ?>">
|
389 |
+
</a>
|
390 |
+
</p>
|
391 |
+
<p>
|
392 |
+
<?php _e( 'The <strong>Portal Status</strong> of each post is also conveniently viewable in the Posts list table.', 'ots' ); ?>
|
393 |
+
</p>
|
394 |
+
<p class="media">
|
395 |
+
<a target="_blank" href="<?php echo esc_url( asset( 'images/doc/restrict-posts-4.jpg' ) ); ?>">
|
396 |
+
<img src="<?php echo esc_url( asset( 'images/doc/restrict-posts-4.jpg' ) ); ?>">
|
397 |
+
</a>
|
398 |
+
</p>
|
399 |
+
</div>
|
400 |
+
|
401 |
+
<?php }
|
402 |
+
|
403 |
+
|
404 |
+
function doc_reset_password() { ?>
|
405 |
+
|
406 |
+
<p>
|
407 |
+
<?php _e( 'If a user has forgotten or lost their password, they can request a new one by selecting the <strong>Forgot Password</strong> link on the login page. A new password will be automatically be generated and sent to their contact email.', 'ots' ); ?>
|
408 |
+
</p>
|
409 |
+
|
410 |
+
<?php }
|
411 |
+
|
412 |
+
function doc_portal_overview() { ?>
|
413 |
+
|
414 |
+
<div>
|
415 |
+
<p><?php _e( 'On the portal homepage, members can view previews of recent posts which they can like or comment on. The sidebar contains a list of all pages that the user can access from within the portal and a list of members who are in the same group.', 'ots' ); ?></p>
|
416 |
+
<p class="media">
|
417 |
+
<img> <code>portal home screenshot</code>
|
418 |
+
</p>
|
419 |
+
<p>
|
420 |
+
<?php _e( 'Users can also click into each post to read the full content and if it is the first time a user is viewing the post, the number of views will be incremented.', 'ots' ); ?>
|
421 |
+
</p>
|
422 |
+
<p>
|
423 |
+
<i><?php _e( 'Tip: Hover over a post\'s views or likes to see which members have viewed or liked the post.', 'ots' ); ?></i>
|
424 |
+
</p>
|
425 |
+
<p class="media">
|
426 |
+
<img> <code>screenshot of likes & views tooltip</code>
|
427 |
+
</p>
|
428 |
+
<p><?php _e( 'Members can navigate through the portal using the slide-out navigation menu which provides quick links back to the portal home, the user\'s profile page and to log out of the portal.', 'ots' ); ?></p>
|
429 |
+
<p class="media">
|
430 |
+
<img> <code>screenshot of nav drawer</code>
|
431 |
+
</p>
|
432 |
+
</div>
|
433 |
+
|
434 |
+
<?php }
|
435 |
+
|
436 |
+
|
437 |
+
function doc_editing_profile() { ?>
|
438 |
+
|
439 |
+
<div>
|
440 |
+
<p><?php _e( 'On the edit profile page users have the ability to update all aspects of their profile including their name, bio and contact information. Users can also change their password and set their profile image and cover photo.', 'ots' ); ?></p>
|
441 |
+
<p>
|
442 |
+
<i><?php _e( 'Note: Changes made here will also be reflected on the public site.', 'ots' ); ?></i>
|
443 |
+
</p>
|
444 |
+
<p class="media">
|
445 |
+
<img> <code>screenshot of profile edit page</code>
|
446 |
+
</p>
|
447 |
+
</div>
|
448 |
+
|
449 |
+
<?php }
|
450 |
+
|
451 |
+
function doc_viewing_profile() { ?>
|
452 |
+
|
453 |
+
<div>
|
454 |
+
<p><?php _e( 'When logged into the portal, users will be able to see a customized version of the single Team Member template that integrates with the team portal\'s appearance.', 'ots' ); ?></p>
|
455 |
+
<p class="media">
|
456 |
+
<img> <code>screenshot of team member page</code>
|
457 |
+
</p>
|
458 |
+
</div>
|
459 |
+
|
460 |
+
<?php }
|
461 |
+
|
462 |
|
463 |
/**
|
464 |
* Render the documentation page.
|
468 |
function do_documentation_page() {
|
469 |
|
470 |
$tabs = array(
|
471 |
+
'ots-getting-started' => __( 'Getting Started', 'ots' ),
|
472 |
+
'ots-portal' => __( 'Community Hub', 'ots-pro' )
|
473 |
);
|
474 |
|
475 |
$tabs = apply_filters( 'ots_documentation_tabs', $tabs );
|
489 |
<div class="inner">
|
490 |
|
491 |
<div class="branding">
|
492 |
+
<img src="<?php echo esc_url( asset( 'images/branding/smartcat-medium.jpg' ) ); ?>" />
|
493 |
</div>
|
494 |
|
495 |
<p class="page-title"><?php _e( 'Our Team Showcase', 'ots' ); ?></p>
|
includes/helpers.php
CHANGED
@@ -5,15 +5,16 @@ namespace ots;
|
|
5 |
/**
|
6 |
* Convenience method to generate a dropdown of posts.
|
7 |
*
|
8 |
-
* @param
|
9 |
-
* @param string
|
10 |
-
* @param string
|
|
|
11 |
* @since 4.0.0
|
12 |
*/
|
13 |
-
function posts_dropdown( $name, $id = '', $selected = '' ) {
|
14 |
|
15 |
$posts = get_posts( array(
|
16 |
-
'post_type' =>
|
17 |
'posts_per_page' => -1
|
18 |
) );
|
19 |
|
@@ -128,3 +129,33 @@ function do_member_social_links( \WP_Post $member = null, $before ='', $after =
|
|
128 |
echo apply_filters( 'ots_parse_social_links', $rendered, $member );
|
129 |
|
130 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
/**
|
6 |
* Convenience method to generate a dropdown of posts.
|
7 |
*
|
8 |
+
* @param $name
|
9 |
+
* @param string $id
|
10 |
+
* @param string $selected
|
11 |
+
* @param string|array $post_type
|
12 |
* @since 4.0.0
|
13 |
*/
|
14 |
+
function posts_dropdown( $name, $id = '', $selected = '', $post_type = 'post' ) {
|
15 |
|
16 |
$posts = get_posts( array(
|
17 |
+
'post_type' => $post_type,
|
18 |
'posts_per_page' => -1
|
19 |
) );
|
20 |
|
129 |
echo apply_filters( 'ots_parse_social_links', $rendered, $member );
|
130 |
|
131 |
}
|
132 |
+
|
133 |
+
|
134 |
+
function member_groups( $member = null, $separator = ' - ', $echo = true ) {
|
135 |
+
|
136 |
+
$member = team_member( $member );
|
137 |
+
$str = '';
|
138 |
+
|
139 |
+
if ( $member ) {
|
140 |
+
|
141 |
+
$groups = $member->get_groups();
|
142 |
+
|
143 |
+
if ( !empty( $groups ) ) {
|
144 |
+
|
145 |
+
foreach ( $groups as $group ) {
|
146 |
+
$str .= $group->name . $separator;
|
147 |
+
}
|
148 |
+
|
149 |
+
$str = rtrim( $str, $separator );
|
150 |
+
|
151 |
+
if ( $echo ) {
|
152 |
+
esc_html_e( $str );
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
return $str;
|
160 |
+
|
161 |
+
}
|
includes/team-member.php
ADDED
@@ -0,0 +1,846 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ots;
|
4 |
+
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Enqueue scripts for single.php.
|
8 |
+
*
|
9 |
+
* @since 4.0.0
|
10 |
+
*/
|
11 |
+
function enqueue_single_scripts() {
|
12 |
+
|
13 |
+
if( get_post_type() == 'team_member' ) {
|
14 |
+
wp_enqueue_style( 'ots-single' );
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action( 'wp_enqueue_scripts', 'ots\enqueue_single_scripts' );
|
20 |
+
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Manually override the theme's template.
|
24 |
+
*
|
25 |
+
* @param $template
|
26 |
+
* @return string
|
27 |
+
* @since 4.0.0
|
28 |
+
*/
|
29 |
+
function include_single_template( $template ) {
|
30 |
+
|
31 |
+
if ( is_single() && get_post_type() == 'team_member' ) {
|
32 |
+
|
33 |
+
// Pull in the template
|
34 |
+
if( override_theme_template() ) {
|
35 |
+
$template = locate_template( 'single.php' );
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
return $template;
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
add_filter( 'template_include', 'ots\include_single_template' );
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Override the default single-team_member template used by themes to avoid breakage.
|
49 |
+
*
|
50 |
+
* @return bool
|
51 |
+
* @since 4.0.0
|
52 |
+
*/
|
53 |
+
function override_theme_template() {
|
54 |
+
|
55 |
+
$template = get_option( Options::SINGLE_TEMPLATE );
|
56 |
+
|
57 |
+
return ( $template === 'standard' || !template_path( $template ) ) &&
|
58 |
+
file_exists( get_template_directory() . '/single-team_member.php' );
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Register the team member custom post type.
|
65 |
+
*
|
66 |
+
* @since 4.0.0
|
67 |
+
*/
|
68 |
+
function register_team_member_post_type() {
|
69 |
+
|
70 |
+
$labels = array(
|
71 |
+
'name' => _x( 'Team Members', 'post type general name', 'ots' ),
|
72 |
+
'singular_name' => _x( 'Team Member', 'post type singular name', 'ots' ),
|
73 |
+
'menu_name' => _x( 'Team', 'admin menu', 'ots' ),
|
74 |
+
'name_admin_bar' => _x( 'Team Member', 'add new on admin bar', 'ots' ),
|
75 |
+
'add_new' => _x( 'Add New', 'team_member', 'ots' ),
|
76 |
+
'add_new_item' => __( 'Add New Member', 'ots' ),
|
77 |
+
'new_item' => __( 'New Member', 'ots' ),
|
78 |
+
'edit_item' => __( 'Edit Member', 'ots' ),
|
79 |
+
'view_item' => __( 'View Member', 'ots' ),
|
80 |
+
'all_items' => __( 'All Members', 'ots' ),
|
81 |
+
'search_items' => __( 'Search Members', 'ots' ),
|
82 |
+
'parent_item_colon' => __( 'Parent Members:', 'ots' ),
|
83 |
+
'not_found' => __( 'No members found.', 'ots' ),
|
84 |
+
'not_found_in_trash' => __( 'No members found in Trash.', 'ots' ),
|
85 |
+
'archives' => __( 'Member Archives', 'ots' ),
|
86 |
+
'attributes' => __( 'Member Attributes', 'ots' ),
|
87 |
+
|
88 |
+
);
|
89 |
+
|
90 |
+
$args = array(
|
91 |
+
'menu_icon' => 'dashicons-admin-users',
|
92 |
+
'labels' => $labels,
|
93 |
+
'capability_type' => 'post',
|
94 |
+
'register_meta_box_cb' => 'ots\team_member_meta_boxes',
|
95 |
+
'supports' => array( 'title', 'editor', 'thumbnail' ),
|
96 |
+
'public' => true,
|
97 |
+
'rewrite' => array(
|
98 |
+
'slug' => get_option( Options::REWRITE_SLUG )
|
99 |
+
)
|
100 |
+
);
|
101 |
+
|
102 |
+
register_post_type( 'team_member', $args );
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
add_action( 'init', 'ots\register_team_member_post_type' );
|
107 |
+
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Register the member grouping taxonomy.
|
111 |
+
*
|
112 |
+
* @since 4.0.0
|
113 |
+
*/
|
114 |
+
function register_team_member_position_taxonomy() {
|
115 |
+
|
116 |
+
$labels = array(
|
117 |
+
'name' => _x( 'Groups', 'taxonomy general name', 'ots' ),
|
118 |
+
'singular_name' => _x( 'Group', 'taxonomy singular name', 'ots' ),
|
119 |
+
'search_items' => __( 'Search Groups', 'ots' ),
|
120 |
+
'all_items' => __( 'All Groups', 'ots' ),
|
121 |
+
'parent_item' => __( 'Parent Group', 'ots' ),
|
122 |
+
'parent_item_colon' => __( 'Parent Group:', 'ots' ),
|
123 |
+
'edit_item' => __( 'Edit Group', 'ots' ),
|
124 |
+
'update_item' => __( 'Update Group', 'ots' ),
|
125 |
+
'add_new_item' => __( 'Add New Group', 'ots' ),
|
126 |
+
'new_item_name' => __( 'New Group', 'ots' ),
|
127 |
+
'menu_name' => __( 'Groups', 'ots' ),
|
128 |
+
);
|
129 |
+
|
130 |
+
$args = array(
|
131 |
+
'labels' => $labels,
|
132 |
+
'hierarchical' => true,
|
133 |
+
);
|
134 |
+
|
135 |
+
register_taxonomy( 'team_member_position', 'team_member', $args );
|
136 |
+
}
|
137 |
+
|
138 |
+
add_action( 'init', 'ots\register_team_member_position_taxonomy' );
|
139 |
+
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Add custom columns to the team member posts table.
|
143 |
+
*
|
144 |
+
* @param $columns
|
145 |
+
* @return mixed
|
146 |
+
* @since 4.0.0
|
147 |
+
*/
|
148 |
+
function add_team_member_custom_columns( $columns ) {
|
149 |
+
|
150 |
+
unset( $columns['date'] );
|
151 |
+
|
152 |
+
$columns['title'] = __( 'Name', 'ots' );
|
153 |
+
$columns['team_member_title'] = __( 'Job Title', 'ots' );
|
154 |
+
$columns['team_member_group'] = __( 'Groups', 'ots' );
|
155 |
+
$columns['team_member_image'] = __( 'Image', 'ots' );
|
156 |
+
|
157 |
+
return $columns;
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
add_filter( 'manage_edit-team_member_columns', 'ots\add_team_member_custom_columns' );
|
162 |
+
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Output custom columns in the team member posts table.
|
166 |
+
*
|
167 |
+
* @param $column
|
168 |
+
* @param $post_id
|
169 |
+
* @since 4.0.0
|
170 |
+
*/
|
171 |
+
function do_team_member_custom_columns( $column, $post_id ) {
|
172 |
+
|
173 |
+
switch( $column ) {
|
174 |
+
|
175 |
+
case 'team_member_title' :
|
176 |
+
echo get_post_meta( $post_id, 'team_member_title', true ) ?: '-';
|
177 |
+
break;
|
178 |
+
|
179 |
+
case 'team_member_image' :
|
180 |
+
echo member_avatar( $post_id, array( 50, 50 ) );
|
181 |
+
break;
|
182 |
+
|
183 |
+
case 'team_member_group':
|
184 |
+
|
185 |
+
$groups = get_the_terms( get_post( $post_id ), 'team_member_position' );
|
186 |
+
|
187 |
+
if ( !empty( $groups ) ) {
|
188 |
+
|
189 |
+
$str = '';
|
190 |
+
|
191 |
+
foreach ( $groups as $group ) {
|
192 |
+
$str .= "$group->name - ";
|
193 |
+
}
|
194 |
+
|
195 |
+
echo rtrim( $str, ' - ' );
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
break;
|
200 |
+
|
201 |
+
}
|
202 |
+
|
203 |
+
}
|
204 |
+
|
205 |
+
add_action( 'manage_team_member_posts_custom_column', 'ots\do_team_member_custom_columns', 10, 2 );
|
206 |
+
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Append articles and social links when using single.php.
|
210 |
+
*
|
211 |
+
* @param $content
|
212 |
+
* @return string
|
213 |
+
* @since 4.0.0
|
214 |
+
*/
|
215 |
+
function single_member_content( $content ) {
|
216 |
+
|
217 |
+
// Use {} to prevent whitespace leaks after headers have been sent
|
218 |
+
if ( is_single() && get_post_type() == 'team_member' &&
|
219 |
+
get_option( Options::SINGLE_TEMPLATE ) == 'standard' ) { ob_start(); ?>
|
220 |
+
|
221 |
+
<div id="sc_our_team">
|
222 |
+
|
223 |
+
<div class="sc_team_member">
|
224 |
+
|
225 |
+
<?php echo $content; ?>
|
226 |
+
|
227 |
+
<?php if ( get_option( Options::SHOW_SINGLE_SOCIAL ) == 'on' ) : ?>
|
228 |
+
|
229 |
+
<div class="icons"><?php do_member_social_links(); ?></div>
|
230 |
+
|
231 |
+
<?php endif; ?>
|
232 |
+
|
233 |
+
<hr>
|
234 |
+
|
235 |
+
<?php if ( get_post_meta( get_the_ID(), 'team_member_article_bool', true ) === 'on' ) : ?>
|
236 |
+
|
237 |
+
<div class="sc_team_posts sc_team_post">
|
238 |
+
|
239 |
+
<h3 class="skills-title"><?php esc_attr_e( get_post_meta( get_the_ID(), 'team_member_article_title', true ) ); ?></h3>
|
240 |
+
|
241 |
+
<div class="sc-team-member-posts">
|
242 |
+
|
243 |
+
<?php foreach ( get_member_articles() as $article ) : ?>
|
244 |
+
|
245 |
+
<div class="sc-team-member-post">
|
246 |
+
|
247 |
+
<div class="width25 left">
|
248 |
+
|
249 |
+
<a href="<?php the_permalink( $article ); ?>"><?php echo get_the_post_thumbnail( $article, 'medium' ); ?></a>
|
250 |
+
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<div class="width75 left">
|
254 |
+
|
255 |
+
<a href="<?php the_permalink( $article ); ?>"><?php echo get_the_title( $article ); ?></a>
|
256 |
+
|
257 |
+
</div>
|
258 |
+
|
259 |
+
<div class="clear"></div>
|
260 |
+
|
261 |
+
</div>
|
262 |
+
|
263 |
+
<?php endforeach; ?>
|
264 |
+
|
265 |
+
</div>
|
266 |
+
|
267 |
+
<div class="clear"></div>
|
268 |
+
|
269 |
+
</div>
|
270 |
+
|
271 |
+
<?php endif; ?>
|
272 |
+
|
273 |
+
</div>
|
274 |
+
|
275 |
+
</div>
|
276 |
+
|
277 |
+
<?php $content = ob_get_clean();
|
278 |
+
|
279 |
+
}
|
280 |
+
|
281 |
+
return $content;
|
282 |
+
|
283 |
+
}
|
284 |
+
|
285 |
+
add_filter( 'the_content', 'ots\single_member_content' );
|
286 |
+
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Renders the member custom post type metabox fields.
|
290 |
+
*
|
291 |
+
* @since 4.0.0
|
292 |
+
*/
|
293 |
+
function team_member_meta_boxes() {
|
294 |
+
|
295 |
+
if( is_admin() ) {
|
296 |
+
|
297 |
+
$preview = apply_filters( 'ots_enable_pro_preview', true );
|
298 |
+
|
299 |
+
add_meta_box( 'team-member-contact', __( 'Contact Information', 'ots' ), 'ots\do_contact_meta_box' );
|
300 |
+
add_meta_box( 'team-member-articles', __( 'Authored / Favorite Articles', 'ots' ), 'ots\do_articles_meta_box' );
|
301 |
+
|
302 |
+
add_meta_box( 'team-member-skills', __( 'Attributes / Skills / Ratings' . ( $preview ? ' - <i class="ots-pro">Pro version only</i>' : '' ), 'ots' ), 'ots\do_skills_meta_box', null, 'advanced', 'default', array( 'preview' => $preview ) );
|
303 |
+
add_meta_box( 'team-member-tags', __( 'Interests / Tags / Additional Skills' . ( $preview ? ' - <i class="ots-pro">Pro version only</i>' : '' ), 'ots' ), 'ots\do_tags_meta_box', null, 'advanced', 'default', array( 'preview' => $preview ) );
|
304 |
+
|
305 |
+
}
|
306 |
+
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Add default meta keys when creating a new team member.
|
311 |
+
*
|
312 |
+
* @param $post_id
|
313 |
+
* @param $post
|
314 |
+
* @param $update
|
315 |
+
* @since 4.0.0
|
316 |
+
*/
|
317 |
+
function set_default_post_meta( $post_id, $post, $update ) {
|
318 |
+
|
319 |
+
if( !$update ) {
|
320 |
+
update_post_meta( $post_id, 'sc_member_order', PHP_INT_MAX );
|
321 |
+
}
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
add_action( 'save_post_team_member', 'ots\set_default_post_meta', 10, 3 );
|
326 |
+
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Sanitize and save the contact meta box fields.
|
330 |
+
*
|
331 |
+
* @param $post_id
|
332 |
+
* @since 4.0.0
|
333 |
+
*/
|
334 |
+
function save_contact_meta_box( $post_id ) {
|
335 |
+
|
336 |
+
if( isset( $_POST['articles_mata_box_nonce'] ) &&
|
337 |
+
wp_verify_nonce( $_POST['contact_mata_box_nonce'], 'contact_meta_box' ) ) {
|
338 |
+
|
339 |
+
update_post_meta( $post_id, 'team_member_title', sanitize_text_field( $_POST['team_member_title'] ) );
|
340 |
+
update_post_meta( $post_id, 'team_member_phone', sanitize_text_field( $_POST['team_member_phone'] ) );
|
341 |
+
update_post_meta( $post_id, 'team_member_other', sanitize_text_field( $_POST['team_member_other'] ) );
|
342 |
+
update_post_meta( $post_id, 'team_member_other_icon', sanitize_key( $_POST['team_member_other_icon'] ) );
|
343 |
+
update_post_meta( $post_id, 'team_member_email', sanitize_email( $_POST['team_member_email'] ) );
|
344 |
+
|
345 |
+
foreach( $_POST['team_member_links'] as $network => $link ) {
|
346 |
+
update_post_meta( $post_id, 'team_member_' . sanitize_key( $network ), esc_url_raw( $link ) );
|
347 |
+
}
|
348 |
+
|
349 |
+
}
|
350 |
+
|
351 |
+
}
|
352 |
+
|
353 |
+
add_action( 'save_post_team_member', 'ots\save_contact_meta_box' );
|
354 |
+
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Sanitize and save the articles meta box fields.
|
358 |
+
*
|
359 |
+
* @param $post_id
|
360 |
+
* @since 4.0.0
|
361 |
+
*/
|
362 |
+
function save_articles_meta_box( $post_id ) {
|
363 |
+
|
364 |
+
if( isset( $_POST['articles_mata_box_nonce'] ) &&
|
365 |
+
wp_verify_nonce( $_POST['articles_mata_box_nonce'], 'articles_meta_box' ) ) {
|
366 |
+
|
367 |
+
update_post_meta( $post_id, 'team_member_article_bool', isset( $_POST['team_member_article_bool'] ) ? 'on' : '' );
|
368 |
+
update_post_meta( $post_id, 'team_member_article_title', sanitize_text_field( $_POST['team_member_article_title'] ) );
|
369 |
+
|
370 |
+
foreach( $_POST['team_member_articles'] as $index => $article ) {
|
371 |
+
update_post_meta( $post_id, 'team_member_article' . $index, intval( $article ) );
|
372 |
+
}
|
373 |
+
|
374 |
+
}
|
375 |
+
|
376 |
+
}
|
377 |
+
|
378 |
+
add_action( 'save_post_team_member', 'ots\save_articles_meta_box' );
|
379 |
+
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Output the contact info meta box.
|
383 |
+
*
|
384 |
+
* @param \WP_Post $post
|
385 |
+
* @since 4.0.0
|
386 |
+
*/
|
387 |
+
function do_contact_meta_box( \WP_Post $post ) { ?>
|
388 |
+
|
389 |
+
<?php wp_nonce_field( 'contact_meta_box', 'contact_mata_box_nonce' ); ?>
|
390 |
+
|
391 |
+
<?php $member = team_member( $post ); ?>
|
392 |
+
|
393 |
+
<table id="ots-contact-meta-box" class="ots-meta-box widefat">
|
394 |
+
<tr>
|
395 |
+
<th>
|
396 |
+
<label for="ots-member-job-title"><?php _e( 'Job Title', 'ots' ); ?></label>
|
397 |
+
</th>
|
398 |
+
<td>
|
399 |
+
<input id="ots-member-job-title"
|
400 |
+
name="team_member_title"
|
401 |
+
class="regular-text"
|
402 |
+
value="<?php esc_attr_e( $member->title ); ?>" />
|
403 |
+
</td>
|
404 |
+
</tr>
|
405 |
+
<tr>
|
406 |
+
<th>
|
407 |
+
<label for="ots-member-email"><?php _e( 'Email Address', 'ots' ); ?></label>
|
408 |
+
</th>
|
409 |
+
<td>
|
410 |
+
<input id="ots-member-email"
|
411 |
+
name="team_member_email"
|
412 |
+
class="regular-text"
|
413 |
+
value="<?php esc_attr_e( $member->email ); ?>" />
|
414 |
+
</td>
|
415 |
+
</tr>
|
416 |
+
<tr>
|
417 |
+
<th>
|
418 |
+
<label for="ots-member-phone"><?php _e( 'Phone Number', 'ots' ); ?></label>
|
419 |
+
</th>
|
420 |
+
<td>
|
421 |
+
<input id="ots-member-phone"
|
422 |
+
name="team_member_phone"
|
423 |
+
class="regular-text"
|
424 |
+
placeholder="(123) 456-7890"
|
425 |
+
value="<?php esc_attr_e( $member->phone ); ?>" />
|
426 |
+
</td>
|
427 |
+
</tr>
|
428 |
+
<tr>
|
429 |
+
<th>
|
430 |
+
<label for="ots-member-facebook"><?php _e( 'Facebook', 'ots' ); ?></label>
|
431 |
+
</th>
|
432 |
+
<td>
|
433 |
+
<input id="ots-member-facebook"
|
434 |
+
name="team_member_links[facebook]"
|
435 |
+
class="regular-text"
|
436 |
+
placeholder="http://"
|
437 |
+
value="<?php esc_attr_e( $member->facebook ); ?>" />
|
438 |
+
</td>
|
439 |
+
</tr>
|
440 |
+
<tr>
|
441 |
+
<th>
|
442 |
+
<label for="ots-member-twitter"><?php _e( 'Twitter', 'ots' ); ?></label>
|
443 |
+
</th>
|
444 |
+
<td>
|
445 |
+
<input id="ots-member-twitter"
|
446 |
+
name="team_member_links[twitter]"
|
447 |
+
class="regular-text"
|
448 |
+
placeholder="http://"
|
449 |
+
value="<?php esc_attr_e( $member->twitter ); ?>" />
|
450 |
+
</td>
|
451 |
+
</tr>
|
452 |
+
<tr>
|
453 |
+
<th>
|
454 |
+
<label for="ots-member-linkedin"><?php _e( 'Linkedin', 'ots' ); ?></label>
|
455 |
+
</th>
|
456 |
+
<td>
|
457 |
+
<input id="ots-member-linkedin"
|
458 |
+
name="team_member_links[linkedin]"
|
459 |
+
class="regular-text"
|
460 |
+
placeholder="http://"
|
461 |
+
value="<?php esc_attr_e( $member->linkedin ); ?>" />
|
462 |
+
</td>
|
463 |
+
</tr>
|
464 |
+
<tr>
|
465 |
+
<th>
|
466 |
+
<label for="ots-member-gplus"><?php _e( 'Google Plus', 'ots' ); ?></label>
|
467 |
+
</th>
|
468 |
+
<td>
|
469 |
+
<input id="ots-member-gplus"
|
470 |
+
name="team_member_links[gplus]"
|
471 |
+
class="regular-text"
|
472 |
+
placeholder="http://"
|
473 |
+
value="<?php esc_attr_e( $member->gplus ); ?>" />
|
474 |
+
</td>
|
475 |
+
</tr>
|
476 |
+
<tr>
|
477 |
+
<th>
|
478 |
+
<label for="ots-member-instagram"><?php _e( 'Instagram', 'ots' ); ?></label>
|
479 |
+
</th>
|
480 |
+
<td>
|
481 |
+
<input id="ots-member-instagram"
|
482 |
+
name="team_member_links[instagram]"
|
483 |
+
class="regular-text"
|
484 |
+
placeholder="http://"
|
485 |
+
value="<?php esc_attr_e( $member->instagram ); ?>" />
|
486 |
+
</td>
|
487 |
+
</tr>
|
488 |
+
<tr>
|
489 |
+
<th>
|
490 |
+
<label for="ots-member-pinterest"><?php _e( 'Pinterest', 'ots' ); ?></label>
|
491 |
+
</th>
|
492 |
+
<td>
|
493 |
+
<input id="ots-member-pinterest"
|
494 |
+
name="team_member_links[pinterest]"
|
495 |
+
class="regular-text"
|
496 |
+
placeholder="http://"
|
497 |
+
value="<?php esc_attr_e( $member->pinterest ); ?>" />
|
498 |
+
</td>
|
499 |
+
</tr>
|
500 |
+
<tr>
|
501 |
+
<th>
|
502 |
+
<label for="ots-member-website"><?php _e( 'Website', 'ots' ); ?></label>
|
503 |
+
</th>
|
504 |
+
<td>
|
505 |
+
<input id="ots-member-website"
|
506 |
+
name="team_member_links[website]"
|
507 |
+
class="regular-text"
|
508 |
+
placeholder="http://"
|
509 |
+
value="<?php esc_attr_e( $member->website ); ?>" />
|
510 |
+
</td>
|
511 |
+
</tr>
|
512 |
+
<tr>
|
513 |
+
<th>
|
514 |
+
<label for="ots-member-other"><?php _e( 'Other', 'ots' ); ?></label>
|
515 |
+
</th>
|
516 |
+
<td>
|
517 |
+
|
518 |
+
<?php $other_icon = $member->other_icon; ?>
|
519 |
+
|
520 |
+
<select id="ots-member-other-icon" name="team_member_other_icon">
|
521 |
+
<option value=""><?php _e( 'Select an Icon', 'ots' ); ?></option>
|
522 |
+
<option value="etsy" <?php selected( $other_icon, 'etsy' ); ?>><?php _e( 'Etsy', 'ots' ); ?></option>
|
523 |
+
<option value="whatsapp" <?php selected( $other_icon, 'whatsapp' ); ?>><?php _e( 'Whatsapp', 'ots' ); ?></option>
|
524 |
+
<option value="skype" <?php selected( $other_icon, 'skype' ); ?>><?php _e( 'Skype', 'ots' ); ?></option>
|
525 |
+
<option value="vimeo" <?php selected( $other_icon, 'vimeo' ); ?>><?php _e( 'Vimeo', 'ots' ); ?></option>
|
526 |
+
<option value="soundcloud" <?php selected( $other_icon, 'soundcloud' ); ?>><?php _e( 'Soundcloud', 'ots' ); ?></option>
|
527 |
+
</select>
|
528 |
+
<input id="ots-member-other"
|
529 |
+
name="team_member_other"
|
530 |
+
placeholder="http://"
|
531 |
+
value="<?php esc_attr_e( $member->other ); ?>" />
|
532 |
+
</td>
|
533 |
+
</tr>
|
534 |
+
</table>
|
535 |
+
|
536 |
+
<?php }
|
537 |
+
|
538 |
+
|
539 |
+
/**
|
540 |
+
* Output the articles metabox.
|
541 |
+
*
|
542 |
+
* @param \WP_Post $post
|
543 |
+
* @since 4.0.0
|
544 |
+
*/
|
545 |
+
function do_articles_meta_box( \WP_Post $post ) { ?>
|
546 |
+
|
547 |
+
<?php wp_nonce_field( 'articles_meta_box', 'articles_mata_box_nonce' ); ?>
|
548 |
+
|
549 |
+
<?php $member = team_member( $post ); ?>
|
550 |
+
|
551 |
+
<table id="ots-articles-meta-box" class="ots-meta-box widefat">
|
552 |
+
<tr>
|
553 |
+
<th>
|
554 |
+
<label for="ots-display-member-articles"><?php _e( 'Display Articles', 'ots' ); ?></label>
|
555 |
+
</th>
|
556 |
+
<td>
|
557 |
+
<label>
|
558 |
+
<input id="ots-display-member-articles"
|
559 |
+
name="team_member_article_bool"
|
560 |
+
type="checkbox" <?php checked( $member->article_bool, 'on' ); ?> />
|
561 |
+
</label>
|
562 |
+
</td>
|
563 |
+
</tr>
|
564 |
+
<tr>
|
565 |
+
<th>
|
566 |
+
<label for="ots-member-articles-title"><?php _e( 'Articles Title', 'ots' ); ?></label>
|
567 |
+
</th>
|
568 |
+
<td>
|
569 |
+
<input id="ots-member-articles-title"
|
570 |
+
name="team_member_article_title"
|
571 |
+
class="regular-text"
|
572 |
+
value="<?php esc_attr_e( $member->article_title ); ?>" />
|
573 |
+
</td>
|
574 |
+
</tr>
|
575 |
+
<tr>
|
576 |
+
<th>
|
577 |
+
<label for="ots-member-article-1"><?php _e( 'Article 1', 'ots' ); ?></label>
|
578 |
+
</th>
|
579 |
+
<td>
|
580 |
+
<?php posts_dropdown( 'team_member_articles[1]', 'ots-member-articles-1', $member->article1 ); ?>
|
581 |
+
</td>
|
582 |
+
</tr>
|
583 |
+
<tr>
|
584 |
+
<th>
|
585 |
+
<label for="ots-member-article-2"><?php _e( 'Article 2', 'ots' ); ?></label>
|
586 |
+
</th>
|
587 |
+
<td>
|
588 |
+
<?php posts_dropdown( 'team_member_articles[2]', 'ots-member-articles-2', $member->article2 ); ?>
|
589 |
+
</td>
|
590 |
+
</tr>
|
591 |
+
<tr>
|
592 |
+
<th>
|
593 |
+
<label for="ots-member-article-3"><?php _e( 'Article 3', 'ots' ); ?></label>
|
594 |
+
</th>
|
595 |
+
<td>
|
596 |
+
<?php posts_dropdown( 'team_member_articles[3]', 'ots-member-articles-3', $member->article3 ); ?>
|
597 |
+
</td>
|
598 |
+
</tr>
|
599 |
+
</table>
|
600 |
+
|
601 |
+
<?php }
|
602 |
+
|
603 |
+
|
604 |
+
/**
|
605 |
+
* Output the skills meta box. Note all fields are disabled by default and this meta box has no save handler.
|
606 |
+
*
|
607 |
+
* @param \WP_Post $post
|
608 |
+
* @param array $meta_box
|
609 |
+
* @since 4.0.0
|
610 |
+
*/
|
611 |
+
function do_skills_meta_box( \WP_Post $post, array $meta_box ) { ?>
|
612 |
+
|
613 |
+
<?php wp_nonce_field( 'skills_meta_box', 'skills_meta_box_nonce' ); ?>
|
614 |
+
|
615 |
+
<?php $member = team_member( $post ); ?>
|
616 |
+
|
617 |
+
<table id="ots-skills-meta-box" class="ots-meta-box widefat">
|
618 |
+
<tr>
|
619 |
+
<th>
|
620 |
+
<label for="ots-display-member-skills"><?php _e( 'Display Skills', 'ots' ); ?></label>
|
621 |
+
</th>
|
622 |
+
<td>
|
623 |
+
<label>
|
624 |
+
<input id="ots-display-member-skills"
|
625 |
+
name="team_member_skill_bool"
|
626 |
+
type="checkbox" <?php checked( $member->skill_bool, 'on' ); ?>
|
627 |
+
|
628 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
629 |
+
</label>
|
630 |
+
</td>
|
631 |
+
</tr>
|
632 |
+
<tr>
|
633 |
+
<th>
|
634 |
+
<label for="ots-member-skills-title"><?php _e( 'Skills Title', 'ots' ); ?></label>
|
635 |
+
</th>
|
636 |
+
<td>
|
637 |
+
<input id="ots-member-skills-title"
|
638 |
+
name="team_member_skill_title"
|
639 |
+
class="regular-text"
|
640 |
+
value="<?php esc_attr_e( $member->skill_title ); ?>"
|
641 |
+
|
642 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
643 |
+
</td>
|
644 |
+
</tr>
|
645 |
+
<tr>
|
646 |
+
<th>
|
647 |
+
<label for="ots-member-skill-1"><?php _e( 'Attribute / Skill 1', 'ots' ); ?></label>
|
648 |
+
</th>
|
649 |
+
<td>
|
650 |
+
<input id="ots-member-skill-1"
|
651 |
+
name="team_member_skill_titles[]"
|
652 |
+
class="ots-member-skill-title"
|
653 |
+
placeholder="<?php _e( 'Title', 'ots' ); ?>"
|
654 |
+
value="<?php esc_attr_e( $member->skill1 ); ?>"
|
655 |
+
|
656 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
657 |
+
|
658 |
+
<input id="ots-member-skill-1"
|
659 |
+
name="team_member_skill_ratings[]"
|
660 |
+
type="number"
|
661 |
+
min="1"
|
662 |
+
max="10"
|
663 |
+
class="ots-member-skill-rating"
|
664 |
+
placeholder="<?php _e( 'Rating 1 - 10', 'ots' ); ?>"
|
665 |
+
value="<?php esc_attr_e( $member->skill_value1 ); ?>"
|
666 |
+
|
667 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
668 |
+
</td>
|
669 |
+
</tr>
|
670 |
+
<tr>
|
671 |
+
<th>
|
672 |
+
<label for="ots-member-skill-2"><?php _e( 'Attribute / Skill 2', 'ots' ); ?></label>
|
673 |
+
</th>
|
674 |
+
<td>
|
675 |
+
<input id="ots-member-skill-2"
|
676 |
+
name="team_member_skill_titles[]"
|
677 |
+
class="ots-member-skill-title"
|
678 |
+
placeholder="<?php _e( 'Title', 'ots' ); ?>"
|
679 |
+
value="<?php esc_attr_e( $member->skill2 ); ?>"
|
680 |
+
|
681 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
682 |
+
|
683 |
+
<input id="ots-member-skill-2"
|
684 |
+
name="team_member_skill_ratings[]"
|
685 |
+
class="ots-member-skill-rating"
|
686 |
+
type="number"
|
687 |
+
min="1"
|
688 |
+
max="10"
|
689 |
+
placeholder="<?php _e( 'Rating 1 - 10', 'ots' ); ?>"
|
690 |
+
value="<?php esc_attr_e( $member->skill_value2 ); ?>"
|
691 |
+
|
692 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
693 |
+
</td>
|
694 |
+
</tr>
|
695 |
+
<tr>
|
696 |
+
<th>
|
697 |
+
<label for="ots-member-skill-3"><?php _e( 'Attribute / Skill 3', 'ots' ); ?></label>
|
698 |
+
</th>
|
699 |
+
<td>
|
700 |
+
<input id="ots-member-skill-3"
|
701 |
+
name="team_member_skill_titles[]"
|
702 |
+
class="ots-member-skill-title""
|
703 |
+
placeholder="<?php _e( 'Title', 'ots' ); ?>"
|
704 |
+
value="<?php esc_attr_e( $member->skill3 ); ?>"
|
705 |
+
|
706 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
707 |
+
|
708 |
+
<input id="ots-member-skill-3"
|
709 |
+
name="team_member_skill_ratings[]"
|
710 |
+
class="ots-member-skill-rating"
|
711 |
+
type="number"
|
712 |
+
min="1"
|
713 |
+
max="10"
|
714 |
+
placeholder="<?php _e( 'Rating 1 - 10', 'ots' ); ?>"
|
715 |
+
value="<?php esc_attr_e( $member->skill_value3 ); ?>"
|
716 |
+
|
717 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
718 |
+
</td>
|
719 |
+
</tr>
|
720 |
+
<tr>
|
721 |
+
<th>
|
722 |
+
<label for="ots-member-skill-4"><?php _e( 'Attribute / Skill 4', 'ots' ); ?></label>
|
723 |
+
</th>
|
724 |
+
<td>
|
725 |
+
<input id="ots-member-skill-4"
|
726 |
+
name="team_member_skill_titles[]"
|
727 |
+
class="ots-member-skill-title"
|
728 |
+
placeholder="<?php _e( 'Title', 'ots' ); ?>"
|
729 |
+
value="<?php esc_attr_e( $member->skill4 ); ?>"
|
730 |
+
|
731 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
732 |
+
|
733 |
+
<input id="ots-member-skill-4"
|
734 |
+
name="team_member_skill_ratings[]"
|
735 |
+
class="ots-member-skill-rating"
|
736 |
+
type="number"
|
737 |
+
min="1"
|
738 |
+
max="10"
|
739 |
+
placeholder="<?php _e( 'Rating 1 - 10', 'ots' ); ?>"
|
740 |
+
value="<?php esc_attr_e( $member->skill_value4 ); ?>"
|
741 |
+
|
742 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
743 |
+
</td>
|
744 |
+
</tr>
|
745 |
+
<tr>
|
746 |
+
<th>
|
747 |
+
<label for="ots-member-skill-5"><?php _e( 'Attribute / Skill 5', 'ots' ); ?></label>
|
748 |
+
</th>
|
749 |
+
<td>
|
750 |
+
<input id="ots-member-skill-5"
|
751 |
+
name="team_member_skill_titles[]"
|
752 |
+
class="ots-member-skill-title"
|
753 |
+
placeholder="<?php _e( 'Title', 'ots' ); ?>"
|
754 |
+
value="<?php esc_attr_e( $member->skill5 ); ?>"
|
755 |
+
|
756 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
757 |
+
|
758 |
+
<input id="ots-member-skill-5"
|
759 |
+
name="team_member_skill_ratings[]"
|
760 |
+
class="ots-member-skill-rating"
|
761 |
+
type="number"
|
762 |
+
min="1"
|
763 |
+
max="10"
|
764 |
+
placeholder="<?php _e( 'Rating 1 - 10', 'ots' ); ?>"
|
765 |
+
value="<?php esc_attr_e( $member->skill_value5 ); ?>"
|
766 |
+
|
767 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
768 |
+
</td>
|
769 |
+
</tr>
|
770 |
+
</table>
|
771 |
+
|
772 |
+
<?php }
|
773 |
+
|
774 |
+
|
775 |
+
/**
|
776 |
+
* Output the tags metabox. Note all fields are disabled by default and this metabox has no save handler.
|
777 |
+
*
|
778 |
+
* @param \WP_Post $post
|
779 |
+
* @param array $meta_box
|
780 |
+
* @since 4.0.0
|
781 |
+
*/
|
782 |
+
function do_tags_meta_box( \WP_Post $post, array $meta_box ) { ?>
|
783 |
+
|
784 |
+
<?php wp_nonce_field( 'tags_meta_box', 'tags_meta_box_nonce' ); ?>
|
785 |
+
|
786 |
+
<?php $member = team_member( $post ); ?>
|
787 |
+
|
788 |
+
<table id="ots-tags-meta-box" class="ots-meta-box widefat">
|
789 |
+
<tr>
|
790 |
+
<th>
|
791 |
+
<label for="ots-display-member-tags"><?php _e( 'Display Tags', 'ots' ); ?></label>
|
792 |
+
</th>
|
793 |
+
<td>
|
794 |
+
<label>
|
795 |
+
<input id="ots-display-member-tags"
|
796 |
+
name="team_member_tags_bool"
|
797 |
+
type="checkbox" <?php checked( $member->tags_bool, 'on' ); ?>
|
798 |
+
|
799 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
800 |
+
</label>
|
801 |
+
</td>
|
802 |
+
</tr>
|
803 |
+
<tr>
|
804 |
+
<th>
|
805 |
+
<label for="ots-member-tags-title"><?php _e( 'Tags Title', 'ots' ); ?></label>
|
806 |
+
</th>
|
807 |
+
<td>
|
808 |
+
<input id="ots-member-tags-title"
|
809 |
+
name="team_member_tags_title"
|
810 |
+
class="regular-text"
|
811 |
+
value="<?php esc_attr_e( $member->tags_title ); ?>"
|
812 |
+
|
813 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
814 |
+
</td>
|
815 |
+
</tr>
|
816 |
+
<tr>
|
817 |
+
<th>
|
818 |
+
<label for="ots-member-tags"><?php _e( 'Attributes', 'ots' ); ?></label>
|
819 |
+
</th>
|
820 |
+
<td>
|
821 |
+
<textarea id="ots-member-tags"
|
822 |
+
name="team_member_tags"
|
823 |
+
class="regular-text"
|
824 |
+
placeholder="<?php _e( 'Enter attributes, comma separated', 'ots' ); ?>"
|
825 |
+
|
826 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?>
|
827 |
+
|
828 |
+
><?php esc_html_e( $member->tags ); ?></textarea>
|
829 |
+
</td>
|
830 |
+
</tr>
|
831 |
+
<tr>
|
832 |
+
<th>
|
833 |
+
<label for="ots-member-personal-quote"><?php _e( 'Personal Quote', 'ots' ); ?></label>
|
834 |
+
</th>
|
835 |
+
<td>
|
836 |
+
<input id="ots-member-personal-quote"
|
837 |
+
name="team_member_quote"
|
838 |
+
class="regular-text"
|
839 |
+
value="<?php esc_attr_e( $member->quote ); ?>"
|
840 |
+
|
841 |
+
<?php disabled( true, $meta_box['args']['preview'] ); ?> />
|
842 |
+
</td>
|
843 |
+
</tr>
|
844 |
+
</table>
|
845 |
+
|
846 |
+
<?php }
|
includes/team-view.php
CHANGED
@@ -30,6 +30,7 @@ function do_shortcode_output( $attributes = array() ) {
|
|
30 |
$defaults = array(
|
31 |
'id' => '',
|
32 |
'group' => '',
|
|
|
33 |
'limit' => get_option( Options::DISPLAY_LIMIT ),
|
34 |
'template' => get_option( Options::TEMPLATE ),
|
35 |
'single_template' => get_option( Options::SINGLE_TEMPLATE )
|
@@ -48,6 +49,7 @@ function do_team_view_output( array $args = array() ) {
|
|
48 |
'id' => '',
|
49 |
'group' => '',
|
50 |
'limit' => -1,
|
|
|
51 |
'template' => Defaults::TEMPLATE,
|
52 |
'single_template' => Defaults::SINGLE_TEMPLATE
|
53 |
);
|
30 |
$defaults = array(
|
31 |
'id' => '',
|
32 |
'group' => '',
|
33 |
+
'columns' => get_option( Options::GRID_COLUMNS ),
|
34 |
'limit' => get_option( Options::DISPLAY_LIMIT ),
|
35 |
'template' => get_option( Options::TEMPLATE ),
|
36 |
'single_template' => get_option( Options::SINGLE_TEMPLATE )
|
49 |
'id' => '',
|
50 |
'group' => '',
|
51 |
'limit' => -1,
|
52 |
+
'columns' => Defaults::GRID_COLUMNS,
|
53 |
'template' => Defaults::TEMPLATE,
|
54 |
'single_template' => Defaults::SINGLE_TEMPLATE
|
55 |
);
|
our-team-showcase.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Our Team Showcase
|
4 |
* Plugin URI: https://smartcatdesign.net/downloads/our-team-showcase/
|
5 |
* Description: Display your team members in a very attractive way as a widget or page with the shortcode [our-team]
|
6 |
-
* Version: 4.
|
7 |
* Author: Smartcat
|
8 |
* Author URI: https://smartcatdesign.net
|
9 |
* License: GPL2
|
@@ -41,7 +41,7 @@ function init() {
|
|
41 |
include_once dirname( __FILE__ ) . '/upgrade.php';
|
42 |
include_once dirname( __FILE__ ) . '/includes/functions.php';
|
43 |
include_once dirname( __FILE__ ) . '/includes/helpers.php';
|
44 |
-
include_once dirname( __FILE__ ) . '/includes/
|
45 |
include_once dirname( __FILE__ ) . '/includes/admin-settings.php';
|
46 |
include_once dirname( __FILE__ ) . '/includes/documentation.php';
|
47 |
include_once dirname( __FILE__ ) . '/includes/add-ons.php';
|
3 |
* Plugin Name: Our Team Showcase
|
4 |
* Plugin URI: https://smartcatdesign.net/downloads/our-team-showcase/
|
5 |
* Description: Display your team members in a very attractive way as a widget or page with the shortcode [our-team]
|
6 |
+
* Version: 4.2.0
|
7 |
* Author: Smartcat
|
8 |
* Author URI: https://smartcatdesign.net
|
9 |
* License: GPL2
|
41 |
include_once dirname( __FILE__ ) . '/upgrade.php';
|
42 |
include_once dirname( __FILE__ ) . '/includes/functions.php';
|
43 |
include_once dirname( __FILE__ ) . '/includes/helpers.php';
|
44 |
+
include_once dirname( __FILE__ ) . '/includes/team-member.php';
|
45 |
include_once dirname( __FILE__ ) . '/includes/admin-settings.php';
|
46 |
include_once dirname( __FILE__ ) . '/includes/documentation.php';
|
47 |
include_once dirname( __FILE__ ) . '/includes/add-ons.php';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://smartcatdesign.net/downloads/our-team-showcase/
|
|
4 |
Tags: team, staff, directory, employees, widget, shortcode, members, carousel, honeycomb, stack, grid, custom, template, social, profile, custom post type, portfolio, profile,meet team, skills, cv,v-card, portal
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 4.8.1
|
7 |
-
Stable tag: 4.1.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
The best way to display your employees, team members, or any type of list. Multiple appealing templates,SEO friendly, re-order functionality.
|
@@ -57,6 +57,8 @@ Pro Version Features:
|
|
57 |
* Search & Sort employee directory
|
58 |
* Looks great on desktop & mobile
|
59 |
* Team Member Skills, Hobbies, Tags
|
|
|
|
|
60 |
|
61 |
Team Member Details & Icons:
|
62 |
|
@@ -71,6 +73,10 @@ Team Member Details & Icons:
|
|
71 |
* Instagram
|
72 |
* Pinterest
|
73 |
* Website/URL
|
|
|
|
|
|
|
|
|
74 |
* Links to up to 3 Articles
|
75 |
|
76 |
|
@@ -81,6 +87,10 @@ Team Member Details & Icons:
|
|
81 |
4. PRO VERSION - Honeycomb Demo
|
82 |
5. PRO VERSION - stacked list Demo
|
83 |
6. PRO VERSION - Carousel Demo
|
|
|
|
|
|
|
|
|
84 |
|
85 |
== Installation ==
|
86 |
1. Download the plugin, then upload the zipped file to your site from the WordPress dashboard plugin uploader menu
|
@@ -88,6 +98,12 @@ Team Member Details & Icons:
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
= 4.1.1 =
|
92 |
1. fix bug with error when saving posts
|
93 |
2. fix php error for un-install
|
4 |
Tags: team, staff, directory, employees, widget, shortcode, members, carousel, honeycomb, stack, grid, custom, template, social, profile, custom post type, portfolio, profile,meet team, skills, cv,v-card, portal
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 4.8.1
|
7 |
+
Stable tag: 4.1.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
The best way to display your employees, team members, or any type of list. Multiple appealing templates,SEO friendly, re-order functionality.
|
57 |
* Search & Sort employee directory
|
58 |
* Looks great on desktop & mobile
|
59 |
* Team Member Skills, Hobbies, Tags
|
60 |
+
* **Community Hub** (New - October 2017) creates a private member login page on your site so you can share
|
61 |
+
posts and pages only with your team
|
62 |
|
63 |
Team Member Details & Icons:
|
64 |
|
73 |
* Instagram
|
74 |
* Pinterest
|
75 |
* Website/URL
|
76 |
+
* Whatsapp
|
77 |
+
* Skype
|
78 |
+
* Vimeo
|
79 |
+
* Soundcloud
|
80 |
* Links to up to 3 Articles
|
81 |
|
82 |
|
87 |
4. PRO VERSION - Honeycomb Demo
|
88 |
5. PRO VERSION - stacked list Demo
|
89 |
6. PRO VERSION - Carousel Demo
|
90 |
+
7. Community Hub - Dashboard
|
91 |
+
8. Community Hub - Team Member Profile
|
92 |
+
9. Community Hub - Single Post
|
93 |
+
|
94 |
|
95 |
== Installation ==
|
96 |
1. Download the plugin, then upload the zipped file to your site from the WordPress dashboard plugin uploader menu
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 4.2.0 =
|
102 |
+
1. Added the ability to set the number of columns from the shortcode
|
103 |
+
2. Updated documentation
|
104 |
+
3. Bug fixes
|
105 |
+
4. Updated Pro version - Now it includes a the Community Hub for the team
|
106 |
+
|
107 |
= 4.1.1 =
|
108 |
1. fix bug with error when saving posts
|
109 |
2. fix php error for un-install
|
templates/grid-circles-2.php
CHANGED
@@ -4,7 +4,7 @@ namespace ots;
|
|
4 |
|
5 |
?>
|
6 |
|
7 |
-
<div id="sc_our_team" class="grid_circles2 sc-col<?php esc_attr_e(
|
8 |
|
9 |
<div class="clear"></div>
|
10 |
|
4 |
|
5 |
?>
|
6 |
|
7 |
+
<div id="sc_our_team" class="grid_circles2 sc-col<?php esc_attr_e( $columns ); ?>">
|
8 |
|
9 |
<div class="clear"></div>
|
10 |
|
templates/grid-circles.php
CHANGED
@@ -4,7 +4,7 @@ namespace ots;
|
|
4 |
|
5 |
?>
|
6 |
|
7 |
-
<div id="sc_our_team" class="grid_circles sc-col<?php esc_attr_e(
|
8 |
|
9 |
<div class="clear"></div>
|
10 |
|
4 |
|
5 |
?>
|
6 |
|
7 |
+
<div id="sc_our_team" class="grid_circles sc-col<?php esc_attr_e( $columns ); ?>">
|
8 |
|
9 |
<div class="clear"></div>
|
10 |
|
templates/grid.php
CHANGED
@@ -4,7 +4,7 @@ namespace ots;
|
|
4 |
|
5 |
?>
|
6 |
|
7 |
-
<div id="sc_our_team" class="grid sc-col<?php esc_attr_e(
|
8 |
|
9 |
<div class="clear"></div>
|
10 |
|
4 |
|
5 |
?>
|
6 |
|
7 |
+
<div id="sc_our_team" class="grid sc-col<?php esc_attr_e( $columns ); ?>">
|
8 |
|
9 |
<div class="clear"></div>
|
10 |
|
uninstall.php
CHANGED
@@ -13,7 +13,7 @@ if( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
13 |
*/
|
14 |
|
15 |
include_once dirname( __FILE__ ) . '/constants.php';
|
16 |
-
include_once dirname( __FILE__ ) . '/includes/
|
17 |
|
18 |
|
19 |
|
13 |
*/
|
14 |
|
15 |
include_once dirname( __FILE__ ) . '/constants.php';
|
16 |
+
include_once dirname( __FILE__ ) . '/includes/team-member.php';
|
17 |
|
18 |
|
19 |
|
upgrade.php
CHANGED
@@ -11,7 +11,7 @@ function do_migration() {
|
|
11 |
|
12 |
$options = get_option( 'smartcat_team_options', false );
|
13 |
|
14 |
-
if ( get_option( Options::PLUGIN_VERSION, 0 ) < '4.0.0' ) {
|
15 |
|
16 |
// Map out all non-boolean values
|
17 |
$map = array(
|
11 |
|
12 |
$options = get_option( 'smartcat_team_options', false );
|
13 |
|
14 |
+
if ( $options && get_option( Options::PLUGIN_VERSION, 0 ) < '4.0.0' ) {
|
15 |
|
16 |
// Map out all non-boolean values
|
17 |
$map = array(
|