PluginProbe
Team Showcase / 1.21
Team Showcase v1.21
trunk 1.0 1.1 1.11 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.22.0 1.22.1 1.22.10 1.22.12 1.22.13 1.22.14 All 49 releases
← All changes | includes/class-functions.php +151 -144 trunk1.21 View file →
@@ -1,8 +1,11 @@
1 1 <?php
2 2
3 +/*
4 +* @Author ParaTheme
5 +* Copyright: 2015 ParaTheme
6 +*/
3 7
4 -
5 8 if ( ! defined('ABSPATH')) exit; // if direct access
6 9
7 10
8 11 class class_team_functions {
@@ -7,9 +10,10 @@
7 10
8 11 class class_team_functions {
9 12
10 13
11 - public function __construct(){
14 + public function __construct()
15 + {
12 16
13 17
14 18 //$this->settings_page = new Team_Settings();
15 19
@@ -33,12 +37,30 @@
33 37
34 38
35 39
36 40
37 - public function team_member_social_field(){
41 + public function team_member_social_field()
42 + {
38 43
39 -
44 +/*
40 45 $social_field = array(
46 + "mobile"=>"Mobile",
47 + "website"=>"Website",
48 + "email"=>"Email",
49 + "skype"=>"Skype",
50 + "facebook"=>"Facebook",
51 + "twitter"=>"Twitter",
52 + "googleplus"=>"Google plus",
53 + "pinterest"=>"Pinterest",
54 + "linkedin"=>"Linkedin",
55 + "vimeo"=>"Vimeo",
56 + );
57 +
58 +*/
59 +
60 +
61 +
62 + $social_field = array(
41 63 "mobile"=>array('meta_key'=>"mobile",'name'=>"Mobile",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
42 64 "website"=>array('meta_key'=>"website",'name'=>"Website",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
43 65 "email"=>array('meta_key'=>"email",'name'=>"Email",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
44 66 "skype"=>array('meta_key'=>"skype",'name'=>"Skype",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
@@ -46,10 +68,9 @@
46 68 "twitter"=>array('meta_key'=>"twitter",'name'=>"Twitter",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
47 69 "googleplus"=>array('meta_key'=>"googleplus",'name'=>"Google plus",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
48 70 "pinterest"=>array('meta_key'=>"pinterest",'name'=>"Pinterest",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
49 71 "linkedin"=>array('meta_key'=>"linkedin",'name'=>"Linkedin",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
50 - "vimeo"=>array('meta_key'=>"vimeo",'name'=>"Vimeo",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
51 - "instagram"=>array('meta_key'=>"instagram",'name'=>"Instagram",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
72 + "vimeo"=>array('meta_key'=>"vimeo",'name'=>"Vimeo",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
52 73 );
53 74
54 75 return apply_filters( 'team_member_social_field', $social_field );
55 76
@@ -64,10 +85,10 @@
64 85
65 86 $team_grid_items = array(
66 87 'thumbnail'=>__('Thumbnail','team'),
67 88 'title'=>__('Title','team'),
68 - 'position'=>__('Position','team'),
69 - 'content'=>__('Content','team'),
89 + 'position'=>__('Position / Role','team'),
90 + 'content'=>__('Content / Biography','team'),
70 91 'social'=>__('Social','team'),
71 92 );
72 93
73 94 $team_grid_items = apply_filters('team_grid_items',$team_grid_items);
@@ -77,184 +98,170 @@
77 98
78 99 }
79 100
80 101
81 -
82 -
83 - public function skins(){
84 -
85 - $skins = array(
86 -
87 - 'flat'=> array(
88 - 'slug'=>'flat',
89 - 'name'=>'Flat',
90 - 'thumb_url'=>'',
91 - 'disabled'=>'',
92 - ),
93 102
94 - 'zoomout'=>array(
95 - 'slug'=>'zoomout',
96 - 'name'=>'ZoomOut',
97 - 'thumb_url'=>'',
98 - 'disabled'=>'',
99 - ),
100 103
101 - 'thumbrounded'=>array(
102 - 'slug'=>'thumbrounded',
103 - 'name'=>'ThumbRounded',
104 - 'thumb_url'=>'',
105 - 'disabled'=>'',
106 - ),
104 +
105 + public function team_themes($themes = array())
106 + {
107 107
108 + $themes = array(
109 + 'flat'=>'Flat',
110 + 'rounded'=>'Rounded',
111 + 'zoom-out'=>'Zoom Out',
112 +
113 + );
114 +
115 + foreach(apply_filters( 'team_themes', $themes ) as $theme_key=> $theme_name)
116 + {
117 + $theme_list[$theme_key] = $theme_name;
118 + }
108 119
109 -
120 +
121 + return $theme_list;
110 122
111 -
112 -
113 -
114 - );
115 -
116 - $skins = apply_filters('team_filter_skins', $skins);
117 -
118 - return $skins;
119 -
120 123 }
121 124
125 +
126 + public function team_themes_dir($themes_dir = array())
127 + {
128 + $main_dir = team_plugin_dir.'themes/';
129 +
130 + $themes_dir = array(
131 + 'flat'=>$main_dir.'flat',
132 + 'rounded'=>$main_dir.'rounded',
133 + 'zoom-out'=>$main_dir.'zoom-out',
134 +
135 + );
122 136
123 137
138 + foreach(apply_filters( 'team_themes_dir', $themes_dir ) as $theme_key=> $theme_dir)
139 + {
140 + $theme_list_dir[$theme_key] = $theme_dir;
141 + }
124 142
143 + return $theme_list_dir;
125 144
145 + }
126 146
127 147
148 + public function team_themes_url($themes_url = array())
149 + {
150 + $main_url = team_plugin_url.'themes/';
151 +
152 + $themes_url = array(
153 + 'flat'=>$main_url.'flat',
154 + 'rounded'=>$main_url.'rounded',
155 + 'zoom-out'=>$main_url.'zoom-out',
156 + );
128 157
129 -
130 - public function faq(){
158 + foreach(apply_filters( 'team_themes_url', $themes_url ) as $theme_key=> $theme_url)
159 + {
160 + $theme_list_url[$theme_key] = $theme_url;
161 + }
131 162
132 163
133 164
134 - $faq['core'] = array(
135 - 'title'=>__('Core', 'team'),
136 - 'items'=>array(
165 + return $theme_list_url;
137 166
138 - array(
139 - 'question'=>__('How to upgrade to premium ?', 'team'),
140 - 'answer_url'=>'https://pickplugins.com/documentation/team/faq/how-to-upgrade-to-pro/',
141 - ),
167 + }
142 168
143 - array(
144 - 'question'=>__('How to activate license ?', 'team'),
145 - 'answer_url'=>'https://pickplugins.com/documentation/team/how-to-activate-license/',
146 - ),
147 169
148 - array(
149 - 'question'=>__('How to create team ?', 'team'),
150 - 'answer_url'=>'https://pickplugins.com/documentation/team/how-to-create-team/',
151 - ),
170 +// Single Team Member
152 171
153 - array(
154 - 'question'=>__('How to add custom profile fields ?', 'team'),
155 - 'answer_url'=>'https://pickplugins.com/documentation/team/faq/how-to-add-custom-profile-fields/',
156 - ),
157 172
158 - array(
159 - 'question'=>__('Team member page 404 not found.', 'team'),
160 - 'answer_url'=>'https://pickplugins.com/documentation/team/faq/team-member-page-404-not-found/',
161 - ),
162 173
163 - ),
174 +
175 + public function team_single_themes($themes = array())
176 + {
164 177
165 -
178 + $themes = array(
179 + 'flat'=>'Flat',
180 +
166 181 );
182 +
183 + foreach(apply_filters( 'team_single_themes', $themes ) as $theme_key=> $theme_name)
184 + {
185 + $theme_list[$theme_key] = $theme_name;
186 + }
167 187
168 -
188 +
189 + return $theme_list;
190 +
191 + }
192 +
169 193
170 -
171 - $faq = apply_filters('team_filters_faq', $faq);
194 + public function team_single_themes_dir($themes_dir = array())
195 + {
196 + $main_dir = team_plugin_dir.'themes-single/';
197 + $themes_dir = $this->team_themes();
172 198
173 - return $faq;
199 + foreach($themes_dir as $theme_key=> $theme_dir)
200 + {
201 + $theme_list_dir[$theme_key] = $main_dir.$theme_key;
202 + }
174 203
175 - }
176 -
204 + return $theme_list_dir;
177 205
206 + }
178 207
179 -
180 -
181 - public function team_get_taxonomy_category($postid)
208 +
209 + public function team_single_themes_url($themes_url = array())
182 210 {
183 -
184 - $team_taxonomy = array('team_group');
185 -
186 - if(empty($team_taxonomy))
187 - {
188 - $team_taxonomy= "";
189 - }
190 - $team_taxonomy_terms = get_post_meta( $postid, 'team_taxonomy_terms', true );
191 -
192 -
193 - if(empty($team_taxonomy_terms))
211 + $main_url = team_plugin_url.'themes-single/';
212 + $themes_url = $this->team_themes();
213 +
214 + foreach($themes_url as $theme_key=> $theme_url)
194 215 {
195 - $team_taxonomy_terms =array('none'); // an empty array when no category element selected
196 -
216 + $theme_list_url[$theme_key] = $main_url.$theme_key;
197 217 }
198 -
199 - if(!isset($_POST['taxonomy']))
200 - {
201 - $taxonomy =$team_taxonomy;
202 - }
203 - else
204 - {
205 - $taxonomy = isset($_POST['taxonomy']) ? sanitize_text_field(wp_unslash($_POST['taxonomy'])) : '';
206 - }
207 -
208 -
209 - $args=array(
210 - 'orderby' => 'name',
211 - 'order' => 'ASC',
212 - 'taxonomy' => $taxonomy,
213 - );
214 -
215 - $categories = get_categories($args);
216 -
217 -
218 - if(empty($categories))
219 - {
220 - echo esc_html__("No Items Found!",'team');
221 - }
222 -
223 -
224 - $return_string = '';
225 - $return_string .= '<ul style="margin: 0;">';
226 -
227 - foreach($categories as $category){
228 -
229 - if(array_search($category->cat_ID, $team_taxonomy_terms))
230 - {
231 - $return_string .= '<li class='.$category->cat_ID.'><label ><input class="team_taxonomy_terms" checked type="checkbox" name="team_taxonomy_terms['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
232 - }
233 -
234 - else
235 - {
236 - $return_string .= '<li class='.$category->cat_ID.'><label ><input class="team_taxonomy_terms" type="checkbox" name="team_taxonomy_terms['.$category->cat_ID.']" value ="'.$category->cat_ID.'" />'.$category->cat_name.'</label ></li>';
237 - }
238 -
239 - }
240 -
241 - $return_string .= '</ul>';
242 -
243 - return $return_string;
244 -
245 - if(isset($_POST['taxonomy']))
246 - {
247 - die();
248 - }
249 -
250 -
218 +
219 + return $theme_list_url;
220 +
251 221 }
222 +
223 +
224 +
225 +
226 +
227 +
228 +
229 +
230 +
231 +
232 +
233 +
234 +
235 +
236 +
237 +
252 238
253 239 public function team_share_plugin()
254 240 {
255 241
256 242 ?>
243 +<div id="fb-root"></div>
244 +<script>(function(d, s, id) {
245 + var js, fjs = d.getElementsByTagName(s)[0];
246 + if (d.getElementById(id)) return;
247 + js = d.createElement(s); js.id = id;
248 + js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=652982311485932";
249 + fjs.parentNode.insertBefore(js, fjs);
250 +}(document, 'script', 'facebook-jssdk'));</script>
251 +<div class="fb-like" data-href="http://paratheme.com/items/team-responsive-meet-the-team-grid-for-wordpress" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
252 +
253 + <br /><br />
254 + <!-- Place this tag in your head or just before your close body tag. -->
255 + <script src="https://apis.google.com/js/platform.js" async defer></script>
256 +
257 + <!-- Place this tag where you want the +1 button to render. -->
258 + <div class="g-plusone" data-size="medium" data-annotation="inline" data-width="300" data-href="<?php echo team_share_url; ?>"></div>
259 +
260 + <br />
261 + <br />
262 + <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo team_share_url; ?>" data-text="<?php echo team_plugin_name; ?>" data-via="ParaTheme" data-hashtags="WordPress">Tweet</a>
263 + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
257 264
258 265
259 266
260 267 <?php