PluginProbe
Team Showcase / 1.19
Team Showcase v1.19
trunk 1.0 1.1 1.11 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.22.0 1.22.1 1.22.10 1.22.12 1.22.13 1.22.14 All 49 releases
team / includes / class-functions.php

class-functions.php in Team Showcase 1.19, at includes/class-functions.php

285 lines 7.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * @Author ParaTheme
5 * Copyright: 2015 ParaTheme
6 */
7
8 if ( ! defined('ABSPATH')) exit; // if direct access
9
10
11 class class_team_functions {
12
13
14 public function __construct()
15 {
16
17
18 //$this->settings_page = new Team_Settings();
19
20
21 //add_action( 'admin_menu', array( $this, 'admin_menu' ), 12 );
22 //add_action('admin_menu', array($this, 'create_menu'));
23 }
24
25
26
27
28 public function team_member_posttype($posttype = array('team_member'))
29 {
30 return apply_filters('team_member_posttype', $posttype);
31 }
32
33 public function team_member_taxonomy($taxonomy = 'team_group')
34 {
35 return apply_filters('team_member_taxonomy', $taxonomy); //string only
36 }
37
38
39
40
41 public function team_member_social_field()
42 {
43
44 /*
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(
63 "mobile"=>array('meta_key'=>"mobile",'name'=>"Mobile",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
64 "website"=>array('meta_key'=>"website",'name'=>"Website",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
65 "email"=>array('meta_key'=>"email",'name'=>"Email",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
66 "skype"=>array('meta_key'=>"skype",'name'=>"Skype",'icon'=>'','visibility'=>'1','can_remove'=>'no',),
67 "facebook"=>array('meta_key'=>"facebook",'name'=>"Facebook",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
68 "twitter"=>array('meta_key'=>"twitter",'name'=>"Twitter",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
69 "googleplus"=>array('meta_key'=>"googleplus",'name'=>"Google plus",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
70 "pinterest"=>array('meta_key'=>"pinterest",'name'=>"Pinterest",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
71 "linkedin"=>array('meta_key'=>"linkedin",'name'=>"Linkedin",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
72 "vimeo"=>array('meta_key'=>"vimeo",'name'=>"Vimeo",'icon'=>'','visibility'=>'1','can_remove'=>'yes',),
73 );
74
75 return apply_filters( 'team_member_social_field', $social_field );
76
77 }
78
79
80
81
82
83 public function team_grid_items()
84 {
85
86 $team_grid_items = array(
87 'thumbnail'=>__('Thumbnail','team'),
88 'title'=>__('Title','team'),
89 'position'=>__('Position / Role','team'),
90 'content'=>__('Content / Biography','team'),
91 'social'=>__('Social','team'),
92 );
93
94 $team_grid_items = apply_filters('team_grid_items',$team_grid_items);
95
96
97 return $team_grid_items;
98
99 }
100
101
102
103
104
105 public function team_themes($themes = array())
106 {
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 }
119
120
121 return $theme_list;
122
123 }
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 );
136
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 }
142
143 return $theme_list_dir;
144
145 }
146
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 );
157
158 foreach(apply_filters( 'team_themes_url', $themes_url ) as $theme_key=> $theme_url)
159 {
160 $theme_list_url[$theme_key] = $theme_url;
161 }
162
163
164
165 return $theme_list_url;
166
167 }
168
169
170 // Single Team Member
171
172
173
174
175 public function team_single_themes($themes = array())
176 {
177
178 $themes = array(
179 'flat'=>'Flat',
180
181 );
182
183 foreach(apply_filters( 'team_single_themes', $themes ) as $theme_key=> $theme_name)
184 {
185 $theme_list[$theme_key] = $theme_name;
186 }
187
188
189 return $theme_list;
190
191 }
192
193
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();
198
199 foreach($themes_dir as $theme_key=> $theme_dir)
200 {
201 $theme_list_dir[$theme_key] = $main_dir.$theme_key;
202 }
203
204 return $theme_list_dir;
205
206 }
207
208
209 public function team_single_themes_url($themes_url = array())
210 {
211 $main_url = team_plugin_url.'themes-single/';
212 $themes_url = $this->team_themes();
213
214 foreach($themes_url as $theme_key=> $theme_url)
215 {
216 $theme_list_url[$theme_key] = $main_url.$theme_key;
217 }
218
219 return $theme_list_url;
220
221 }
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239 public function team_share_plugin()
240 {
241
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>
264
265
266
267 <?php
268
269
270
271
272
273 }
274
275
276
277
278
279
280 }
281
282
283 new class_team_functions();
284
285